summaryrefslogtreecommitdiffstats
path: root/tests/common
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-10-19 10:29:05 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-10-19 11:50:03 -0400
commit3b387d81e63893ed3fe3b45e3721fbcfb1c5dde0 (patch)
tree513c32eda43d92a8ed977f394492ba198bba1f3b /tests/common
parente5972621ffa8864b18d3e303ac714fdbe231be74 (diff)
tests: Split test cases into separate files
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.sh15
-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.sh7
-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/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.sh5
-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.sh7
-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.sh12
-rw-r--r--tests/common/inum_mount.out1
-rw-r--r--tests/common/inum_mount.sh12
-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/mindepth.out18
-rw-r--r--tests/common/mindepth.sh1
-rw-r--r--tests/common/mount.out4
-rw-r--r--tests/common/mount.sh13
-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.sh1
-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/size_big.out0
-rw-r--r--tests/common/size_big.sh1
122 files changed, 433 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..cfb15a8
--- /dev/null
+++ b/tests/common/L_ilname.sh
@@ -0,0 +1,2 @@
+skip_unless invoke_bfs -quit -ilname PATTERN
+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..d886791
--- /dev/null
+++ b/tests/common/L_ls.sh
@@ -0,0 +1 @@
+invoke_bfs -L rainbow -ls >scratch/L_ls.out
diff --git a/tests/common/L_mount.out b/tests/common/L_mount.out
new file mode 100644
index 0000000..2e80082
--- /dev/null
+++ b/tests/common/L_mount.out
@@ -0,0 +1,5 @@
+scratch
+scratch/foo
+scratch/foo/bar
+scratch/foo/qux
+scratch/mnt
diff --git a/tests/common/L_mount.sh b/tests/common/L_mount.sh
new file mode 100644
index 0000000..d43f95a
--- /dev/null
+++ b/tests/common/L_mount.sh
@@ -0,0 +1,15 @@
+skip_unless test "$SUDO"
+skip_if test "$UNAME" = "Darwin"
+
+rm -rf scratch/*
+mkdir scratch/{foo,mnt}
+sudo mount -t tmpfs tmpfs scratch/mnt
+ln -s ../mnt scratch/foo/bar
+$TOUCH scratch/mnt/baz
+ln -s ../mnt/baz scratch/foo/qux
+
+bfs_diff -L scratch -mount
+ret=$?
+
+sudo umount scratch/mnt
+return $ret
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