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/bfs | |
parent | e5972621ffa8864b18d3e303ac714fdbe231be74 (diff) | |
download | bfs-3b387d81e63893ed3fe3b45e3721fbcfb1c5dde0.tar.xz |
tests: Split test cases into separate files
Diffstat (limited to 'tests/bfs')
190 files changed, 1359 insertions, 0 deletions
diff --git a/tests/bfs/D_all.out b/tests/bfs/D_all.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/D_all.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/bfs/D_all.sh b/tests/bfs/D_all.sh new file mode 100644 index 0000000..170698a --- /dev/null +++ b/tests/bfs/D_all.sh @@ -0,0 +1 @@ +bfs_diff -D all basic diff --git a/tests/bfs/D_multi.out b/tests/bfs/D_multi.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/D_multi.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/bfs/D_multi.sh b/tests/bfs/D_multi.sh new file mode 100644 index 0000000..08a8ca6 --- /dev/null +++ b/tests/bfs/D_multi.sh @@ -0,0 +1 @@ +bfs_diff -D opt,tree,unknown basic diff --git a/tests/bfs/L_capable.out b/tests/bfs/L_capable.out new file mode 100644 index 0000000..e5ba3c7 --- /dev/null +++ b/tests/bfs/L_capable.out @@ -0,0 +1,2 @@ +scratch/capable +scratch/link diff --git a/tests/bfs/L_capable.sh b/tests/bfs/L_capable.sh new file mode 100644 index 0000000..e1806b7 --- /dev/null +++ b/tests/bfs/L_capable.sh @@ -0,0 +1,12 @@ +skip_unless test "$SUDO" +skip_unless test "$UNAME" = "Linux" + +rm -rf scratch/* + +skip_unless invoke_bfs scratch -quit -capable + +$TOUCH scratch/{normal,capable} +sudo setcap all+ep scratch/capable +ln -s capable scratch/link + +bfs_diff -L scratch -capable diff --git a/tests/bfs/L_unique.out b/tests/bfs/L_unique.out new file mode 100644 index 0000000..c94c48e --- /dev/null +++ b/tests/bfs/L_unique.out @@ -0,0 +1 @@ +links/file diff --git a/tests/bfs/L_unique.sh b/tests/bfs/L_unique.sh new file mode 100644 index 0000000..c804526 --- /dev/null +++ b/tests/bfs/L_unique.sh @@ -0,0 +1 @@ +bfs_diff -L links/{file,symlink,hardlink} -unique diff --git a/tests/bfs/L_unique_depth.out b/tests/bfs/L_unique_depth.out new file mode 100644 index 0000000..dad0a98 --- /dev/null +++ b/tests/bfs/L_unique_depth.out @@ -0,0 +1,3 @@ +loops/deeply/nested +loops/deeply/nested/dir +loops/deeply/nested/loop diff --git a/tests/bfs/L_unique_depth.sh b/tests/bfs/L_unique_depth.sh new file mode 100644 index 0000000..fb9aca1 --- /dev/null +++ b/tests/bfs/L_unique_depth.sh @@ -0,0 +1 @@ +bfs_diff -L loops/deeply/nested -unique -depth diff --git a/tests/bfs/L_unique_loops.out b/tests/bfs/L_unique_loops.out new file mode 100644 index 0000000..dad0a98 --- /dev/null +++ b/tests/bfs/L_unique_loops.out @@ -0,0 +1,3 @@ +loops/deeply/nested +loops/deeply/nested/dir +loops/deeply/nested/loop diff --git a/tests/bfs/L_unique_loops.sh b/tests/bfs/L_unique_loops.sh new file mode 100644 index 0000000..2bdd94e --- /dev/null +++ b/tests/bfs/L_unique_loops.sh @@ -0,0 +1 @@ +bfs_diff -L loops/deeply/nested -unique diff --git a/tests/bfs/O0.out b/tests/bfs/O0.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/O0.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/bfs/O0.sh b/tests/bfs/O0.sh new file mode 100644 index 0000000..0f92d71 --- /dev/null +++ b/tests/bfs/O0.sh @@ -0,0 +1 @@ +bfs_diff -O0 basic -not \( -type f -not -type f \) diff --git a/tests/bfs/O1.out b/tests/bfs/O1.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/O1.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/bfs/O1.sh b/tests/bfs/O1.sh new file mode 100644 index 0000000..924b410 --- /dev/null +++ b/tests/bfs/O1.sh @@ -0,0 +1 @@ +bfs_diff -O1 basic -not \( -type f -not -type f \) diff --git a/tests/bfs/O2.out b/tests/bfs/O2.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/O2.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/bfs/O2.sh b/tests/bfs/O2.sh new file mode 100644 index 0000000..9382456 --- /dev/null +++ b/tests/bfs/O2.sh @@ -0,0 +1 @@ +bfs_diff -O2 basic -not \( -type f -not -type f \) diff --git a/tests/bfs/O3.out b/tests/bfs/O3.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/O3.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/bfs/O3.sh b/tests/bfs/O3.sh new file mode 100644 index 0000000..5bdf2bc --- /dev/null +++ b/tests/bfs/O3.sh @@ -0,0 +1 @@ +bfs_diff -O3 basic -not \( -type f -not -type f \) diff --git a/tests/bfs/Ofast.out b/tests/bfs/Ofast.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/Ofast.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/bfs/Ofast.sh b/tests/bfs/Ofast.sh new file mode 100644 index 0000000..87c1d8d --- /dev/null +++ b/tests/bfs/Ofast.sh @@ -0,0 +1 @@ +bfs_diff -Ofast basic -not \( -xtype f -not -xtype f \) diff --git a/tests/bfs/S_bfs.out b/tests/bfs/S_bfs.out new file mode 100644 index 0000000..bb3cd8d --- /dev/null +++ b/tests/bfs/S_bfs.out @@ -0,0 +1,19 @@ +basic +basic/a +basic/b +basic/c +basic/e +basic/g +basic/i +basic/j +basic/k +basic/l +basic/c/d +basic/e/f +basic/g/h +basic/j/foo +basic/k/foo +basic/l/foo +basic/k/foo/bar +basic/l/foo/bar +basic/l/foo/bar/baz diff --git a/tests/bfs/S_bfs.sh b/tests/bfs/S_bfs.sh new file mode 100644 index 0000000..76976de --- /dev/null +++ b/tests/bfs/S_bfs.sh @@ -0,0 +1,2 @@ +invoke_bfs -S bfs -s basic >"$OUT" +diff_output diff --git a/tests/bfs/S_dfs.out b/tests/bfs/S_dfs.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/S_dfs.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/bfs/S_dfs.sh b/tests/bfs/S_dfs.sh new file mode 100644 index 0000000..7dd7a46 --- /dev/null +++ b/tests/bfs/S_dfs.sh @@ -0,0 +1,2 @@ +invoke_bfs -S dfs -s basic >"$OUT" +diff_output diff --git a/tests/bfs/S_ids.out b/tests/bfs/S_ids.out new file mode 100644 index 0000000..bb3cd8d --- /dev/null +++ b/tests/bfs/S_ids.out @@ -0,0 +1,19 @@ +basic +basic/a +basic/b +basic/c +basic/e +basic/g +basic/i +basic/j +basic/k +basic/l +basic/c/d +basic/e/f +basic/g/h +basic/j/foo +basic/k/foo +basic/l/foo +basic/k/foo/bar +basic/l/foo/bar +basic/l/foo/bar/baz diff --git a/tests/bfs/S_ids.sh b/tests/bfs/S_ids.sh new file mode 100644 index 0000000..3995cf0 --- /dev/null +++ b/tests/bfs/S_ids.sh @@ -0,0 +1,2 @@ +invoke_bfs -S ids -s basic >"$OUT" +diff_output diff --git a/tests/bfs/and_incomplete.sh b/tests/bfs/and_incomplete.sh new file mode 100644 index 0000000..f7bc2c3 --- /dev/null +++ b/tests/bfs/and_incomplete.sh @@ -0,0 +1 @@ +fail invoke_bfs -print -a diff --git a/tests/bfs/capable.out b/tests/bfs/capable.out new file mode 100644 index 0000000..78b5bd9 --- /dev/null +++ b/tests/bfs/capable.out @@ -0,0 +1 @@ +scratch/capable diff --git a/tests/bfs/capable.sh b/tests/bfs/capable.sh new file mode 100644 index 0000000..964f37f --- /dev/null +++ b/tests/bfs/capable.sh @@ -0,0 +1,12 @@ +skip_unless test "$SUDO" +skip_unless test "$UNAME" = "Linux" + +rm -rf scratch/* + +skip_unless invoke_bfs scratch -quit -capable + +$TOUCH scratch/{normal,capable} +sudo setcap all+ep scratch/capable +ln -s capable scratch/link + +bfs_diff scratch -capable diff --git a/tests/bfs/color.out b/tests/bfs/color.out new file mode 100644 index 0000000..77fc8a8 --- /dev/null +++ b/tests/bfs/color.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color.sh b/tests/bfs/color.sh new file mode 100644 index 0000000..23f05a3 --- /dev/null +++ b/tests/bfs/color.sh @@ -0,0 +1 @@ +bfs_diff rainbow -color diff --git a/tests/bfs/color_L.out b/tests/bfs/color_L.out new file mode 100644 index 0000000..b60dd4a --- /dev/null +++ b/tests/bfs/color_L.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;33mchardev_link[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mlink.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_L.sh b/tests/bfs/color_L.sh new file mode 100644 index 0000000..823db62 --- /dev/null +++ b/tests/bfs/color_L.sh @@ -0,0 +1 @@ +bfs_diff -L rainbow -color diff --git a/tests/bfs/color_L_ln_target.out b/tests/bfs/color_L_ln_target.out new file mode 100644 index 0000000..cd4ec5e --- /dev/null +++ b/tests/bfs/color_L_ln_target.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;31mbroken[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;33mchardev_link[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mlink.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_L_ln_target.sh b/tests/bfs/color_L_ln_target.sh new file mode 100644 index 0000000..cc5991d --- /dev/null +++ b/tests/bfs/color_L_ln_target.sh @@ -0,0 +1 @@ +LS_COLORS="ln=target:or=01;31:mi=01;33:" bfs_diff -L rainbow -color diff --git a/tests/bfs/color_L_no_stat.out b/tests/bfs/color_L_no_stat.out new file mode 100644 index 0000000..c0bb1be --- /dev/null +++ b/tests/bfs/color_L_no_stat.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;33mchardev_link[0m +[01;34mrainbow/[0m[01;34mow[0m +[01;34mrainbow/[0m[01;34msticky[0m +[01;34mrainbow/[0m[01;34msticky_ow[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01mfile.txt[0m +[01;34mrainbow/[0m[01mlink.txt[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0mexec.sh +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0msgid +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz +[01;34mrainbow/[0msugid +[01;34mrainbow/[0msuid diff --git a/tests/bfs/color_L_no_stat.sh b/tests/bfs/color_L_no_stat.sh new file mode 100644 index 0000000..0a2caf0 --- /dev/null +++ b/tests/bfs/color_L_no_stat.sh @@ -0,0 +1 @@ +LS_COLORS="mh=0:ex=0:sg=0:su=0:st=0:ow=0:tw=0:*.txt=01:" bfs_diff -L rainbow -color diff --git a/tests/bfs/color_escapes.out b/tests/bfs/color_escapes.out new file mode 100644 index 0000000..b71e138 --- /dev/null +++ b/tests/bfs/color_escapes.out @@ -0,0 +1,20 @@ +[01;34m:rainbow[m +[01;34m:rainbow/[m[01;32m:exec.sh[m +[01;34m:rainbow/[m[01;35m:socket[m +[01;34m:rainbow/[m[01;36m:broken[m +[01;34m:rainbow/[m[01;36m:chardev_link[m +[01;34m:rainbow/[m[01;36m:link.txt[m +[01;34m:rainbow/[m[30;42m:sticky_ow[m +[01;34m:rainbow/[m[30;43m:sgid[m +[01;34m:rainbow/[m[33m:pipe[m +[01;34m:rainbow/[m[34;42m:ow[m +[01;34m:rainbow/[m[37;41m:sugid[m +[01;34m:rainbow/[m[37;41m:suid[m +[01;34m:rainbow/[m[37;44m:sticky[m +[01;34m:rainbow/[mfile.dat +[01;34m:rainbow/[mfile.txt +[01;34m:rainbow/[mmh1 +[01;34m:rainbow/[mmh2 +[01;34m:rainbow/[mstar.gz +[01;34m:rainbow/[mstar.tar +[01;34m:rainbow/[mstar.tar.gz diff --git a/tests/bfs/color_escapes.sh b/tests/bfs/color_escapes.sh new file mode 100644 index 0000000..eb5817f --- /dev/null +++ b/tests/bfs/color_escapes.sh @@ -0,0 +1 @@ +LS_COLORS="lc=\e[:rc=\155\::ec=^[\x5B\x6d:" bfs_diff rainbow -color diff --git a/tests/bfs/color_ext.out b/tests/bfs/color_ext.out new file mode 100644 index 0000000..cf26e73 --- /dev/null +++ b/tests/bfs/color_ext.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[01mfile.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_ext.sh b/tests/bfs/color_ext.sh new file mode 100644 index 0000000..c9f6d46 --- /dev/null +++ b/tests/bfs/color_ext.sh @@ -0,0 +1 @@ +LS_COLORS="*.txt=01:" bfs_diff rainbow -color diff --git a/tests/bfs/color_ext0.out b/tests/bfs/color_ext0.out new file mode 100644 index 0000000..e764a6b --- /dev/null +++ b/tests/bfs/color_ext0.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[00mfile.txt[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_ext0.sh b/tests/bfs/color_ext0.sh new file mode 100644 index 0000000..371a9c5 --- /dev/null +++ b/tests/bfs/color_ext0.sh @@ -0,0 +1 @@ +LS_COLORS="*.txt=00:" bfs_diff rainbow -color diff --git a/tests/bfs/color_ext_override.out b/tests/bfs/color_ext_override.out new file mode 100644 index 0000000..1377b65 --- /dev/null +++ b/tests/bfs/color_ext_override.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;32mstar.tar[0m +[01;34mrainbow/[0m[01;33mstar.gz[0m +[01;34mrainbow/[0m[01;33mstar.tar.gz[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 diff --git a/tests/bfs/color_ext_override.sh b/tests/bfs/color_ext_override.sh new file mode 100644 index 0000000..ac4c7fb --- /dev/null +++ b/tests/bfs/color_ext_override.sh @@ -0,0 +1 @@ +LS_COLORS="*.tar.gz=01;31:*.TAR=01;32:*.gz=01;33:" bfs_diff rainbow -color diff --git a/tests/bfs/color_ext_underride.out b/tests/bfs/color_ext_underride.out new file mode 100644 index 0000000..787248a --- /dev/null +++ b/tests/bfs/color_ext_underride.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;31mstar.tar.gz[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;32mstar.tar[0m +[01;34mrainbow/[0m[01;33mstar.gz[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 diff --git a/tests/bfs/color_ext_underride.sh b/tests/bfs/color_ext_underride.sh new file mode 100644 index 0000000..fb12e01 --- /dev/null +++ b/tests/bfs/color_ext_underride.sh @@ -0,0 +1 @@ +LS_COLORS="*.gz=01;33:*.TAR=01;32:*.tar.gz=01;31:" bfs_diff rainbow -color diff --git a/tests/bfs/color_ln_target.out b/tests/bfs/color_ln_target.out new file mode 100644 index 0000000..cd4ec5e --- /dev/null +++ b/tests/bfs/color_ln_target.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;31mbroken[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;33mchardev_link[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mlink.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_ln_target.sh b/tests/bfs/color_ln_target.sh new file mode 100644 index 0000000..707d25e --- /dev/null +++ b/tests/bfs/color_ln_target.sh @@ -0,0 +1 @@ +LS_COLORS="ln=target:or=01;31:mi=01;33:" bfs_diff rainbow -color diff --git a/tests/bfs/color_ls.out b/tests/bfs/color_ls.out new file mode 100644 index 0000000..b08d894 --- /dev/null +++ b/tests/bfs/color_ls.out @@ -0,0 +1,12 @@ +[01;31mscratch/foo/[0m[01;31mbar[0m +[01;31mscratch/foo/[0m[01;31mbar[0m +[01;34m/[0m[01;31m__bfs__/[0m[01;31mnowhere[0m +[01;34m/[0m[01;31m__bfs__/[0m[01;31mnowhere[0m +[01;34mfoo/bar/[0m[01;31mbaz/[0m[01;31mqux[0m +[01;34mfoo/bar/[0m[01;31mbaz/[0m[01;31mqux[0m +[01;34mfoo/bar/[0m[01;31mnowhere[0m +[01;34mfoo/bar/[0m[01;31mnowhere[0m +[01;34mfoo/bar/[0m[01;31mnowhere/[0m[01;31mnothing[0m +[01;34mfoo/bar/[0m[01;31mnowhere/[0m[01;31mnothing[0m +[01;34mfoo/bar/[0mbaz +[01;34mfoo/bar/[0mbaz diff --git a/tests/bfs/color_ls.sh b/tests/bfs/color_ls.sh new file mode 100644 index 0000000..79e1db2 --- /dev/null +++ b/tests/bfs/color_ls.sh @@ -0,0 +1,15 @@ +rm -rf scratch/* +touchp scratch/foo/bar/baz +ln -s foo/bar/baz scratch/link +ln -s foo/bar/nowhere scratch/broken +ln -s foo/bar/nowhere/nothing scratch/nested +ln -s foo/bar/baz/qux scratch/notdir +ln -s scratch/foo/bar scratch/relative +mkdir scratch/__bfs__ +ln -s /__bfs__/nowhere scratch/absolute + +LS_COLORS="or=01;31:" invoke_bfs scratch/{,link,broken,nested,notdir,relative,absolute} -color -type l -ls \ + | sed 's/.* -> //' \ + | sort >"$OUT" + +diff_output diff --git a/tests/bfs/color_mh.out b/tests/bfs/color_mh.out new file mode 100644 index 0000000..757a6a1 --- /dev/null +++ b/tests/bfs/color_mh.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[01mmh1[0m +[01;34mrainbow/[0m[01mmh2[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_mh.sh b/tests/bfs/color_mh.sh new file mode 100644 index 0000000..aff1845 --- /dev/null +++ b/tests/bfs/color_mh.sh @@ -0,0 +1 @@ +LS_COLORS="mh=01:" bfs_diff rainbow -color diff --git a/tests/bfs/color_mh0.out b/tests/bfs/color_mh0.out new file mode 100644 index 0000000..77fc8a8 --- /dev/null +++ b/tests/bfs/color_mh0.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_mh0.sh b/tests/bfs/color_mh0.sh new file mode 100644 index 0000000..7de880d --- /dev/null +++ b/tests/bfs/color_mh0.sh @@ -0,0 +1 @@ +LS_COLORS="mh=00:" bfs_diff rainbow -color diff --git a/tests/bfs/color_mi.out b/tests/bfs/color_mi.out new file mode 100644 index 0000000..77fc8a8 --- /dev/null +++ b/tests/bfs/color_mi.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_mi.sh b/tests/bfs/color_mi.sh new file mode 100644 index 0000000..06dd8c6 --- /dev/null +++ b/tests/bfs/color_mi.sh @@ -0,0 +1 @@ +LS_COLORS="mi=01:" bfs_diff rainbow -color diff --git a/tests/bfs/color_missing_colon.out b/tests/bfs/color_missing_colon.out new file mode 100644 index 0000000..cf26e73 --- /dev/null +++ b/tests/bfs/color_missing_colon.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[01mfile.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_missing_colon.sh b/tests/bfs/color_missing_colon.sh new file mode 100644 index 0000000..afa3763 --- /dev/null +++ b/tests/bfs/color_missing_colon.sh @@ -0,0 +1 @@ +LS_COLORS="*.txt=01" bfs_diff rainbow -color diff --git a/tests/bfs/color_no_stat.out b/tests/bfs/color_no_stat.out new file mode 100644 index 0000000..1fc5324 --- /dev/null +++ b/tests/bfs/color_no_stat.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;34mow[0m +[01;34mrainbow/[0m[01;34msticky[0m +[01;34mrainbow/[0m[01;34msticky_ow[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[01mfile.txt[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0mexec.sh +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0msgid +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz +[01;34mrainbow/[0msugid +[01;34mrainbow/[0msuid diff --git a/tests/bfs/color_no_stat.sh b/tests/bfs/color_no_stat.sh new file mode 100644 index 0000000..0bc2520 --- /dev/null +++ b/tests/bfs/color_no_stat.sh @@ -0,0 +1 @@ +LS_COLORS="mh=0:ex=0:sg=0:su=0:st=0:ow=0:tw=0:*.txt=01:" bfs_diff rainbow -color diff --git a/tests/bfs/color_nul.out b/tests/bfs/color_nul.out Binary files differnew file mode 100644 index 0000000..c328f82 --- /dev/null +++ b/tests/bfs/color_nul.out diff --git a/tests/bfs/color_nul.sh b/tests/bfs/color_nul.sh new file mode 100644 index 0000000..4979569 --- /dev/null +++ b/tests/bfs/color_nul.sh @@ -0,0 +1,2 @@ +LS_COLORS="ec=\33[m\0:" invoke_bfs rainbow -color -maxdepth 0 >"$OUT" +diff_output diff --git a/tests/bfs/color_or.out b/tests/bfs/color_or.out new file mode 100644 index 0000000..9e1fe5c --- /dev/null +++ b/tests/bfs/color_or.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[01mbroken[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_or.sh b/tests/bfs/color_or.sh new file mode 100644 index 0000000..bccb400 --- /dev/null +++ b/tests/bfs/color_or.sh @@ -0,0 +1 @@ +LS_COLORS="or=01:" bfs_diff rainbow -color diff --git a/tests/bfs/color_or0_mi.out b/tests/bfs/color_or0_mi.out new file mode 100644 index 0000000..77fc8a8 --- /dev/null +++ b/tests/bfs/color_or0_mi.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_or0_mi.sh b/tests/bfs/color_or0_mi.sh new file mode 100644 index 0000000..a362cf1 --- /dev/null +++ b/tests/bfs/color_or0_mi.sh @@ -0,0 +1 @@ +LS_COLORS="or=00:mi=01;33:" bfs_diff rainbow -color diff --git a/tests/bfs/color_or0_mi0.out b/tests/bfs/color_or0_mi0.out new file mode 100644 index 0000000..77fc8a8 --- /dev/null +++ b/tests/bfs/color_or0_mi0.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_or0_mi0.sh b/tests/bfs/color_or0_mi0.sh new file mode 100644 index 0000000..d7c00f6 --- /dev/null +++ b/tests/bfs/color_or0_mi0.sh @@ -0,0 +1 @@ +LS_COLORS="or=00:mi=00:" bfs_diff rainbow -color diff --git a/tests/bfs/color_or_mi.out b/tests/bfs/color_or_mi.out new file mode 100644 index 0000000..5667f56 --- /dev/null +++ b/tests/bfs/color_or_mi.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;31mbroken[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_or_mi.sh b/tests/bfs/color_or_mi.sh new file mode 100644 index 0000000..467ce6b --- /dev/null +++ b/tests/bfs/color_or_mi.sh @@ -0,0 +1 @@ +LS_COLORS="or=01;31:mi=01;33:" bfs_diff rainbow -color diff --git a/tests/bfs/color_or_mi0.out b/tests/bfs/color_or_mi0.out new file mode 100644 index 0000000..5667f56 --- /dev/null +++ b/tests/bfs/color_or_mi0.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;31mbroken[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_or_mi0.sh b/tests/bfs/color_or_mi0.sh new file mode 100644 index 0000000..a9c36bf --- /dev/null +++ b/tests/bfs/color_or_mi0.sh @@ -0,0 +1 @@ +LS_COLORS="or=01;31:mi=00:" bfs_diff rainbow -color diff --git a/tests/bfs/color_rs_lc_rc_ec.out b/tests/bfs/color_rs_lc_rc_ec.out new file mode 100644 index 0000000..d39bbe7 --- /dev/null +++ b/tests/bfs/color_rs_lc_rc_ec.out @@ -0,0 +1,20 @@ +LC01;34RCrainbow/ECLC01;32RCexec.shEC +LC01;34RCrainbow/ECLC01;35RCsocketEC +LC01;34RCrainbow/ECLC01;36RCbrokenEC +LC01;34RCrainbow/ECLC01;36RCchardev_linkEC +LC01;34RCrainbow/ECLC01;36RClink.txtEC +LC01;34RCrainbow/ECLC30;42RCsticky_owEC +LC01;34RCrainbow/ECLC30;43RCsgidEC +LC01;34RCrainbow/ECLC33RCpipeEC +LC01;34RCrainbow/ECLC34;42RCowEC +LC01;34RCrainbow/ECLC37;41RCsugidEC +LC01;34RCrainbow/ECLC37;41RCsuidEC +LC01;34RCrainbow/ECLC37;44RCstickyEC +LC01;34RCrainbow/ECfile.dat +LC01;34RCrainbow/ECfile.txt +LC01;34RCrainbow/ECmh1 +LC01;34RCrainbow/ECmh2 +LC01;34RCrainbow/ECstar.gz +LC01;34RCrainbow/ECstar.tar +LC01;34RCrainbow/ECstar.tar.gz +LC01;34RCrainbowEC diff --git a/tests/bfs/color_rs_lc_rc_ec.sh b/tests/bfs/color_rs_lc_rc_ec.sh new file mode 100644 index 0000000..467b2da --- /dev/null +++ b/tests/bfs/color_rs_lc_rc_ec.sh @@ -0,0 +1 @@ +LS_COLORS="rs=RS:lc=LC:rc=RC:ec=EC:" bfs_diff rainbow -color diff --git a/tests/bfs/color_st0_tw0_ow.out b/tests/bfs/color_st0_tw0_ow.out new file mode 100644 index 0000000..9a47ef2 --- /dev/null +++ b/tests/bfs/color_st0_tw0_ow.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;34msticky[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[34;42msticky_ow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_st0_tw0_ow.sh b/tests/bfs/color_st0_tw0_ow.sh new file mode 100644 index 0000000..8e2b8e3 --- /dev/null +++ b/tests/bfs/color_st0_tw0_ow.sh @@ -0,0 +1 @@ +LS_COLORS="st=00:tw=00:ow=34;42:" bfs_diff rainbow -color diff --git a/tests/bfs/color_st0_tw0_ow0.out b/tests/bfs/color_st0_tw0_ow0.out new file mode 100644 index 0000000..2b86fe4 --- /dev/null +++ b/tests/bfs/color_st0_tw0_ow0.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;34mow[0m +[01;34mrainbow/[0m[01;34msticky[0m +[01;34mrainbow/[0m[01;34msticky_ow[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_st0_tw0_ow0.sh b/tests/bfs/color_st0_tw0_ow0.sh new file mode 100644 index 0000000..c5d5fe7 --- /dev/null +++ b/tests/bfs/color_st0_tw0_ow0.sh @@ -0,0 +1 @@ +LS_COLORS="st=00:tw=00:ow=00:" bfs_diff rainbow -color diff --git a/tests/bfs/color_st0_tw_ow.out b/tests/bfs/color_st0_tw_ow.out new file mode 100644 index 0000000..42549a1 --- /dev/null +++ b/tests/bfs/color_st0_tw_ow.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;34msticky[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[40;32msticky_ow[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_st0_tw_ow.sh b/tests/bfs/color_st0_tw_ow.sh new file mode 100644 index 0000000..8fd9605 --- /dev/null +++ b/tests/bfs/color_st0_tw_ow.sh @@ -0,0 +1 @@ +LS_COLORS="st=00:tw=40;32:ow=34;42:" bfs_diff rainbow -color diff --git a/tests/bfs/color_st0_tw_ow0.out b/tests/bfs/color_st0_tw_ow0.out new file mode 100644 index 0000000..535b8ae --- /dev/null +++ b/tests/bfs/color_st0_tw_ow0.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;34mow[0m +[01;34mrainbow/[0m[01;34msticky[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[40;32msticky_ow[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_st0_tw_ow0.sh b/tests/bfs/color_st0_tw_ow0.sh new file mode 100644 index 0000000..68c63dc --- /dev/null +++ b/tests/bfs/color_st0_tw_ow0.sh @@ -0,0 +1 @@ +LS_COLORS="st=00:tw=40;32:ow=00:" bfs_diff rainbow -color diff --git a/tests/bfs/color_st_tw0_ow.out b/tests/bfs/color_st_tw0_ow.out new file mode 100644 index 0000000..c9a86f4 --- /dev/null +++ b/tests/bfs/color_st_tw0_ow.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[34;42msticky_ow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_st_tw0_ow.sh b/tests/bfs/color_st_tw0_ow.sh new file mode 100644 index 0000000..be16251 --- /dev/null +++ b/tests/bfs/color_st_tw0_ow.sh @@ -0,0 +1 @@ +LS_COLORS="st=37;44:tw=00:ow=34;42:" bfs_diff rainbow -color diff --git a/tests/bfs/color_st_tw0_ow0.out b/tests/bfs/color_st_tw0_ow0.out new file mode 100644 index 0000000..2d94f3a --- /dev/null +++ b/tests/bfs/color_st_tw0_ow0.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;34mow[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0m[37;44msticky_ow[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_st_tw0_ow0.sh b/tests/bfs/color_st_tw0_ow0.sh new file mode 100644 index 0000000..f869e7c --- /dev/null +++ b/tests/bfs/color_st_tw0_ow0.sh @@ -0,0 +1 @@ +LS_COLORS="st=37;44:tw=00:ow=00:" bfs_diff rainbow -color diff --git a/tests/bfs/color_st_tw_ow0.out b/tests/bfs/color_st_tw_ow0.out new file mode 100644 index 0000000..317ef90 --- /dev/null +++ b/tests/bfs/color_st_tw_ow0.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;34mow[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0m[40;32msticky_ow[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_st_tw_ow0.sh b/tests/bfs/color_st_tw_ow0.sh new file mode 100644 index 0000000..99a17a6 --- /dev/null +++ b/tests/bfs/color_st_tw_ow0.sh @@ -0,0 +1 @@ +LS_COLORS="st=37;44:tw=40;32:ow=00:" bfs_diff rainbow -color diff --git a/tests/bfs/color_star.out b/tests/bfs/color_star.out new file mode 100644 index 0000000..77fc8a8 --- /dev/null +++ b/tests/bfs/color_star.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_star.sh b/tests/bfs/color_star.sh new file mode 100644 index 0000000..3ada4fd --- /dev/null +++ b/tests/bfs/color_star.sh @@ -0,0 +1,2 @@ +# Regression test: don't segfault on LS_COLORS="*" +LS_COLORS="*" bfs_diff rainbow -color diff --git a/tests/bfs/color_su0_sg.out b/tests/bfs/color_su0_sg.out new file mode 100644 index 0000000..8b8c8b8 --- /dev/null +++ b/tests/bfs/color_su0_sg.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[30;43msgid[0m +[01;34mrainbow/[0m[30;43msugid[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz +[01;34mrainbow/[0msuid diff --git a/tests/bfs/color_su0_sg.sh b/tests/bfs/color_su0_sg.sh new file mode 100644 index 0000000..f5f57b4 --- /dev/null +++ b/tests/bfs/color_su0_sg.sh @@ -0,0 +1 @@ +LS_COLORS="su=00:sg=30;43:" bfs_diff rainbow -color diff --git a/tests/bfs/color_su0_sg0.out b/tests/bfs/color_su0_sg0.out new file mode 100644 index 0000000..0cd5f9a --- /dev/null +++ b/tests/bfs/color_su0_sg0.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0msgid +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz +[01;34mrainbow/[0msugid +[01;34mrainbow/[0msuid diff --git a/tests/bfs/color_su0_sg0.sh b/tests/bfs/color_su0_sg0.sh new file mode 100644 index 0000000..0198383 --- /dev/null +++ b/tests/bfs/color_su0_sg0.sh @@ -0,0 +1 @@ +LS_COLORS="su=00:sg=00:" bfs_diff rainbow -color diff --git a/tests/bfs/color_su_sg0.out b/tests/bfs/color_su_sg0.out new file mode 100644 index 0000000..a9e8c5d --- /dev/null +++ b/tests/bfs/color_su_sg0.out @@ -0,0 +1,20 @@ +[01;34mrainbow[0m +[01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34mrainbow/[0m[01;35msocket[0m +[01;34mrainbow/[0m[01;36mbroken[0m +[01;34mrainbow/[0m[01;36mchardev_link[0m +[01;34mrainbow/[0m[01;36mlink.txt[0m +[01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34mrainbow/[0m[33mpipe[0m +[01;34mrainbow/[0m[34;42mow[0m +[01;34mrainbow/[0m[37;41msugid[0m +[01;34mrainbow/[0m[37;41msuid[0m +[01;34mrainbow/[0m[37;44msticky[0m +[01;34mrainbow/[0mfile.dat +[01;34mrainbow/[0mfile.txt +[01;34mrainbow/[0mmh1 +[01;34mrainbow/[0mmh2 +[01;34mrainbow/[0msgid +[01;34mrainbow/[0mstar.gz +[01;34mrainbow/[0mstar.tar +[01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/color_su_sg0.sh b/tests/bfs/color_su_sg0.sh new file mode 100644 index 0000000..8dc6984 --- /dev/null +++ b/tests/bfs/color_su_sg0.sh @@ -0,0 +1 @@ +LS_COLORS="su=37;41:sg=00:" bfs_diff rainbow -color diff --git a/tests/bfs/comma_incomplete.sh b/tests/bfs/comma_incomplete.sh new file mode 100644 index 0000000..07cf505 --- /dev/null +++ b/tests/bfs/comma_incomplete.sh @@ -0,0 +1 @@ +fail invoke_bfs -print , diff --git a/tests/bfs/data_flow_hidden.out b/tests/bfs/data_flow_hidden.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/data_flow_hidden.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/bfs/data_flow_hidden.sh b/tests/bfs/data_flow_hidden.sh new file mode 100644 index 0000000..6afaab2 --- /dev/null +++ b/tests/bfs/data_flow_hidden.sh @@ -0,0 +1 @@ +bfs_diff basic \( -hidden -not -hidden \) -o \( -hidden -o -not -hidden \) diff --git a/tests/bfs/deep_strict.out b/tests/bfs/deep_strict.out new file mode 100644 index 0000000..c385fce --- /dev/null +++ b/tests/bfs/deep_strict.out @@ -0,0 +1,16 @@ +deep/0/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/1/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/2/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/3/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/4/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/5/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/6/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/7/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/8/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/9/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/A/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/B/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/C/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/D/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/E/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) +deep/F/.../0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE (4358) diff --git a/tests/bfs/deep_strict.sh b/tests/bfs/deep_strict.sh new file mode 100644 index 0000000..e057310 --- /dev/null +++ b/tests/bfs/deep_strict.sh @@ -0,0 +1,5 @@ +closefrom 4 + +# Not even enough fds to keep the root open +ulimit -n 7 +bfs_diff deep -type f -exec bash -c 'echo "${1:0:6}/.../${1##*/} (${#1})"' bash {} \; diff --git a/tests/bfs/exclude_depth.out b/tests/bfs/exclude_depth.out new file mode 100644 index 0000000..59e3c42 --- /dev/null +++ b/tests/bfs/exclude_depth.out @@ -0,0 +1,13 @@ +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/k +basic/l diff --git a/tests/bfs/exclude_depth.sh b/tests/bfs/exclude_depth.sh new file mode 100644 index 0000000..437b4dd --- /dev/null +++ b/tests/bfs/exclude_depth.sh @@ -0,0 +1 @@ +bfs_diff basic -depth -exclude -name foo diff --git a/tests/bfs/exclude_exclude.sh b/tests/bfs/exclude_exclude.sh new file mode 100644 index 0000000..c687623 --- /dev/null +++ b/tests/bfs/exclude_exclude.sh @@ -0,0 +1 @@ +fail invoke_bfs basic -exclude -exclude -name foo diff --git a/tests/bfs/exclude_mindepth.out b/tests/bfs/exclude_mindepth.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/bfs/exclude_mindepth.out diff --git a/tests/bfs/exclude_mindepth.sh b/tests/bfs/exclude_mindepth.sh new file mode 100644 index 0000000..c8f70f9 --- /dev/null +++ b/tests/bfs/exclude_mindepth.sh @@ -0,0 +1 @@ +bfs_diff basic -mindepth 3 -exclude -name foo diff --git a/tests/bfs/exclude_name.out b/tests/bfs/exclude_name.out new file mode 100644 index 0000000..59e3c42 --- /dev/null +++ b/tests/bfs/exclude_name.out @@ -0,0 +1,13 @@ +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/k +basic/l diff --git a/tests/bfs/exclude_name.sh b/tests/bfs/exclude_name.sh new file mode 100644 index 0000000..7cf9f33 --- /dev/null +++ b/tests/bfs/exclude_name.sh @@ -0,0 +1 @@ +bfs_diff basic -exclude -name foo diff --git a/tests/bfs/exclude_print.sh b/tests/bfs/exclude_print.sh new file mode 100644 index 0000000..52ff0fd --- /dev/null +++ b/tests/bfs/exclude_print.sh @@ -0,0 +1 @@ +fail invoke_bfs basic -exclude -print diff --git a/tests/bfs/exec_flush_fprint.out b/tests/bfs/exec_flush_fprint.out new file mode 100644 index 0000000..511198f --- /dev/null +++ b/tests/bfs/exec_flush_fprint.out @@ -0,0 +1 @@ +basic/a diff --git a/tests/bfs/exec_flush_fprint.sh b/tests/bfs/exec_flush_fprint.sh new file mode 100644 index 0000000..9756b6a --- /dev/null +++ b/tests/bfs/exec_flush_fprint.sh @@ -0,0 +1,3 @@ +# Even non-stdstreams should be flushed +rm -rf scratch/* +bfs_diff basic/a -fprint scratch/foo -exec cat scratch/foo \; diff --git a/tests/bfs/exec_flush_fprint_fail.sh b/tests/bfs/exec_flush_fprint_fail.sh new file mode 100644 index 0000000..5da944a --- /dev/null +++ b/tests/bfs/exec_flush_fprint_fail.sh @@ -0,0 +1,2 @@ +skip_unless test -e /dev/full +fail invoke_bfs basic/a -fprint /dev/full -exec true \; diff --git a/tests/bfs/execdir_plus.out b/tests/bfs/execdir_plus.out new file mode 100644 index 0000000..8866a8f --- /dev/null +++ b/tests/bfs/execdir_plus.out @@ -0,0 +1,11 @@ +./a ./b ./c ./e ./g ./i ./j ./k ./l +./bar +./bar +./basic +./baz +./d +./f +./foo +./foo +./foo +./h diff --git a/tests/bfs/execdir_plus.sh b/tests/bfs/execdir_plus.sh new file mode 100644 index 0000000..9ae7764 --- /dev/null +++ b/tests/bfs/execdir_plus.sh @@ -0,0 +1,7 @@ +tree=$(invoke_bfs -D tree 2>&1 -quit) + +if [[ "$tree" == *"-S dfs"* ]]; then + skip +fi + +bfs_diff basic -execdir "$TESTS/sort-args.sh" {} + diff --git a/tests/bfs/execdir_plus_nonexistent.out b/tests/bfs/execdir_plus_nonexistent.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/execdir_plus_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/bfs/execdir_plus_nonexistent.sh b/tests/bfs/execdir_plus_nonexistent.sh new file mode 100644 index 0000000..8436953 --- /dev/null +++ b/tests/bfs/execdir_plus_nonexistent.sh @@ -0,0 +1,5 @@ +stderr=$(invoke_bfs basic -execdir "$TESTS/nonexistent" {} + 2>&1 >/dev/null) +[ -n "$stderr" ] || return 1 + +bfs_diff basic -execdir "$TESTS/nonexistent" {} + -print +(($? == EX_BFS)) diff --git a/tests/bfs/expr_flag_path.out b/tests/bfs/expr_flag_path.out new file mode 100644 index 0000000..e67f10b --- /dev/null +++ b/tests/bfs/expr_flag_path.out @@ -0,0 +1,2 @@ +links/skip/broken +links/skip/link diff --git a/tests/bfs/expr_flag_path.sh b/tests/bfs/expr_flag_path.sh new file mode 100644 index 0000000..bb89d92 --- /dev/null +++ b/tests/bfs/expr_flag_path.sh @@ -0,0 +1 @@ +bfs_diff -type l -H links/skip diff --git a/tests/bfs/expr_path_flag.out b/tests/bfs/expr_path_flag.out new file mode 100644 index 0000000..e67f10b --- /dev/null +++ b/tests/bfs/expr_path_flag.out @@ -0,0 +1,2 @@ +links/skip/broken +links/skip/link diff --git a/tests/bfs/expr_path_flag.sh b/tests/bfs/expr_path_flag.sh new file mode 100644 index 0000000..818e5d1 --- /dev/null +++ b/tests/bfs/expr_path_flag.sh @@ -0,0 +1 @@ +bfs_diff -type l links/skip -H diff --git a/tests/bfs/flag_expr_path.out b/tests/bfs/flag_expr_path.out new file mode 100644 index 0000000..e67f10b --- /dev/null +++ b/tests/bfs/flag_expr_path.out @@ -0,0 +1,2 @@ +links/skip/broken +links/skip/link diff --git a/tests/bfs/flag_expr_path.sh b/tests/bfs/flag_expr_path.sh new file mode 100644 index 0000000..a414e10 --- /dev/null +++ b/tests/bfs/flag_expr_path.sh @@ -0,0 +1 @@ +bfs_diff -H -type l links/skip diff --git a/tests/bfs/fprint_duplicate_stdout.out b/tests/bfs/fprint_duplicate_stdout.out new file mode 100644 index 0000000..6c21751 --- /dev/null +++ b/tests/bfs/fprint_duplicate_stdout.out @@ -0,0 +1,38 @@ +basic +basic +basic/a +basic/a +basic/b +basic/b +basic/c +basic/c +basic/c/d +basic/c/d +basic/e +basic/e +basic/e/f +basic/e/f +basic/g +basic/g +basic/g/h +basic/g/h +basic/i +basic/i +basic/j +basic/j +basic/j/foo +basic/j/foo +basic/k +basic/k +basic/k/foo +basic/k/foo +basic/k/foo/bar +basic/k/foo/bar +basic/l +basic/l +basic/l/foo +basic/l/foo +basic/l/foo/bar +basic/l/foo/bar +basic/l/foo/bar/baz +basic/l/foo/bar/baz diff --git a/tests/bfs/fprint_duplicate_stdout.sh b/tests/bfs/fprint_duplicate_stdout.sh new file mode 100644 index 0000000..4e95e30 --- /dev/null +++ b/tests/bfs/fprint_duplicate_stdout.sh @@ -0,0 +1,3 @@ +invoke_bfs basic -fprint "$OUT" -print >"$OUT" +sort_output +diff_output diff --git a/tests/bfs/fprint_error_stderr.sh b/tests/bfs/fprint_error_stderr.sh new file mode 100644 index 0000000..427808f --- /dev/null +++ b/tests/bfs/fprint_error_stderr.sh @@ -0,0 +1,2 @@ +skip_unless test -e /dev/full +fail invoke_bfs basic -maxdepth 0 -fprint /dev/full 2>/dev/full diff --git a/tests/bfs/fprint_error_stdout.sh b/tests/bfs/fprint_error_stdout.sh new file mode 100644 index 0000000..fbdc1d0 --- /dev/null +++ b/tests/bfs/fprint_error_stdout.sh @@ -0,0 +1,2 @@ +skip_unless test -e /dev/full +fail invoke_bfs basic -maxdepth 0 -fprint /dev/full >/dev/full diff --git a/tests/bfs/help.sh b/tests/bfs/help.sh new file mode 100644 index 0000000..5e5c684 --- /dev/null +++ b/tests/bfs/help.sh @@ -0,0 +1,6 @@ +invoke_bfs -help | grep -E '\{...?\}' && return 1 +invoke_bfs -D help | grep -E '\{...?\}' && return 1 +invoke_bfs -S help | grep -E '\{...?\}' && return 1 +invoke_bfs -regextype help | grep -E '\{...?\}' && return 1 + +return 0 diff --git a/tests/bfs/hidden.out b/tests/bfs/hidden.out new file mode 100644 index 0000000..e65ede9 --- /dev/null +++ b/tests/bfs/hidden.out @@ -0,0 +1 @@ +weirdnames/... diff --git a/tests/bfs/hidden.sh b/tests/bfs/hidden.sh new file mode 100644 index 0000000..b0413c5 --- /dev/null +++ b/tests/bfs/hidden.sh @@ -0,0 +1 @@ +bfs_diff weirdnames -hidden diff --git a/tests/bfs/hidden_root.out b/tests/bfs/hidden_root.out new file mode 100644 index 0000000..8c1371b --- /dev/null +++ b/tests/bfs/hidden_root.out @@ -0,0 +1,5 @@ +... +.../../... +./... +./... +././... diff --git a/tests/bfs/hidden_root.sh b/tests/bfs/hidden_root.sh new file mode 100644 index 0000000..905c5b5 --- /dev/null +++ b/tests/bfs/hidden_root.sh @@ -0,0 +1,2 @@ +cd weirdnames +bfs_diff . ./. ... ./... .../.. -hidden diff --git a/tests/bfs/links_empty.sh b/tests/bfs/links_empty.sh new file mode 100644 index 0000000..34c7c25 --- /dev/null +++ b/tests/bfs/links_empty.sh @@ -0,0 +1 @@ +fail invoke_bfs links -links '' diff --git a/tests/bfs/links_invalid.sh b/tests/bfs/links_invalid.sh new file mode 100644 index 0000000..ff69fa6 --- /dev/null +++ b/tests/bfs/links_invalid.sh @@ -0,0 +1 @@ +fail invoke_bfs links -links ASDF diff --git a/tests/bfs/links_negative.sh b/tests/bfs/links_negative.sh new file mode 100644 index 0000000..b5d9c58 --- /dev/null +++ b/tests/bfs/links_negative.sh @@ -0,0 +1 @@ +fail invoke_bfs links -links +-1 diff --git a/tests/bfs/links_noarg.sh b/tests/bfs/links_noarg.sh new file mode 100644 index 0000000..5dede5f --- /dev/null +++ b/tests/bfs/links_noarg.sh @@ -0,0 +1 @@ +fail invoke_bfs links -links diff --git a/tests/bfs/newerma_nonexistent.sh b/tests/bfs/newerma_nonexistent.sh new file mode 100644 index 0000000..7f3695f --- /dev/null +++ b/tests/bfs/newerma_nonexistent.sh @@ -0,0 +1 @@ +fail invoke_bfs times -newerma basic/nonexistent diff --git a/tests/bfs/newermq.sh b/tests/bfs/newermq.sh new file mode 100644 index 0000000..2a22586 --- /dev/null +++ b/tests/bfs/newermq.sh @@ -0,0 +1 @@ +fail invoke_bfs times -newermq times/a diff --git a/tests/bfs/newermt_invalid.sh b/tests/bfs/newermt_invalid.sh new file mode 100644 index 0000000..61d2485 --- /dev/null +++ b/tests/bfs/newermt_invalid.sh @@ -0,0 +1 @@ +fail invoke_bfs times -newermt not_a_date_time diff --git a/tests/bfs/newerqm.sh b/tests/bfs/newerqm.sh new file mode 100644 index 0000000..da84350 --- /dev/null +++ b/tests/bfs/newerqm.sh @@ -0,0 +1 @@ +fail invoke_bfs times -newerqm times/a diff --git a/tests/bfs/nohidden.out b/tests/bfs/nohidden.out new file mode 100644 index 0000000..d3ec901 --- /dev/null +++ b/tests/bfs/nohidden.out @@ -0,0 +1,21 @@ +weirdnames +weirdnames/ +weirdnames/ /j +weirdnames/! +weirdnames/!- +weirdnames/!-/e +weirdnames/!/d +weirdnames/( +weirdnames/(- +weirdnames/(-/c +weirdnames/(/b +weirdnames/) +weirdnames/)/g +weirdnames/, +weirdnames/,/f +weirdnames/- +weirdnames/-/a +weirdnames/[ +weirdnames/[/k +weirdnames/\ +weirdnames/\/i diff --git a/tests/bfs/nohidden.sh b/tests/bfs/nohidden.sh new file mode 100644 index 0000000..e3a3e4a --- /dev/null +++ b/tests/bfs/nohidden.sh @@ -0,0 +1 @@ +bfs_diff weirdnames -nohidden diff --git a/tests/bfs/nohidden_depth.out b/tests/bfs/nohidden_depth.out new file mode 100644 index 0000000..d3ec901 --- /dev/null +++ b/tests/bfs/nohidden_depth.out @@ -0,0 +1,21 @@ +weirdnames +weirdnames/ +weirdnames/ /j +weirdnames/! +weirdnames/!- +weirdnames/!-/e +weirdnames/!/d +weirdnames/( +weirdnames/(- +weirdnames/(-/c +weirdnames/(/b +weirdnames/) +weirdnames/)/g +weirdnames/, +weirdnames/,/f +weirdnames/- +weirdnames/-/a +weirdnames/[ +weirdnames/[/k +weirdnames/\ +weirdnames/\/i diff --git a/tests/bfs/nohidden_depth.sh b/tests/bfs/nohidden_depth.sh new file mode 100644 index 0000000..9fd7017 --- /dev/null +++ b/tests/bfs/nohidden_depth.sh @@ -0,0 +1 @@ +bfs_diff weirdnames -depth -nohidden diff --git a/tests/bfs/nowarn.sh b/tests/bfs/nowarn.sh new file mode 100644 index 0000000..d9f9ab3 --- /dev/null +++ b/tests/bfs/nowarn.sh @@ -0,0 +1,2 @@ +stderr=$(invoke_bfs basic -nowarn -depth -prune 2>&1 >/dev/null) +[ -z "$stderr" ] diff --git a/tests/bfs/ok_plus_semicolon.out b/tests/bfs/ok_plus_semicolon.out new file mode 100644 index 0000000..2a3e14f --- /dev/null +++ b/tests/bfs/ok_plus_semicolon.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/bfs/ok_plus_semicolon.sh b/tests/bfs/ok_plus_semicolon.sh new file mode 100644 index 0000000..57d6103 --- /dev/null +++ b/tests/bfs/ok_plus_semicolon.sh @@ -0,0 +1,8 @@ +# The -ok primary shall be equivalent to -exec, except that the use of a +# <plus-sign> to punctuate the end of the primary expression need not be +# supported, ... +# +# bfs chooses not to support it, for compatibility with most other find +# implementations. + +yes | bfs_diff basic -ok echo {} + \; diff --git a/tests/bfs/okdir_plus_semicolon.out b/tests/bfs/okdir_plus_semicolon.out new file mode 100644 index 0000000..1909d27 --- /dev/null +++ b/tests/bfs/okdir_plus_semicolon.out @@ -0,0 +1,19 @@ +./a + +./b + +./bar + +./bar + +./basic + +./baz + +./c + +./d + +./e + +./f + +./foo + +./foo + +./foo + +./g + +./h + +./i + +./j + +./k + +./l + diff --git a/tests/bfs/okdir_plus_semicolon.sh b/tests/bfs/okdir_plus_semicolon.sh new file mode 100644 index 0000000..d316bd7 --- /dev/null +++ b/tests/bfs/okdir_plus_semicolon.sh @@ -0,0 +1 @@ +yes | bfs_diff basic -okdir echo {} + \; diff --git a/tests/bfs/or_incomplete.sh b/tests/bfs/or_incomplete.sh new file mode 100644 index 0000000..c941b95 --- /dev/null +++ b/tests/bfs/or_incomplete.sh @@ -0,0 +1 @@ +fail invoke_bfs -print -o diff --git a/tests/bfs/path_expr_flag.out b/tests/bfs/path_expr_flag.out new file mode 100644 index 0000000..e67f10b --- /dev/null +++ b/tests/bfs/path_expr_flag.out @@ -0,0 +1,2 @@ +links/skip/broken +links/skip/link diff --git a/tests/bfs/path_expr_flag.sh b/tests/bfs/path_expr_flag.sh new file mode 100644 index 0000000..7cfa1cd --- /dev/null +++ b/tests/bfs/path_expr_flag.sh @@ -0,0 +1 @@ +bfs_diff links/skip -type l -H diff --git a/tests/bfs/path_flag_expr.out b/tests/bfs/path_flag_expr.out new file mode 100644 index 0000000..e67f10b --- /dev/null +++ b/tests/bfs/path_flag_expr.out @@ -0,0 +1,2 @@ +links/skip/broken +links/skip/link diff --git a/tests/bfs/path_flag_expr.sh b/tests/bfs/path_flag_expr.sh new file mode 100644 index 0000000..ca00c8c --- /dev/null +++ b/tests/bfs/path_flag_expr.sh @@ -0,0 +1 @@ +bfs_diff links/skip -H -type l diff --git a/tests/bfs/perm_leading_plus_symbolic.out b/tests/bfs/perm_leading_plus_symbolic.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/bfs/perm_leading_plus_symbolic.out diff --git a/tests/bfs/perm_leading_plus_symbolic.sh b/tests/bfs/perm_leading_plus_symbolic.sh new file mode 100644 index 0000000..4202ac1 --- /dev/null +++ b/tests/bfs/perm_leading_plus_symbolic.sh @@ -0,0 +1 @@ +bfs_diff perms -perm +rwx diff --git a/tests/bfs/perm_symbolic_double_comma.sh b/tests/bfs/perm_symbolic_double_comma.sh new file mode 100644 index 0000000..66db0ac --- /dev/null +++ b/tests/bfs/perm_symbolic_double_comma.sh @@ -0,0 +1 @@ +fail invoke_bfs perms -perm a+r,,u+w diff --git a/tests/bfs/perm_symbolic_missing_action.sh b/tests/bfs/perm_symbolic_missing_action.sh new file mode 100644 index 0000000..3b18721 --- /dev/null +++ b/tests/bfs/perm_symbolic_missing_action.sh @@ -0,0 +1 @@ +fail invoke_bfs perms -perm a diff --git a/tests/bfs/perm_symbolic_trailing_comma.sh b/tests/bfs/perm_symbolic_trailing_comma.sh new file mode 100644 index 0000000..c52ebe6 --- /dev/null +++ b/tests/bfs/perm_symbolic_trailing_comma.sh @@ -0,0 +1 @@ +fail invoke_bfs perms -perm a+r, diff --git a/tests/bfs/printf_color.out b/tests/bfs/printf_color.out new file mode 100644 index 0000000..d9cd1a4 --- /dev/null +++ b/tests/bfs/printf_color.out @@ -0,0 +1,20 @@ +[01;34m.[0m [01;34m.[0m [01;34mrainbow[0m [01;34m./[0m[01;34mrainbow[0m [01;34mrainbow[0m +[01;34m.[0m [01;34m./rainbow[0m [01;32mexec.sh[0m [01;34m./rainbow/[0m[01;32mexec.sh[0m [01;34mrainbow/[0m[01;32mexec.sh[0m +[01;34m.[0m [01;34m./rainbow[0m [01;35msocket[0m [01;34m./rainbow/[0m[01;35msocket[0m [01;34mrainbow/[0m[01;35msocket[0m +[01;34m.[0m [01;34m./rainbow[0m [01;36mbroken[0m [01;34m./rainbow/[0m[01;36mbroken[0m [01;34mrainbow/[0m[01;36mbroken[0m nowhere +[01;34m.[0m [01;34m./rainbow[0m [01;36mchardev_link[0m [01;34m./rainbow/[0m[01;36mchardev_link[0m [01;34mrainbow/[0m[01;36mchardev_link[0m [01;34m/dev/[0m[01;33mnull[0m +[01;34m.[0m [01;34m./rainbow[0m [01;36mlink.txt[0m [01;34m./rainbow/[0m[01;36mlink.txt[0m [01;34mrainbow/[0m[01;36mlink.txt[0m file.txt +[01;34m.[0m [01;34m./rainbow[0m [30;42msticky_ow[0m [01;34m./rainbow/[0m[30;42msticky_ow[0m [01;34mrainbow/[0m[30;42msticky_ow[0m +[01;34m.[0m [01;34m./rainbow[0m [30;43msgid[0m [01;34m./rainbow/[0m[30;43msgid[0m [01;34mrainbow/[0m[30;43msgid[0m +[01;34m.[0m [01;34m./rainbow[0m [33mpipe[0m [01;34m./rainbow/[0m[33mpipe[0m [01;34mrainbow/[0m[33mpipe[0m +[01;34m.[0m [01;34m./rainbow[0m [34;42mow[0m [01;34m./rainbow/[0m[34;42mow[0m [01;34mrainbow/[0m[34;42mow[0m +[01;34m.[0m [01;34m./rainbow[0m [37;41msugid[0m [01;34m./rainbow/[0m[37;41msugid[0m [01;34mrainbow/[0m[37;41msugid[0m +[01;34m.[0m [01;34m./rainbow[0m [37;41msuid[0m [01;34m./rainbow/[0m[37;41msuid[0m [01;34mrainbow/[0m[37;41msuid[0m +[01;34m.[0m [01;34m./rainbow[0m [37;44msticky[0m [01;34m./rainbow/[0m[37;44msticky[0m [01;34mrainbow/[0m[37;44msticky[0m +[01;34m.[0m [01;34m./rainbow[0m file.dat [01;34m./rainbow/[0mfile.dat [01;34mrainbow/[0mfile.dat +[01;34m.[0m [01;34m./rainbow[0m file.txt [01;34m./rainbow/[0mfile.txt [01;34mrainbow/[0mfile.txt +[01;34m.[0m [01;34m./rainbow[0m mh1 [01;34m./rainbow/[0mmh1 [01;34mrainbow/[0mmh1 +[01;34m.[0m [01;34m./rainbow[0m mh2 [01;34m./rainbow/[0mmh2 [01;34mrainbow/[0mmh2 +[01;34m.[0m [01;34m./rainbow[0m star.gz [01;34m./rainbow/[0mstar.gz [01;34mrainbow/[0mstar.gz +[01;34m.[0m [01;34m./rainbow[0m star.tar [01;34m./rainbow/[0mstar.tar [01;34mrainbow/[0mstar.tar +[01;34m.[0m [01;34m./rainbow[0m star.tar.gz [01;34m./rainbow/[0mstar.tar.gz [01;34mrainbow/[0mstar.tar.gz diff --git a/tests/bfs/printf_color.sh b/tests/bfs/printf_color.sh new file mode 100644 index 0000000..7bb38c2 --- /dev/null +++ b/tests/bfs/printf_color.sh @@ -0,0 +1 @@ +bfs_diff -color -path './rainbow*' -printf '%H %h %f %p %P %l\n' diff --git a/tests/bfs/printf_duplicate_flag.sh b/tests/bfs/printf_duplicate_flag.sh new file mode 100644 index 0000000..77650d0 --- /dev/null +++ b/tests/bfs/printf_duplicate_flag.sh @@ -0,0 +1 @@ +fail invoke_bfs basic -printf '%--p' diff --git a/tests/bfs/printf_everything.sh b/tests/bfs/printf_everything.sh new file mode 100644 index 0000000..58996ab --- /dev/null +++ b/tests/bfs/printf_everything.sh @@ -0,0 +1,9 @@ +everything=(%{a,b,c,d,D,f,F,g,G,h,H,i,k,l,m,M,n,p,P,s,S,t,u,U,y,Y}) +everything+=(%{A,C,T}{%,+,@,a,A,b,B,c,C,d,D,e,F,g,G,h,H,I,j,k,l,m,M,n,p,r,R,s,S,t,T,u,U,V,w,W,x,X,y,Y,z,Z}) + +# Check if we have birth times +if ! fail invoke_bfs basic -printf '%w' -quit >/dev/null; then + everything+=(%w %{B,W}{%,+,@,a,A,b,B,c,C,d,D,e,F,g,G,h,H,I,j,k,l,m,M,n,p,r,R,s,S,t,T,u,U,V,w,W,x,X,y,Y,z,Z}) +fi + +invoke_bfs rainbow -printf "${everything[*]}\n" >/dev/null diff --git a/tests/bfs/printf_incomplete_escape.sh b/tests/bfs/printf_incomplete_escape.sh new file mode 100644 index 0000000..144add5 --- /dev/null +++ b/tests/bfs/printf_incomplete_escape.sh @@ -0,0 +1 @@ +fail invoke_bfs basic -printf '\' diff --git a/tests/bfs/printf_incomplete_format.sh b/tests/bfs/printf_incomplete_format.sh new file mode 100644 index 0000000..347a0f4 --- /dev/null +++ b/tests/bfs/printf_incomplete_format.sh @@ -0,0 +1 @@ +fail invoke_bfs basic -printf '%' diff --git a/tests/bfs/printf_invalid_escape.sh b/tests/bfs/printf_invalid_escape.sh new file mode 100644 index 0000000..ce12233 --- /dev/null +++ b/tests/bfs/printf_invalid_escape.sh @@ -0,0 +1 @@ +fail invoke_bfs basic -printf '\!' diff --git a/tests/bfs/printf_invalid_format.sh b/tests/bfs/printf_invalid_format.sh new file mode 100644 index 0000000..1717615 --- /dev/null +++ b/tests/bfs/printf_invalid_format.sh @@ -0,0 +1 @@ +fail invoke_bfs basic -printf '%!' diff --git a/tests/bfs/printf_must_be_numeric.sh b/tests/bfs/printf_must_be_numeric.sh new file mode 100644 index 0000000..eabb3d6 --- /dev/null +++ b/tests/bfs/printf_must_be_numeric.sh @@ -0,0 +1 @@ +fail invoke_bfs basic -printf '%+p' diff --git a/tests/bfs/printf_w.out b/tests/bfs/printf_w.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/bfs/printf_w.out diff --git a/tests/bfs/printf_w.sh b/tests/bfs/printf_w.sh new file mode 100644 index 0000000..3b27ee7 --- /dev/null +++ b/tests/bfs/printf_w.sh @@ -0,0 +1,2 @@ +# Birth times may not be supported, so just check that %w/%W/%B can be parsed +bfs_diff times -false -printf '%w %WY %BY\n' diff --git a/tests/bfs/stderr_fails_loudly.sh b/tests/bfs/stderr_fails_loudly.sh new file mode 100644 index 0000000..d8b3861 --- /dev/null +++ b/tests/bfs/stderr_fails_loudly.sh @@ -0,0 +1,2 @@ +skip_unless test -e /dev/full +fail invoke_bfs -D all basic -false -fprint /dev/full 2>/dev/full diff --git a/tests/bfs/stderr_fails_silently.out b/tests/bfs/stderr_fails_silently.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/stderr_fails_silently.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/bfs/stderr_fails_silently.sh b/tests/bfs/stderr_fails_silently.sh new file mode 100644 index 0000000..731cb02 --- /dev/null +++ b/tests/bfs/stderr_fails_silently.sh @@ -0,0 +1,2 @@ +skip_unless test -e /dev/full +bfs_diff -D all basic 2>/dev/full diff --git a/tests/bfs/type_multi.out b/tests/bfs/type_multi.out new file mode 100644 index 0000000..3cae08a --- /dev/null +++ b/tests/bfs/type_multi.out @@ -0,0 +1,7 @@ +links +links/deeply +links/deeply/nested +links/deeply/nested/dir +links/deeply/nested/file +links/file +links/hardlink diff --git a/tests/bfs/type_multi.sh b/tests/bfs/type_multi.sh new file mode 100644 index 0000000..59992c7 --- /dev/null +++ b/tests/bfs/type_multi.sh @@ -0,0 +1 @@ +bfs_diff links -type f,d,c diff --git a/tests/bfs/typo.sh b/tests/bfs/typo.sh new file mode 100644 index 0000000..459e9fe --- /dev/null +++ b/tests/bfs/typo.sh @@ -0,0 +1 @@ +invoke_bfs -dikkiq 2>&1 | grep follow >/dev/null diff --git a/tests/bfs/unexpected_operator.sh b/tests/bfs/unexpected_operator.sh new file mode 100644 index 0000000..b3658f6 --- /dev/null +++ b/tests/bfs/unexpected_operator.sh @@ -0,0 +1 @@ +fail invoke_bfs \! -o -print diff --git a/tests/bfs/unique.out b/tests/bfs/unique.out new file mode 100644 index 0000000..289cbde --- /dev/null +++ b/tests/bfs/unique.out @@ -0,0 +1,2 @@ +links/file +links/symlink diff --git a/tests/bfs/unique.sh b/tests/bfs/unique.sh new file mode 100644 index 0000000..ea8adfd --- /dev/null +++ b/tests/bfs/unique.sh @@ -0,0 +1 @@ +bfs_diff links/{file,symlink,hardlink} -unique diff --git a/tests/bfs/unique_depth.out b/tests/bfs/unique_depth.out new file mode 100644 index 0000000..a7ccfe4 --- /dev/null +++ b/tests/bfs/unique_depth.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/bfs/unique_depth.sh b/tests/bfs/unique_depth.sh new file mode 100644 index 0000000..c1d9716 --- /dev/null +++ b/tests/bfs/unique_depth.sh @@ -0,0 +1 @@ +bfs_diff basic -unique -depth diff --git a/tests/bfs/version.sh b/tests/bfs/version.sh new file mode 100644 index 0000000..e0417ca --- /dev/null +++ b/tests/bfs/version.sh @@ -0,0 +1 @@ +invoke_bfs -version >/dev/null diff --git a/tests/bfs/warn.sh b/tests/bfs/warn.sh new file mode 100644 index 0000000..0f613c8 --- /dev/null +++ b/tests/bfs/warn.sh @@ -0,0 +1,2 @@ +stderr=$(invoke_bfs basic -warn -depth -prune 2>&1 >/dev/null) +[ -n "$stderr" ] diff --git a/tests/bfs/xtype_depth.sh b/tests/bfs/xtype_depth.sh new file mode 100644 index 0000000..cd478af --- /dev/null +++ b/tests/bfs/xtype_depth.sh @@ -0,0 +1,2 @@ +# Make sure -xtype is considered side-effecting for facts_when_impure +fail invoke_bfs loops -xtype l -depth 100 diff --git a/tests/bfs/xtype_multi.out b/tests/bfs/xtype_multi.out new file mode 100644 index 0000000..558e89c --- /dev/null +++ b/tests/bfs/xtype_multi.out @@ -0,0 +1,10 @@ +links +links/deeply +links/deeply/nested +links/deeply/nested/dir +links/deeply/nested/file +links/deeply/nested/link +links/file +links/hardlink +links/skip +links/symlink diff --git a/tests/bfs/xtype_multi.sh b/tests/bfs/xtype_multi.sh new file mode 100644 index 0000000..ed20955 --- /dev/null +++ b/tests/bfs/xtype_multi.sh @@ -0,0 +1 @@ +bfs_diff links -xtype f,d,c diff --git a/tests/bfs/xtype_reorder.out b/tests/bfs/xtype_reorder.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/bfs/xtype_reorder.out diff --git a/tests/bfs/xtype_reorder.sh b/tests/bfs/xtype_reorder.sh new file mode 100644 index 0000000..8d75d7d --- /dev/null +++ b/tests/bfs/xtype_reorder.sh @@ -0,0 +1,4 @@ +# Make sure -xtype is not reordered in front of anything -- if -xtype runs +# before -links 100, it will report an ELOOP error +bfs_diff loops -links 100 -xtype l +invoke_bfs loops -links 100 -xtype l |