A lightweight test helper package
0

Configure Feed

Select the types of activity you want to include in your feed.

Add README entry about test.File (#13)

authored by

Tom Fleet and committed by
GitHub
(Nov 5, 2023, 1:26 PM UTC) 9e94d8d6 13cf44ef

+4
+4
README.md
··· 47 47 // Get $CWD/testdata easily 48 48 test.Data(t) // /Users/you/project/package/testdata 49 49 50 + // Check against contents of a file (relative to $CWD/testdata) 51 + // including line ending normalisation 52 + test.File(t, "expected.txt", "hello\n") 53 + 50 54 // Just like the good old reflect.DeepEqual, but with a nicer format 51 55 test.DeepEqual(t, []string{"hello"}, []string{"world"}) // Fails 52 56 }