diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-10-19 10:29:05 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-10-19 11:50:03 -0400 |
commit | 3b387d81e63893ed3fe3b45e3721fbcfb1c5dde0 (patch) | |
tree | 513c32eda43d92a8ed977f394492ba198bba1f3b /tests/common | |
parent | e5972621ffa8864b18d3e303ac714fdbe231be74 (diff) |
tests: Split test cases into separate files
Diffstat (limited to 'tests/common')
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 |