From eb51a1ed20696460a9cdab2caa8f5d6e1e8dee04 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 8 Oct 2016 21:45:11 +0200 Subject: tests: add v1.1-reverse example filesystem --- tests/example_filesystems/example_test_helpers.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests/example_filesystems/example_test_helpers.go') diff --git a/tests/example_filesystems/example_test_helpers.go b/tests/example_filesystems/example_test_helpers.go index e4c03ad..615e4c1 100644 --- a/tests/example_filesystems/example_test_helpers.go +++ b/tests/example_filesystems/example_test_helpers.go @@ -48,10 +48,17 @@ func checkExampleFS(t *testing.T, dir string, rw bool) { } // checkExampleFSLongnames - verify that "dir" contains the expected test files -// plus the long file name test file +// plus the long file name test file. +// Also tests simple directory operations. func checkExampleFSLongnames(t *testing.T, dir string) { + checkExampleFSrw(t, dir, true) +} + +// checkExampleFSrw is like checkExampleFSLongnames but gives the caller the +// choice if he wants to run tests that write to the FS. +func checkExampleFSrw(t *testing.T, dir string, rw bool) { // regular tests - checkExampleFS(t, dir, true) + checkExampleFS(t, dir, rw) // long name test file longname := "longname_255_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + @@ -65,5 +72,4 @@ func checkExampleFSLongnames(t *testing.T, dir string) { if content != statusTxtContent { t.Errorf("longname_255: unexpected content: %s\n", content) } - } -- cgit v1.2.3