X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=cmd%2Fsafcm%2Fterm_test.go;h=479d7e8e197f7ab951331adec562c6e8671e21e2;hb=3473766d8afb07cb0685694656947883cbbd1138;hp=e5faf174c6e43f02603bfdb785154f07ff9eff33;hpb=641203fda8f7da72c74562c9dc910ca108116f11;p=safcm%2Fsafcm.git diff --git a/cmd/safcm/term_test.go b/cmd/safcm/term_test.go index e5faf17..479d7e8 100644 --- a/cmd/safcm/term_test.go +++ b/cmd/safcm/term_test.go @@ -18,7 +18,7 @@ package main import ( "testing" - "github.com/google/go-cmp/cmp" + "ruderich.org/simon/safcm/testutil" ) func TestEscapeControlCharacters(t *testing.T) { @@ -84,9 +84,7 @@ 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("res: %s", cmp.Diff(tc.exp, res)) - } + testutil.AssertEqual(t, "res", res, tc.exp) }) } }