summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-09-05 21:53:01 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-09-05 21:53:01 -0400
commita107777ebf6c86a682c3fb2ff4a013fe5126b1b9 (patch)
tree082a668075a229b50be3fff78990b879fbc3891e
parented6d3933070f7cfbb0607aabe8f9e71ca384791a (diff)
downloadbfs-a107777ebf6c86a682c3fb2ff4a013fe5126b1b9.tar.xz
tests: Test more cases in test_color_ls
-rwxr-xr-xtests.sh4
-rw-r--r--tests/test_color_ls.out14
2 files changed, 13 insertions, 5 deletions
diff --git a/tests.sh b/tests.sh
index b95be8b..3b1a5af 100755
--- a/tests.sh
+++ b/tests.sh
@@ -2124,7 +2124,9 @@ function test_color_ls() {
local ACTUAL="$TMP/${FUNCNAME[0]}.out"
fi
- LS_COLORS="or=01;31:" invoke_bfs scratch/{link,broken,nested,notdir,relative,absolute} -color -ls | sed 's/.* -> //' >"$ACTUAL"
+ LS_COLORS="or=01;31:" invoke_bfs scratch/{,link,broken,nested,notdir,relative,absolute} -color -type l -ls \
+ | sed 's/.* -> //' \
+ | sort -o "$ACTUAL"
if [ ! "$UPDATE" ]; then
diff -u "$EXPECTED" "$ACTUAL"
diff --git a/tests/test_color_ls.out b/tests/test_color_ls.out
index 59a791a..b08d894 100644
--- a/tests/test_color_ls.out
+++ b/tests/test_color_ls.out
@@ -1,6 +1,12 @@
-foo/bar/baz
-foo/bar/nowhere
-foo/bar/nowhere/nothing
-foo/bar/baz/qux
scratch/foo/bar
+scratch/foo/bar
+/__bfs__/nowhere
/__bfs__/nowhere
+foo/bar/baz/qux
+foo/bar/baz/qux
+foo/bar/nowhere
+foo/bar/nowhere
+foo/bar/nowhere/nothing
+foo/bar/nowhere/nothing
+foo/bar/baz
+foo/bar/baz