=== RUN skipping without message, chatty
--- SKIP: skipping without message, chatty (0.00s)`,
f: func(t *T) { t.SkipNow() },
+ }, {
+ desc: "chatty with recursion",
+ ok: true,
+ chatty: true,
+ output: `
+=== RUN chatty with recursion
+=== RUN chatty with recursion/#00
+=== RUN chatty with recursion/#00/#00
+--- PASS: chatty with recursion (0.00s)
+ --- PASS: chatty with recursion/#00 (0.00s)
+ --- PASS: chatty with recursion/#00/#00 (0.00s)`,
+ f: func(t *T) {
+ t.Run("", func(t *T) {
+ t.Run("", func(t *T) {})
+ })
+ },
}, {
desc: "skipping without message, not chatty",
ok: true,
--- SKIP: root
sub_test.go:: skipping`,
f: func(b *B) { b.Skip("skipping") },
+ }, {
+ desc: "chatty with recursion",
+ chatty: true,
+ f: func(b *B) {
+ b.Run("", func(b *B) {
+ b.Run("", func(b *B) {})
+ })
+ },
}, {
desc: "skipping without message, not chatty",
f: func(b *B) { b.SkipNow() },
if t.chatty {
// Print directly to root's io.Writer so there is no delay.
root := t.parent
- for ; root.parent != nil; root = t.parent {
+ for ; root.parent != nil; root = root.parent {
}
fmt.Fprintf(root.w, "=== RUN %s\n", t.name)
}