summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-09-15 14:18:14 -0400
committerTavian Barnes <tavianator@tavianator.com>2021-09-15 14:18:14 -0400
commitba173f371f4d300976ba15d93f67661f51b7cb42 (patch)
treebec5f8cd08a54e9349d770da3f6e6c118de42c9b
parentb6b7a68190703d30912d2a1c3d8d64e3de81a612 (diff)
downloadbfs-ba173f371f4d300976ba15d93f67661f51b7cb42.tar.xz
tests: Make the -files0-from tests weirder
-rwxr-xr-xtests.sh8
-rw-r--r--tests/test_files0_from_file.out80
-rw-r--r--tests/test_files0_from_stdin.out80
3 files changed, 65 insertions, 103 deletions
diff --git a/tests.sh b/tests.sh
index 46debd9..0cd978e 100755
--- a/tests.sh
+++ b/tests.sh
@@ -3008,12 +3008,14 @@ function test_flags() {
}
function test_files0_from_file() {
- invoke_bfs basic -fprint0 scratch/files0.in
- bfs_diff -files0-from scratch/files0.in
+ cd weirdnames
+ invoke_bfs -mindepth 1 -fprintf ../scratch/files0.in "%P\0"
+ bfs_diff -files0-from ../scratch/files0.in
}
function test_files0_from_stdin() {
- invoke_bfs basic -print0 | bfs_diff -files0-from -
+ cd weirdnames
+ invoke_bfs -mindepth 1 -printf "%P\0" | bfs_diff -files0-from -
}
function test_files0_from_none() {
diff --git a/tests/test_files0_from_file.out b/tests/test_files0_from_file.out
index 203a461..3648854 100644
--- a/tests/test_files0_from_file.out
+++ b/tests/test_files0_from_file.out
@@ -1,50 +1,30 @@
-basic
-basic/a
-basic/a
-basic/b
-basic/b
-basic/c
-basic/c
-basic/e
-basic/e
-basic/g
-basic/g
-basic/i
-basic/i
-basic/j
-basic/j
-basic/k
-basic/k
-basic/l
-basic/l
-basic/c/d
-basic/c/d
-basic/c/d
-basic/e/f
-basic/e/f
-basic/e/f
-basic/g/h
-basic/g/h
-basic/g/h
-basic/j/foo
-basic/j/foo
-basic/j/foo
-basic/k/foo
-basic/k/foo
-basic/k/foo
-basic/l/foo
-basic/l/foo
-basic/l/foo
-basic/k/foo/bar
-basic/k/foo/bar
-basic/k/foo/bar
-basic/k/foo/bar
-basic/l/foo/bar
-basic/l/foo/bar
-basic/l/foo/bar
-basic/l/foo/bar
-basic/l/foo/bar/baz
-basic/l/foo/bar/baz
-basic/l/foo/bar/baz
-basic/l/foo/bar/baz
-basic/l/foo/bar/baz
+
+!
+!-
+(
+(-
+)
+,
+-
+...
+\
+ /j
+ /j
+!-/e
+!-/e
+!/d
+!/d
+(-/c
+(-/c
+(/b
+(/b
+)/g
+)/g
+,/f
+,/f
+-/a
+-/a
+.../h
+.../h
+\/i
+\/i
diff --git a/tests/test_files0_from_stdin.out b/tests/test_files0_from_stdin.out
index 203a461..3648854 100644
--- a/tests/test_files0_from_stdin.out
+++ b/tests/test_files0_from_stdin.out
@@ -1,50 +1,30 @@
-basic
-basic/a
-basic/a
-basic/b
-basic/b
-basic/c
-basic/c
-basic/e
-basic/e
-basic/g
-basic/g
-basic/i
-basic/i
-basic/j
-basic/j
-basic/k
-basic/k
-basic/l
-basic/l
-basic/c/d
-basic/c/d
-basic/c/d
-basic/e/f
-basic/e/f
-basic/e/f
-basic/g/h
-basic/g/h
-basic/g/h
-basic/j/foo
-basic/j/foo
-basic/j/foo
-basic/k/foo
-basic/k/foo
-basic/k/foo
-basic/l/foo
-basic/l/foo
-basic/l/foo
-basic/k/foo/bar
-basic/k/foo/bar
-basic/k/foo/bar
-basic/k/foo/bar
-basic/l/foo/bar
-basic/l/foo/bar
-basic/l/foo/bar
-basic/l/foo/bar
-basic/l/foo/bar/baz
-basic/l/foo/bar/baz
-basic/l/foo/bar/baz
-basic/l/foo/bar/baz
-basic/l/foo/bar/baz
+
+!
+!-
+(
+(-
+)
+,
+-
+...
+\
+ /j
+ /j
+!-/e
+!-/e
+!/d
+!/d
+(-/c
+(-/c
+(/b
+(/b
+)/g
+)/g
+,/f
+,/f
+-/a
+-/a
+.../h
+.../h
+\/i
+\/i