]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - cmd/safcm/term_test.go
tests: use subtests
[safcm/safcm.git] / cmd / safcm / term_test.go
index 63ad3c991aa3e4d17482273efee3b5659eb9cf79..f433eb589f8486059ca73fec2f6d6f57c9f73f08 100644 (file)
@@ -82,10 +82,12 @@ func TestEscapeControlCharacters(t *testing.T) {
        }
 
        for _, tc := range tests {
+               t.Run(tc.name, func(t *testing.T) {
                res := EscapeControlCharacters(tc.isTTY, tc.x)
                if tc.exp != res {
-                       t.Errorf("%s: res: %s", tc.name,
+                       t.Errorf("res: %s",
                                cmp.Diff(tc.exp, res))
                }
+               })
        }
 }