diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-03-11 14:08:45 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-03-11 14:08:45 -0500 |
commit | 486ddbcdd9281683ab1ade83c5c4a7aac8175aa7 (patch) | |
tree | 636c62e9eb6bda921265e00fa6ea6c225a9e9503 | |
parent | 21f6c460fcda0161993f75421614efb6971af23b (diff) | |
download | bfs-486ddbcdd9281683ab1ade83c5c4a7aac8175aa7.tar.xz |
Add a test for colored output
-rwxr-xr-x | tests.sh | 5 | ||||
-rw-r--r-- | tests/test_colors.out | 10 |
2 files changed, 15 insertions, 0 deletions
@@ -309,6 +309,7 @@ bfs_tests=( test_flag_expr_path test_expr_flag_path test_expr_path_flag + test_colors ) BSD=yes @@ -1044,6 +1045,10 @@ function test_precedence() { bfs_diff basic \( -name foo -type d -o -name bar -a -type f \) -print , \! -empty -type f -print } +function test_colors() { + LS_COLORS= bfs_diff links -color +} + passed=0 failed=0 diff --git a/tests/test_colors.out b/tests/test_colors.out new file mode 100644 index 0000000..a9ab84a --- /dev/null +++ b/tests/test_colors.out @@ -0,0 +1,10 @@ +[01;34m[0m[01;34mlinks[0m +[01;34mlinks/[0m[01;34md[0m +[01;34mlinks/[0m[01;36mb[0m +[01;34mlinks/[0m[01;36mh[0m +[01;34mlinks/[0ma +[01;34mlinks/[0mc +[01;34mlinks/d/[0m[01;34me[0m +[01;34mlinks/d/e/[0m[01;34mf[0m +[01;34mlinks/d/e/[0m[01;36mg[0m +[01;34mlinks/d/e/[0m[40;31;01mi[0m |