summaryrefslogtreecommitdiffstats
path: root/tests/common
diff options
context:
space:
mode:
Diffstat (limited to 'tests/common')
-rw-r--r--tests/common/H_newer.out4
-rw-r--r--tests/common/H_newer.sh1
-rw-r--r--tests/common/H_samefile_broken.out1
-rw-r--r--tests/common/H_samefile_broken.sh1
-rw-r--r--tests/common/H_samefile_notdir.out1
-rw-r--r--tests/common/H_samefile_notdir.sh1
-rw-r--r--tests/common/H_samefile_symlink.out2
-rw-r--r--tests/common/H_samefile_symlink.sh1
-rw-r--r--tests/common/L_ilname.out0
-rw-r--r--tests/common/L_ilname.sh2
-rw-r--r--tests/common/L_lname.out0
-rw-r--r--tests/common/L_lname.sh1
-rw-r--r--tests/common/L_ls.sh1
-rw-r--r--tests/common/L_mount.out5
-rw-r--r--tests/common/L_mount.sh13
-rw-r--r--tests/common/L_samefile_broken.out1
-rw-r--r--tests/common/L_samefile_broken.sh1
-rw-r--r--tests/common/L_samefile_notdir.out1
-rw-r--r--tests/common/L_samefile_notdir.sh1
-rw-r--r--tests/common/L_samefile_symlink.out3
-rw-r--r--tests/common/L_samefile_symlink.sh1
-rw-r--r--tests/common/P.out1
-rw-r--r--tests/common/P.sh1
-rw-r--r--tests/common/P_slash.out1
-rw-r--r--tests/common/P_slash.sh1
-rw-r--r--tests/common/anewer.out4
-rw-r--r--tests/common/anewer.sh1
-rw-r--r--tests/common/delete.out1
-rw-r--r--tests/common/delete.sh4
-rw-r--r--tests/common/delete_error.out8
-rw-r--r--tests/common/delete_error.sh9
-rw-r--r--tests/common/delete_many.out1
-rw-r--r--tests/common/delete_many.sh8
-rw-r--r--tests/common/depth_maxdepth_1.out10
-rw-r--r--tests/common/depth_maxdepth_1.sh1
-rw-r--r--tests/common/depth_maxdepth_2.out16
-rw-r--r--tests/common/depth_maxdepth_2.sh1
-rw-r--r--tests/common/depth_mindepth_1.out18
-rw-r--r--tests/common/depth_mindepth_1.sh1
-rw-r--r--tests/common/depth_mindepth_2.out9
-rw-r--r--tests/common/depth_mindepth_2.sh1
-rw-r--r--tests/common/double_dash.out7
-rw-r--r--tests/common/double_dash.sh2
-rw-r--r--tests/common/empty.out8
-rw-r--r--tests/common/empty.sh1
-rw-r--r--tests/common/empty_error.out3
-rw-r--r--tests/common/empty_error.sh7
-rw-r--r--tests/common/empty_special.out20
-rw-r--r--tests/common/empty_special.sh1
-rw-r--r--tests/common/exec_substring.out19
-rw-r--r--tests/common/exec_substring.sh1
-rw-r--r--tests/common/execdir_nonexistent.out19
-rw-r--r--tests/common/execdir_nonexistent.sh2
-rw-r--r--tests/common/execdir_pwd.out19
-rw-r--r--tests/common/execdir_pwd.sh3
-rw-r--r--tests/common/execdir_slash.out1
-rw-r--r--tests/common/execdir_slash.sh2
-rw-r--r--tests/common/execdir_slash_pwd.out1
-rw-r--r--tests/common/execdir_slash_pwd.sh1
-rw-r--r--tests/common/execdir_slashes.out1
-rw-r--r--tests/common/execdir_slashes.sh1
-rw-r--r--tests/common/execdir_ulimit.out40
-rw-r--r--tests/common/execdir_ulimit.sh6
-rw-r--r--tests/common/flag_double_dash.out7
-rw-r--r--tests/common/flag_double_dash.sh2
-rw-r--r--tests/common/follow.out17
-rw-r--r--tests/common/follow.sh1
-rw-r--r--tests/common/ilname.out0
-rw-r--r--tests/common/ilname.sh2
-rw-r--r--tests/common/iname.out4
-rw-r--r--tests/common/iname.sh2
-rw-r--r--tests/common/inum.out1
-rw-r--r--tests/common/inum.sh1
-rw-r--r--tests/common/inum_bind_mount.out2
-rw-r--r--tests/common/inum_bind_mount.sh9
-rw-r--r--tests/common/inum_mount.out1
-rw-r--r--tests/common/inum_mount.sh9
-rw-r--r--tests/common/ipath.out7
-rw-r--r--tests/common/ipath.sh2
-rw-r--r--tests/common/iregex.out3
-rw-r--r--tests/common/iregex.sh1
-rw-r--r--tests/common/lname.out0
-rw-r--r--tests/common/lname.sh1
-rw-r--r--tests/common/ls.sh1
-rw-r--r--tests/common/maxdepth.out10
-rw-r--r--tests/common/maxdepth.sh1
-rw-r--r--tests/common/maxdepth_incomplete.sh1
-rw-r--r--tests/common/mindepth.out18
-rw-r--r--tests/common/mindepth.sh1
-rw-r--r--tests/common/mindepth_incomplete.sh1
-rw-r--r--tests/common/mount.out4
-rw-r--r--tests/common/mount.sh11
-rw-r--r--tests/common/name_slash.out1
-rw-r--r--tests/common/name_slash.sh1
-rw-r--r--tests/common/name_slashes.out1
-rw-r--r--tests/common/name_slashes.sh1
-rw-r--r--tests/common/newerma.out4
-rw-r--r--tests/common/newerma.sh1
-rw-r--r--tests/common/newermt.out3
-rw-r--r--tests/common/newermt.sh3
-rw-r--r--tests/common/newermt_epoch_minus_one.out5
-rw-r--r--tests/common/newermt_epoch_minus_one.sh1
-rw-r--r--tests/common/ok_closed_stdin.out0
-rw-r--r--tests/common/ok_closed_stdin.sh1
-rw-r--r--tests/common/okdir_closed_stdin.out0
-rw-r--r--tests/common/okdir_closed_stdin.sh1
-rw-r--r--tests/common/quit.out1
-rw-r--r--tests/common/quit.sh1
-rw-r--r--tests/common/quit_after_print.out1
-rw-r--r--tests/common/quit_after_print.sh1
-rw-r--r--tests/common/quit_before_print.out0
-rw-r--r--tests/common/quit_before_print.sh1
-rw-r--r--tests/common/quit_child.out2
-rw-r--r--tests/common/quit_child.sh1
-rw-r--r--tests/common/quit_depth.out2
-rw-r--r--tests/common/quit_depth.sh1
-rw-r--r--tests/common/quit_depth_child.out1
-rw-r--r--tests/common/quit_depth_child.sh1
-rw-r--r--tests/common/regex.out3
-rw-r--r--tests/common/regex.sh1
-rw-r--r--tests/common/regex_parens.out1
-rw-r--r--tests/common/regex_parens.sh2
-rw-r--r--tests/common/samefile.out2
-rw-r--r--tests/common/samefile.sh1
-rw-r--r--tests/common/samefile_broken.out1
-rw-r--r--tests/common/samefile_broken.sh1
-rw-r--r--tests/common/samefile_notdir.out1
-rw-r--r--tests/common/samefile_notdir.sh1
-rw-r--r--tests/common/samefile_symlink.out1
-rw-r--r--tests/common/samefile_symlink.sh1
-rw-r--r--tests/common/samefile_wordesc.sh4
-rw-r--r--tests/common/size_big.out0
-rw-r--r--tests/common/size_big.sh1
133 files changed, 481 insertions, 0 deletions
diff --git a/tests/common/H_newer.out b/tests/common/H_newer.out
new file mode 100644
index 0000000..7f6c0dd
--- /dev/null
+++ b/tests/common/H_newer.out
@@ -0,0 +1,4 @@
+times
+times/b
+times/c
+times/l
diff --git a/tests/common/H_newer.sh b/tests/common/H_newer.sh
new file mode 100644
index 0000000..c72bff7
--- /dev/null
+++ b/tests/common/H_newer.sh
@@ -0,0 +1 @@
+bfs_diff -H times -newer times/l
diff --git a/tests/common/H_samefile_broken.out b/tests/common/H_samefile_broken.out
new file mode 100644
index 0000000..21d6316
--- /dev/null
+++ b/tests/common/H_samefile_broken.out
@@ -0,0 +1 @@
+links/broken
diff --git a/tests/common/H_samefile_broken.sh b/tests/common/H_samefile_broken.sh
new file mode 100644
index 0000000..7a3366d
--- /dev/null
+++ b/tests/common/H_samefile_broken.sh
@@ -0,0 +1 @@
+bfs_diff -H links -samefile links/broken
diff --git a/tests/common/H_samefile_notdir.out b/tests/common/H_samefile_notdir.out
new file mode 100644
index 0000000..6e6658d
--- /dev/null
+++ b/tests/common/H_samefile_notdir.out
@@ -0,0 +1 @@
+links/notdir
diff --git a/tests/common/H_samefile_notdir.sh b/tests/common/H_samefile_notdir.sh
new file mode 100644
index 0000000..25ad88d
--- /dev/null
+++ b/tests/common/H_samefile_notdir.sh
@@ -0,0 +1 @@
+bfs_diff -H links -samefile links/notdir
diff --git a/tests/common/H_samefile_symlink.out b/tests/common/H_samefile_symlink.out
new file mode 100644
index 0000000..996ffc8
--- /dev/null
+++ b/tests/common/H_samefile_symlink.out
@@ -0,0 +1,2 @@
+links/file
+links/hardlink
diff --git a/tests/common/H_samefile_symlink.sh b/tests/common/H_samefile_symlink.sh
new file mode 100644
index 0000000..c73ddb2
--- /dev/null
+++ b/tests/common/H_samefile_symlink.sh
@@ -0,0 +1 @@
+bfs_diff -H links -samefile links/symlink
diff --git a/tests/common/L_ilname.out b/tests/common/L_ilname.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/common/L_ilname.out
diff --git a/tests/common/L_ilname.sh b/tests/common/L_ilname.sh
new file mode 100644
index 0000000..e0495ed
--- /dev/null
+++ b/tests/common/L_ilname.sh
@@ -0,0 +1,2 @@
+invoke_bfs -quit -ilname PATTERN || skip
+bfs_diff -L links -ilname '[AQ]'
diff --git a/tests/common/L_lname.out b/tests/common/L_lname.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/common/L_lname.out
diff --git a/tests/common/L_lname.sh b/tests/common/L_lname.sh
new file mode 100644
index 0000000..65b9da5
--- /dev/null
+++ b/tests/common/L_lname.sh
@@ -0,0 +1 @@
+bfs_diff -L links -lname '[aq]'
diff --git a/tests/common/L_ls.sh b/tests/common/L_ls.sh
new file mode 100644
index 0000000..7ee2b44
--- /dev/null
+++ b/tests/common/L_ls.sh
@@ -0,0 +1 @@
+invoke_bfs -L rainbow -ls >"$OUT"
diff --git a/tests/common/L_mount.out b/tests/common/L_mount.out
new file mode 100644
index 0000000..788579d
--- /dev/null
+++ b/tests/common/L_mount.out
@@ -0,0 +1,5 @@
+.
+./foo
+./foo/bar
+./foo/qux
+./mnt
diff --git a/tests/common/L_mount.sh b/tests/common/L_mount.sh
new file mode 100644
index 0000000..fd8042a
--- /dev/null
+++ b/tests/common/L_mount.sh
@@ -0,0 +1,13 @@
+test "$UNAME" = "Darwin" && skip
+
+cd "$TEST"
+mkdir foo mnt
+
+bfs_sudo mount -t tmpfs tmpfs mnt || skip
+defer bfs_sudo umount mnt
+
+ln -s ../mnt foo/bar
+"$XTOUCH" mnt/baz
+ln -s ../mnt/baz foo/qux
+
+bfs_diff -L . -mount
diff --git a/tests/common/L_samefile_broken.out b/tests/common/L_samefile_broken.out
new file mode 100644
index 0000000..21d6316
--- /dev/null
+++ b/tests/common/L_samefile_broken.out
@@ -0,0 +1 @@
+links/broken
diff --git a/tests/common/L_samefile_broken.sh b/tests/common/L_samefile_broken.sh
new file mode 100644
index 0000000..5f860cc
--- /dev/null
+++ b/tests/common/L_samefile_broken.sh
@@ -0,0 +1 @@
+bfs_diff -L links -samefile links/broken
diff --git a/tests/common/L_samefile_notdir.out b/tests/common/L_samefile_notdir.out
new file mode 100644
index 0000000..6e6658d
--- /dev/null
+++ b/tests/common/L_samefile_notdir.out
@@ -0,0 +1 @@
+links/notdir
diff --git a/tests/common/L_samefile_notdir.sh b/tests/common/L_samefile_notdir.sh
new file mode 100644
index 0000000..9b63429
--- /dev/null
+++ b/tests/common/L_samefile_notdir.sh
@@ -0,0 +1 @@
+bfs_diff -L links -samefile links/notdir
diff --git a/tests/common/L_samefile_symlink.out b/tests/common/L_samefile_symlink.out
new file mode 100644
index 0000000..222ac78
--- /dev/null
+++ b/tests/common/L_samefile_symlink.out
@@ -0,0 +1,3 @@
+links/file
+links/hardlink
+links/symlink
diff --git a/tests/common/L_samefile_symlink.sh b/tests/common/L_samefile_symlink.sh
new file mode 100644
index 0000000..4a7a8dd
--- /dev/null
+++ b/tests/common/L_samefile_symlink.sh
@@ -0,0 +1 @@
+bfs_diff -L links -samefile links/symlink
diff --git a/tests/common/P.out b/tests/common/P.out
new file mode 100644
index 0000000..ff635ff
--- /dev/null
+++ b/tests/common/P.out
@@ -0,0 +1 @@
+links/deeply/nested/dir
diff --git a/tests/common/P.sh b/tests/common/P.sh
new file mode 100644
index 0000000..a7a09d1
--- /dev/null
+++ b/tests/common/P.sh
@@ -0,0 +1 @@
+bfs_diff -P links/deeply/nested/dir
diff --git a/tests/common/P_slash.out b/tests/common/P_slash.out
new file mode 100644
index 0000000..df7701b
--- /dev/null
+++ b/tests/common/P_slash.out
@@ -0,0 +1 @@
+links/deeply/nested/dir/
diff --git a/tests/common/P_slash.sh b/tests/common/P_slash.sh
new file mode 100644
index 0000000..9b9ffa0
--- /dev/null
+++ b/tests/common/P_slash.sh
@@ -0,0 +1 @@
+bfs_diff -P links/deeply/nested/dir/
diff --git a/tests/common/anewer.out b/tests/common/anewer.out
new file mode 100644
index 0000000..7f6c0dd
--- /dev/null
+++ b/tests/common/anewer.out
@@ -0,0 +1,4 @@
+times
+times/b
+times/c
+times/l
diff --git a/tests/common/anewer.sh b/tests/common/anewer.sh
new file mode 100644
index 0000000..0cdd759
--- /dev/null
+++ b/tests/common/anewer.sh
@@ -0,0 +1 @@
+bfs_diff times -anewer times/a
diff --git a/tests/common/delete.out b/tests/common/delete.out
new file mode 100644
index 0000000..9c558e3
--- /dev/null
+++ b/tests/common/delete.out
@@ -0,0 +1 @@
+.
diff --git a/tests/common/delete.sh b/tests/common/delete.sh
new file mode 100644
index 0000000..638f307
--- /dev/null
+++ b/tests/common/delete.sh
@@ -0,0 +1,4 @@
+cd "$TEST"
+"$XTOUCH" -p foo/bar/baz
+invoke_bfs . -delete
+bfs_diff .
diff --git a/tests/common/delete_error.out b/tests/common/delete_error.out
new file mode 100644
index 0000000..b6b6505
--- /dev/null
+++ b/tests/common/delete_error.out
@@ -0,0 +1,8 @@
+.
+.
+./baz
+./baz
+./baz/qux
+./baz/qux
+./foo
+./foo/bar
diff --git a/tests/common/delete_error.sh b/tests/common/delete_error.sh
new file mode 100644
index 0000000..e6327f3
--- /dev/null
+++ b/tests/common/delete_error.sh
@@ -0,0 +1,9 @@
+cd "$TEST"
+
+"$XTOUCH" -p foo/bar baz/qux
+chmod -w foo
+defer chmod +w foo
+
+! invoke_bfs . -print -delete -print >"$OUT" || fail
+sort_output
+diff_output
diff --git a/tests/common/delete_many.out b/tests/common/delete_many.out
new file mode 100644
index 0000000..9c558e3
--- /dev/null
+++ b/tests/common/delete_many.out
@@ -0,0 +1 @@
+.
diff --git a/tests/common/delete_many.sh b/tests/common/delete_many.sh
new file mode 100644
index 0000000..48fe4c2
--- /dev/null
+++ b/tests/common/delete_many.sh
@@ -0,0 +1,8 @@
+# Test for https://github.com/tavianator/bfs/issues/67
+
+cd "$TEST"
+mkdir foo
+"$XTOUCH" foo/{1..256}
+
+invoke_bfs foo -delete
+bfs_diff .
diff --git a/tests/common/depth_maxdepth_1.out b/tests/common/depth_maxdepth_1.out
new file mode 100644
index 0000000..7575ae4
--- /dev/null
+++ b/tests/common/depth_maxdepth_1.out
@@ -0,0 +1,10 @@
+basic
+basic/a
+basic/b
+basic/c
+basic/e
+basic/g
+basic/i
+basic/j
+basic/k
+basic/l
diff --git a/tests/common/depth_maxdepth_1.sh b/tests/common/depth_maxdepth_1.sh
new file mode 100644
index 0000000..4b7e538
--- /dev/null
+++ b/tests/common/depth_maxdepth_1.sh
@@ -0,0 +1 @@
+bfs_diff basic -maxdepth 1 -depth
diff --git a/tests/common/depth_maxdepth_2.out b/tests/common/depth_maxdepth_2.out
new file mode 100644
index 0000000..c53041e
--- /dev/null
+++ b/tests/common/depth_maxdepth_2.out
@@ -0,0 +1,16 @@
+basic
+basic/a
+basic/b
+basic/c
+basic/c/d
+basic/e
+basic/e/f
+basic/g
+basic/g/h
+basic/i
+basic/j
+basic/j/foo
+basic/k
+basic/k/foo
+basic/l
+basic/l/foo
diff --git a/tests/common/depth_maxdepth_2.sh b/tests/common/depth_maxdepth_2.sh
new file mode 100644
index 0000000..2c49a65
--- /dev/null
+++ b/tests/common/depth_maxdepth_2.sh
@@ -0,0 +1 @@
+bfs_diff basic -maxdepth 2 -depth
diff --git a/tests/common/depth_mindepth_1.out b/tests/common/depth_mindepth_1.out
new file mode 100644
index 0000000..3b461cf
--- /dev/null
+++ b/tests/common/depth_mindepth_1.out
@@ -0,0 +1,18 @@
+basic/a
+basic/b
+basic/c
+basic/c/d
+basic/e
+basic/e/f
+basic/g
+basic/g/h
+basic/i
+basic/j
+basic/j/foo
+basic/k
+basic/k/foo
+basic/k/foo/bar
+basic/l
+basic/l/foo
+basic/l/foo/bar
+basic/l/foo/bar/baz
diff --git a/tests/common/depth_mindepth_1.sh b/tests/common/depth_mindepth_1.sh
new file mode 100644
index 0000000..868d9e1
--- /dev/null
+++ b/tests/common/depth_mindepth_1.sh
@@ -0,0 +1 @@
+bfs_diff basic -mindepth 1 -depth
diff --git a/tests/common/depth_mindepth_2.out b/tests/common/depth_mindepth_2.out
new file mode 100644
index 0000000..6ccd80a
--- /dev/null
+++ b/tests/common/depth_mindepth_2.out
@@ -0,0 +1,9 @@
+basic/c/d
+basic/e/f
+basic/g/h
+basic/j/foo
+basic/k/foo
+basic/k/foo/bar
+basic/l/foo
+basic/l/foo/bar
+basic/l/foo/bar/baz
diff --git a/tests/common/depth_mindepth_2.sh b/tests/common/depth_mindepth_2.sh
new file mode 100644
index 0000000..2031b2c
--- /dev/null
+++ b/tests/common/depth_mindepth_2.sh
@@ -0,0 +1 @@
+bfs_diff basic -mindepth 2 -depth
diff --git a/tests/common/double_dash.out b/tests/common/double_dash.out
new file mode 100644
index 0000000..774cc7c
--- /dev/null
+++ b/tests/common/double_dash.out
@@ -0,0 +1,7 @@
+./a
+./b
+./c/d
+./e/f
+./j/foo
+./k/foo/bar
+./l/foo/bar/baz
diff --git a/tests/common/double_dash.sh b/tests/common/double_dash.sh
new file mode 100644
index 0000000..1a7a118
--- /dev/null
+++ b/tests/common/double_dash.sh
@@ -0,0 +1,2 @@
+cd basic
+bfs_diff -- . -type f
diff --git a/tests/common/empty.out b/tests/common/empty.out
new file mode 100644
index 0000000..a0f4b76
--- /dev/null
+++ b/tests/common/empty.out
@@ -0,0 +1,8 @@
+basic/a
+basic/b
+basic/c/d
+basic/e/f
+basic/g/h
+basic/i
+basic/j/foo
+basic/k/foo/bar
diff --git a/tests/common/empty.sh b/tests/common/empty.sh
new file mode 100644
index 0000000..95ee988
--- /dev/null
+++ b/tests/common/empty.sh
@@ -0,0 +1 @@
+bfs_diff basic -empty
diff --git a/tests/common/empty_error.out b/tests/common/empty_error.out
new file mode 100644
index 0000000..da45e23
--- /dev/null
+++ b/tests/common/empty_error.out
@@ -0,0 +1,3 @@
+./bar
+./baz
+./qux
diff --git a/tests/common/empty_error.sh b/tests/common/empty_error.sh
new file mode 100644
index 0000000..7c8049c
--- /dev/null
+++ b/tests/common/empty_error.sh
@@ -0,0 +1,7 @@
+cd "$TEST"
+
+"$XTOUCH" -p foo/ bar/ baz qux
+chmod -r foo baz
+defer chmod +r foo baz
+
+! bfs_diff . -empty
diff --git a/tests/common/empty_special.out b/tests/common/empty_special.out
new file mode 100644
index 0000000..fa35478
--- /dev/null
+++ b/tests/common/empty_special.out
@@ -0,0 +1,20 @@
+rainbow//
+rainbow/exec.sh
+rainbow/file.dat
+rainbow/file.txt
+rainbow/lower.gz
+rainbow/lower.tar
+rainbow/lower.tar.gz
+rainbow/lu.tar.GZ
+rainbow/mh1
+rainbow/mh2
+rainbow/ow
+rainbow/sgid
+rainbow/sticky
+rainbow/sticky_ow
+rainbow/sugid
+rainbow/suid
+rainbow/ul.TAR.gz
+rainbow/upper.GZ
+rainbow/upper.TAR
+rainbow/upper.TAR.GZ
diff --git a/tests/common/empty_special.sh b/tests/common/empty_special.sh
new file mode 100644
index 0000000..31e9d2e
--- /dev/null
+++ b/tests/common/empty_special.sh
@@ -0,0 +1 @@
+bfs_diff rainbow -empty
diff --git a/tests/common/exec_substring.out b/tests/common/exec_substring.out
new file mode 100644
index 0000000..32a6353
--- /dev/null
+++ b/tests/common/exec_substring.out
@@ -0,0 +1,19 @@
+-basic-
+-basic/a-
+-basic/b-
+-basic/c-
+-basic/c/d-
+-basic/e-
+-basic/e/f-
+-basic/g-
+-basic/g/h-
+-basic/i-
+-basic/j-
+-basic/j/foo-
+-basic/k-
+-basic/k/foo-
+-basic/k/foo/bar-
+-basic/l-
+-basic/l/foo-
+-basic/l/foo/bar-
+-basic/l/foo/bar/baz-
diff --git a/tests/common/exec_substring.sh b/tests/common/exec_substring.sh
new file mode 100644
index 0000000..5cf8e85
--- /dev/null
+++ b/tests/common/exec_substring.sh
@@ -0,0 +1 @@
+bfs_diff basic -exec echo '-{}-' \;
diff --git a/tests/common/execdir_nonexistent.out b/tests/common/execdir_nonexistent.out
new file mode 100644
index 0000000..a7ccfe4
--- /dev/null
+++ b/tests/common/execdir_nonexistent.out
@@ -0,0 +1,19 @@
+basic
+basic/a
+basic/b
+basic/c
+basic/c/d
+basic/e
+basic/e/f
+basic/g
+basic/g/h
+basic/i
+basic/j
+basic/j/foo
+basic/k
+basic/k/foo
+basic/k/foo/bar
+basic/l
+basic/l/foo
+basic/l/foo/bar
+basic/l/foo/bar/baz
diff --git a/tests/common/execdir_nonexistent.sh b/tests/common/execdir_nonexistent.sh
new file mode 100644
index 0000000..0ec013c
--- /dev/null
+++ b/tests/common/execdir_nonexistent.sh
@@ -0,0 +1,2 @@
+bfs_diff basic -print -execdir "$TESTS/nonexistent" {} \; -print 2>"$TEST/err" && fail
+test -s "$TEST/err"
diff --git a/tests/common/execdir_pwd.out b/tests/common/execdir_pwd.out
new file mode 100644
index 0000000..a11cd25
--- /dev/null
+++ b/tests/common/execdir_pwd.out
@@ -0,0 +1,19 @@
+
+basic
+basic
+basic
+basic
+basic
+basic
+basic
+basic
+basic
+basic/c
+basic/e
+basic/g
+basic/j
+basic/k
+basic/k/foo
+basic/l
+basic/l/foo
+basic/l/foo/bar
diff --git a/tests/common/execdir_pwd.sh b/tests/common/execdir_pwd.sh
new file mode 100644
index 0000000..1c0165a
--- /dev/null
+++ b/tests/common/execdir_pwd.sh
@@ -0,0 +1,3 @@
+TMP_REAL=$(cd "$TMP" && pwd)
+OFFSET=$((${#TMP_REAL} + 2))
+bfs_diff basic -execdir bash -c "pwd | cut -b$OFFSET-" \;
diff --git a/tests/common/execdir_slash.out b/tests/common/execdir_slash.out
new file mode 100644
index 0000000..b498fd4
--- /dev/null
+++ b/tests/common/execdir_slash.out
@@ -0,0 +1 @@
+/
diff --git a/tests/common/execdir_slash.sh b/tests/common/execdir_slash.sh
new file mode 100644
index 0000000..965f679
--- /dev/null
+++ b/tests/common/execdir_slash.sh
@@ -0,0 +1,2 @@
+# Don't prepend ./ for absolute paths in -execdir
+bfs_diff / -maxdepth 0 -execdir echo {} \;
diff --git a/tests/common/execdir_slash_pwd.out b/tests/common/execdir_slash_pwd.out
new file mode 100644
index 0000000..b498fd4
--- /dev/null
+++ b/tests/common/execdir_slash_pwd.out
@@ -0,0 +1 @@
+/
diff --git a/tests/common/execdir_slash_pwd.sh b/tests/common/execdir_slash_pwd.sh
new file mode 100644
index 0000000..9c82e09
--- /dev/null
+++ b/tests/common/execdir_slash_pwd.sh
@@ -0,0 +1 @@
+bfs_diff / -maxdepth 0 -execdir pwd \;
diff --git a/tests/common/execdir_slashes.out b/tests/common/execdir_slashes.out
new file mode 100644
index 0000000..b498fd4
--- /dev/null
+++ b/tests/common/execdir_slashes.out
@@ -0,0 +1 @@
+/
diff --git a/tests/common/execdir_slashes.sh b/tests/common/execdir_slashes.sh
new file mode 100644
index 0000000..4e2b327
--- /dev/null
+++ b/tests/common/execdir_slashes.sh
@@ -0,0 +1 @@
+bfs_diff /// -maxdepth 0 -execdir echo {} \;
diff --git a/tests/common/execdir_ulimit.out b/tests/common/execdir_ulimit.out
new file mode 100644
index 0000000..bf52c09
--- /dev/null
+++ b/tests/common/execdir_ulimit.out
@@ -0,0 +1,40 @@
+./.
+./0
+./1
+./2
+./3
+./4
+./5
+./6
+./7
+./8
+./9
+./A
+./B
+./C
+./a
+./b
+./c
+./d
+./e
+./f
+./g
+./h
+./i
+./j
+./k
+./l
+./m
+./n
+./o
+./p
+./q
+./r
+./s
+./t
+./u
+./v
+./w
+./x
+./y
+./z
diff --git a/tests/common/execdir_ulimit.sh b/tests/common/execdir_ulimit.sh
new file mode 100644
index 0000000..122c282
--- /dev/null
+++ b/tests/common/execdir_ulimit.sh
@@ -0,0 +1,6 @@
+cd "$TEST"
+mkdir -p a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z
+mkdir -p a/b/c/d/e/f/g/h/i/j/k/l/m/0/1/2/3/4/5/6/7/8/9/A/B/C
+
+ulimit -n $((NOPENFD + 10))
+bfs_diff . -execdir echo {} \;
diff --git a/tests/common/flag_double_dash.out b/tests/common/flag_double_dash.out
new file mode 100644
index 0000000..774cc7c
--- /dev/null
+++ b/tests/common/flag_double_dash.out
@@ -0,0 +1,7 @@
+./a
+./b
+./c/d
+./e/f
+./j/foo
+./k/foo/bar
+./l/foo/bar/baz
diff --git a/tests/common/flag_double_dash.sh b/tests/common/flag_double_dash.sh
new file mode 100644
index 0000000..1075b06
--- /dev/null
+++ b/tests/common/flag_double_dash.sh
@@ -0,0 +1,2 @@
+cd basic
+bfs_diff -L -- . -type f
diff --git a/tests/common/follow.out b/tests/common/follow.out
new file mode 100644
index 0000000..ec9e861
--- /dev/null
+++ b/tests/common/follow.out
@@ -0,0 +1,17 @@
+links
+links/broken
+links/deeply
+links/deeply/nested
+links/deeply/nested/broken
+links/deeply/nested/dir
+links/deeply/nested/file
+links/deeply/nested/link
+links/file
+links/hardlink
+links/notdir
+links/skip
+links/skip/broken
+links/skip/dir
+links/skip/file
+links/skip/link
+links/symlink
diff --git a/tests/common/follow.sh b/tests/common/follow.sh
new file mode 100644
index 0000000..b5a2ae1
--- /dev/null
+++ b/tests/common/follow.sh
@@ -0,0 +1 @@
+bfs_diff links -follow
diff --git a/tests/common/ilname.out b/tests/common/ilname.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/common/ilname.out
diff --git a/tests/common/ilname.sh b/tests/common/ilname.sh
new file mode 100644
index 0000000..fc7e9e4
--- /dev/null
+++ b/tests/common/ilname.sh
@@ -0,0 +1,2 @@
+invoke_bfs -quit -ilname PATTERN || skip
+bfs_diff links -ilname '[AQ]'
diff --git a/tests/common/iname.out b/tests/common/iname.out
new file mode 100644
index 0000000..a9e5d42
--- /dev/null
+++ b/tests/common/iname.out
@@ -0,0 +1,4 @@
+basic/e/f
+basic/j/foo
+basic/k/foo
+basic/l/foo
diff --git a/tests/common/iname.sh b/tests/common/iname.sh
new file mode 100644
index 0000000..c25a646
--- /dev/null
+++ b/tests/common/iname.sh
@@ -0,0 +1,2 @@
+invoke_bfs -quit -iname PATTERN || skip
+bfs_diff basic -iname '*F*'
diff --git a/tests/common/inum.out b/tests/common/inum.out
new file mode 100644
index 0000000..ebcaf79
--- /dev/null
+++ b/tests/common/inum.out
@@ -0,0 +1 @@
+basic/k/foo/bar
diff --git a/tests/common/inum.sh b/tests/common/inum.sh
new file mode 100644
index 0000000..ca63bbb
--- /dev/null
+++ b/tests/common/inum.sh
@@ -0,0 +1 @@
+bfs_diff basic -inum "$(inum basic/k/foo/bar)"
diff --git a/tests/common/inum_bind_mount.out b/tests/common/inum_bind_mount.out
new file mode 100644
index 0000000..ede8749
--- /dev/null
+++ b/tests/common/inum_bind_mount.out
@@ -0,0 +1,2 @@
+./bar
+./foo
diff --git a/tests/common/inum_bind_mount.sh b/tests/common/inum_bind_mount.sh
new file mode 100644
index 0000000..892713e
--- /dev/null
+++ b/tests/common/inum_bind_mount.sh
@@ -0,0 +1,9 @@
+test "$UNAME" = "Linux" || skip
+
+cd "$TEST"
+"$XTOUCH" foo bar baz
+
+bfs_sudo mount --bind foo bar || skip
+defer bfs_sudo umount bar
+
+bfs_diff . -inum "$(inum bar)"
diff --git a/tests/common/inum_mount.out b/tests/common/inum_mount.out
new file mode 100644
index 0000000..99fa01e
--- /dev/null
+++ b/tests/common/inum_mount.out
@@ -0,0 +1 @@
+./mnt
diff --git a/tests/common/inum_mount.sh b/tests/common/inum_mount.sh
new file mode 100644
index 0000000..7facf57
--- /dev/null
+++ b/tests/common/inum_mount.sh
@@ -0,0 +1,9 @@
+test "$UNAME" = "Darwin" && skip
+
+cd "$TEST"
+mkdir foo mnt
+
+bfs_sudo mount -t tmpfs tmpfs mnt || skip
+defer bfs_sudo umount mnt
+
+bfs_diff . -inum "$(inum mnt)"
diff --git a/tests/common/ipath.out b/tests/common/ipath.out
new file mode 100644
index 0000000..ae1ae21
--- /dev/null
+++ b/tests/common/ipath.out
@@ -0,0 +1,7 @@
+basic/e/f
+basic/j/foo
+basic/k/foo
+basic/k/foo/bar
+basic/l/foo
+basic/l/foo/bar
+basic/l/foo/bar/baz
diff --git a/tests/common/ipath.sh b/tests/common/ipath.sh
new file mode 100644
index 0000000..7d05f31
--- /dev/null
+++ b/tests/common/ipath.sh
@@ -0,0 +1,2 @@
+invoke_bfs -quit -ipath PATTERN || skip
+bfs_diff basic -ipath 'basic/*F*'
diff --git a/tests/common/iregex.out b/tests/common/iregex.out
new file mode 100644
index 0000000..cfc113b
--- /dev/null
+++ b/tests/common/iregex.out
@@ -0,0 +1,3 @@
+basic/c/d
+basic/e/f
+basic/g/h
diff --git a/tests/common/iregex.sh b/tests/common/iregex.sh
new file mode 100644
index 0000000..fc782f5
--- /dev/null
+++ b/tests/common/iregex.sh
@@ -0,0 +1 @@
+bfs_diff basic -iregex 'basic/[A-Z]/[a-z]'
diff --git a/tests/common/lname.out b/tests/common/lname.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/common/lname.out
diff --git a/tests/common/lname.sh b/tests/common/lname.sh
new file mode 100644
index 0000000..cf8a2a1
--- /dev/null
+++ b/tests/common/lname.sh
@@ -0,0 +1 @@
+bfs_diff links -lname '[aq]'
diff --git a/tests/common/ls.sh b/tests/common/ls.sh
new file mode 100644
index 0000000..bc50d90
--- /dev/null
+++ b/tests/common/ls.sh
@@ -0,0 +1 @@
+invoke_bfs rainbow -ls >"$OUT"
diff --git a/tests/common/maxdepth.out b/tests/common/maxdepth.out
new file mode 100644
index 0000000..7575ae4
--- /dev/null
+++ b/tests/common/maxdepth.out
@@ -0,0 +1,10 @@
+basic
+basic/a
+basic/b
+basic/c
+basic/e
+basic/g
+basic/i
+basic/j
+basic/k
+basic/l
diff --git a/tests/common/maxdepth.sh b/tests/common/maxdepth.sh
new file mode 100644
index 0000000..bb47cc9
--- /dev/null
+++ b/tests/common/maxdepth.sh
@@ -0,0 +1 @@
+bfs_diff basic -maxdepth 1
diff --git a/tests/common/maxdepth_incomplete.sh b/tests/common/maxdepth_incomplete.sh
new file mode 100644
index 0000000..0bcb461
--- /dev/null
+++ b/tests/common/maxdepth_incomplete.sh
@@ -0,0 +1 @@
+! invoke_bfs basic -maxdepth
diff --git a/tests/common/mindepth.out b/tests/common/mindepth.out
new file mode 100644
index 0000000..3b461cf
--- /dev/null
+++ b/tests/common/mindepth.out
@@ -0,0 +1,18 @@
+basic/a
+basic/b
+basic/c
+basic/c/d
+basic/e
+basic/e/f
+basic/g
+basic/g/h
+basic/i
+basic/j
+basic/j/foo
+basic/k
+basic/k/foo
+basic/k/foo/bar
+basic/l
+basic/l/foo
+basic/l/foo/bar
+basic/l/foo/bar/baz
diff --git a/tests/common/mindepth.sh b/tests/common/mindepth.sh
new file mode 100644
index 0000000..22d7770
--- /dev/null
+++ b/tests/common/mindepth.sh
@@ -0,0 +1 @@
+bfs_diff basic -mindepth 1
diff --git a/tests/common/mindepth_incomplete.sh b/tests/common/mindepth_incomplete.sh
new file mode 100644
index 0000000..6f55a42
--- /dev/null
+++ b/tests/common/mindepth_incomplete.sh
@@ -0,0 +1 @@
+! invoke_bfs basic -mindepth
diff --git a/tests/common/mount.out b/tests/common/mount.out
new file mode 100644
index 0000000..6253434
--- /dev/null
+++ b/tests/common/mount.out
@@ -0,0 +1,4 @@
+.
+./foo
+./foo/bar
+./mnt
diff --git a/tests/common/mount.sh b/tests/common/mount.sh
new file mode 100644
index 0000000..c9abde5
--- /dev/null
+++ b/tests/common/mount.sh
@@ -0,0 +1,11 @@
+test "$UNAME" = "Darwin" && skip
+
+cd "$TEST"
+mkdir foo mnt
+
+bfs_sudo mount -t tmpfs tmpfs mnt || skip
+defer bfs_sudo umount mnt
+
+"$XTOUCH" foo/bar mnt/baz
+
+bfs_diff . -mount
diff --git a/tests/common/name_slash.out b/tests/common/name_slash.out
new file mode 100644
index 0000000..b498fd4
--- /dev/null
+++ b/tests/common/name_slash.out
@@ -0,0 +1 @@
+/
diff --git a/tests/common/name_slash.sh b/tests/common/name_slash.sh
new file mode 100644
index 0000000..8d89623
--- /dev/null
+++ b/tests/common/name_slash.sh
@@ -0,0 +1 @@
+bfs_diff / -maxdepth 0 -name /
diff --git a/tests/common/name_slashes.out b/tests/common/name_slashes.out
new file mode 100644
index 0000000..187b81f
--- /dev/null
+++ b/tests/common/name_slashes.out
@@ -0,0 +1 @@
+///
diff --git a/tests/common/name_slashes.sh b/tests/common/name_slashes.sh
new file mode 100644
index 0000000..78d0a84
--- /dev/null
+++ b/tests/common/name_slashes.sh
@@ -0,0 +1 @@
+bfs_diff /// -maxdepth 0 -name /
diff --git a/tests/common/newerma.out b/tests/common/newerma.out
new file mode 100644
index 0000000..7f6c0dd
--- /dev/null
+++ b/tests/common/newerma.out
@@ -0,0 +1,4 @@
+times
+times/b
+times/c
+times/l
diff --git a/tests/common/newerma.sh b/tests/common/newerma.sh
new file mode 100644
index 0000000..b05af8d
--- /dev/null
+++ b/tests/common/newerma.sh
@@ -0,0 +1 @@
+bfs_diff times -newerma times/a
diff --git a/tests/common/newermt.out b/tests/common/newermt.out
new file mode 100644
index 0000000..650e550
--- /dev/null
+++ b/tests/common/newermt.out
@@ -0,0 +1,3 @@
+times
+times/c
+times/l
diff --git a/tests/common/newermt.sh b/tests/common/newermt.sh
new file mode 100644
index 0000000..e816b29
--- /dev/null
+++ b/tests/common/newermt.sh
@@ -0,0 +1,3 @@
+bfs_diff times -newermt 1991-12-14T00:01 \
+ -newermt "1991-12-14 01:01+01:00" \
+ -newermt "19911213 20:31:00-0330"
diff --git a/tests/common/newermt_epoch_minus_one.out b/tests/common/newermt_epoch_minus_one.out
new file mode 100644
index 0000000..f7f63b0
--- /dev/null
+++ b/tests/common/newermt_epoch_minus_one.out
@@ -0,0 +1,5 @@
+times
+times/a
+times/b
+times/c
+times/l
diff --git a/tests/common/newermt_epoch_minus_one.sh b/tests/common/newermt_epoch_minus_one.sh
new file mode 100644
index 0000000..568e2f3
--- /dev/null
+++ b/tests/common/newermt_epoch_minus_one.sh
@@ -0,0 +1 @@
+bfs_diff times -newermt 1969-12-31T23:59:59Z
diff --git a/tests/common/ok_closed_stdin.out b/tests/common/ok_closed_stdin.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/common/ok_closed_stdin.out
diff --git a/tests/common/ok_closed_stdin.sh b/tests/common/ok_closed_stdin.sh
new file mode 100644
index 0000000..687e998
--- /dev/null
+++ b/tests/common/ok_closed_stdin.sh
@@ -0,0 +1 @@
+bfs_diff basic -ok echo \; <&-
diff --git a/tests/common/okdir_closed_stdin.out b/tests/common/okdir_closed_stdin.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/common/okdir_closed_stdin.out
diff --git a/tests/common/okdir_closed_stdin.sh b/tests/common/okdir_closed_stdin.sh
new file mode 100644
index 0000000..a515298
--- /dev/null
+++ b/tests/common/okdir_closed_stdin.sh
@@ -0,0 +1 @@
+bfs_diff basic -okdir echo {} \; <&-
diff --git a/tests/common/quit.out b/tests/common/quit.out
new file mode 100644
index 0000000..cf4d5a9
--- /dev/null
+++ b/tests/common/quit.out
@@ -0,0 +1 @@
+basic/g
diff --git a/tests/common/quit.sh b/tests/common/quit.sh
new file mode 100644
index 0000000..46b60c5
--- /dev/null
+++ b/tests/common/quit.sh
@@ -0,0 +1 @@
+bfs_diff basic/g -print -name g -quit
diff --git a/tests/common/quit_after_print.out b/tests/common/quit_after_print.out
new file mode 100644
index 0000000..15a13db
--- /dev/null
+++ b/tests/common/quit_after_print.out
@@ -0,0 +1 @@
+basic
diff --git a/tests/common/quit_after_print.sh b/tests/common/quit_after_print.sh
new file mode 100644
index 0000000..ee5653a
--- /dev/null
+++ b/tests/common/quit_after_print.sh
@@ -0,0 +1 @@
+bfs_diff basic basic -print -quit
diff --git a/tests/common/quit_before_print.out b/tests/common/quit_before_print.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/common/quit_before_print.out
diff --git a/tests/common/quit_before_print.sh b/tests/common/quit_before_print.sh
new file mode 100644
index 0000000..cda3a2c
--- /dev/null
+++ b/tests/common/quit_before_print.sh
@@ -0,0 +1 @@
+bfs_diff basic basic -quit -print
diff --git a/tests/common/quit_child.out b/tests/common/quit_child.out
new file mode 100644
index 0000000..fb683c7
--- /dev/null
+++ b/tests/common/quit_child.out
@@ -0,0 +1,2 @@
+basic/g
+basic/g/h
diff --git a/tests/common/quit_child.sh b/tests/common/quit_child.sh
new file mode 100644
index 0000000..bd27eff
--- /dev/null
+++ b/tests/common/quit_child.sh
@@ -0,0 +1 @@
+bfs_diff basic/g -print -name h -quit
diff --git a/tests/common/quit_depth.out b/tests/common/quit_depth.out
new file mode 100644
index 0000000..fb683c7
--- /dev/null
+++ b/tests/common/quit_depth.out
@@ -0,0 +1,2 @@
+basic/g
+basic/g/h
diff --git a/tests/common/quit_depth.sh b/tests/common/quit_depth.sh
new file mode 100644
index 0000000..f5f82ba
--- /dev/null
+++ b/tests/common/quit_depth.sh
@@ -0,0 +1 @@
+bfs_diff basic/g -depth -print -name g -quit
diff --git a/tests/common/quit_depth_child.out b/tests/common/quit_depth_child.out
new file mode 100644
index 0000000..72b086d
--- /dev/null
+++ b/tests/common/quit_depth_child.out
@@ -0,0 +1 @@
+basic/g/h
diff --git a/tests/common/quit_depth_child.sh b/tests/common/quit_depth_child.sh
new file mode 100644
index 0000000..dd09d5b
--- /dev/null
+++ b/tests/common/quit_depth_child.sh
@@ -0,0 +1 @@
+bfs_diff basic/g -depth -print -name h -quit
diff --git a/tests/common/regex.out b/tests/common/regex.out
new file mode 100644
index 0000000..cfc113b
--- /dev/null
+++ b/tests/common/regex.out
@@ -0,0 +1,3 @@
+basic/c/d
+basic/e/f
+basic/g/h
diff --git a/tests/common/regex.sh b/tests/common/regex.sh
new file mode 100644
index 0000000..a3bdae8
--- /dev/null
+++ b/tests/common/regex.sh
@@ -0,0 +1 @@
+bfs_diff basic -regex 'basic/./.'
diff --git a/tests/common/regex_parens.out b/tests/common/regex_parens.out
new file mode 100644
index 0000000..0f0971e
--- /dev/null
+++ b/tests/common/regex_parens.out
@@ -0,0 +1 @@
+./(
diff --git a/tests/common/regex_parens.sh b/tests/common/regex_parens.sh
new file mode 100644
index 0000000..fe0abf6
--- /dev/null
+++ b/tests/common/regex_parens.sh
@@ -0,0 +1,2 @@
+cd weirdnames
+bfs_diff . -regex '\./\((\)'
diff --git a/tests/common/samefile.out b/tests/common/samefile.out
new file mode 100644
index 0000000..996ffc8
--- /dev/null
+++ b/tests/common/samefile.out
@@ -0,0 +1,2 @@
+links/file
+links/hardlink
diff --git a/tests/common/samefile.sh b/tests/common/samefile.sh
new file mode 100644
index 0000000..8e51966
--- /dev/null
+++ b/tests/common/samefile.sh
@@ -0,0 +1 @@
+bfs_diff links -samefile links/file
diff --git a/tests/common/samefile_broken.out b/tests/common/samefile_broken.out
new file mode 100644
index 0000000..21d6316
--- /dev/null
+++ b/tests/common/samefile_broken.out
@@ -0,0 +1 @@
+links/broken
diff --git a/tests/common/samefile_broken.sh b/tests/common/samefile_broken.sh
new file mode 100644
index 0000000..1cb52db
--- /dev/null
+++ b/tests/common/samefile_broken.sh
@@ -0,0 +1 @@
+bfs_diff links -samefile links/broken
diff --git a/tests/common/samefile_notdir.out b/tests/common/samefile_notdir.out
new file mode 100644
index 0000000..6e6658d
--- /dev/null
+++ b/tests/common/samefile_notdir.out
@@ -0,0 +1 @@
+links/notdir
diff --git a/tests/common/samefile_notdir.sh b/tests/common/samefile_notdir.sh
new file mode 100644
index 0000000..f274ef6
--- /dev/null
+++ b/tests/common/samefile_notdir.sh
@@ -0,0 +1 @@
+bfs_diff links -samefile links/notdir
diff --git a/tests/common/samefile_symlink.out b/tests/common/samefile_symlink.out
new file mode 100644
index 0000000..299a572
--- /dev/null
+++ b/tests/common/samefile_symlink.out
@@ -0,0 +1 @@
+links/symlink
diff --git a/tests/common/samefile_symlink.sh b/tests/common/samefile_symlink.sh
new file mode 100644
index 0000000..55ccf5c
--- /dev/null
+++ b/tests/common/samefile_symlink.sh
@@ -0,0 +1 @@
+bfs_diff links -samefile links/symlink
diff --git a/tests/common/samefile_wordesc.sh b/tests/common/samefile_wordesc.sh
new file mode 100644
index 0000000..b5d158f
--- /dev/null
+++ b/tests/common/samefile_wordesc.sh
@@ -0,0 +1,4 @@
+# Regression test: don't abort on incomplete UTF-8 sequences
+export LC_ALL=$(locale -a | grep -Ei 'utf-?8$' | head -n1)
+test -n "$LC_ALL" || skip
+! invoke_bfs -samefile $'\xFA\xFA'
diff --git a/tests/common/size_big.out b/tests/common/size_big.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/common/size_big.out
diff --git a/tests/common/size_big.sh b/tests/common/size_big.sh
new file mode 100644
index 0000000..6c100eb
--- /dev/null
+++ b/tests/common/size_big.sh
@@ -0,0 +1 @@
+bfs_diff basic -size 9223372036854775807