summaryrefslogtreecommitdiff
path: root/tests/example_filesystems/example_test_helpers.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/example_filesystems/example_test_helpers.go')
-rw-r--r--tests/example_filesystems/example_test_helpers.go12
1 files changed, 9 insertions, 3 deletions
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)
}
-
}