From 486ddbcdd9281683ab1ade83c5c4a7aac8175aa7 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 11 Mar 2017 14:08:45 -0500 Subject: Add a test for colored output --- tests.sh | 5 +++++ tests/test_colors.out | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/test_colors.out diff --git a/tests.sh b/tests.sh index 46fcc52..5d5a3b5 100755 --- a/tests.sh +++ b/tests.sh @@ -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 @@ +links +links/d +links/b +links/h +links/a +links/c +links/d/e +links/d/e/f +links/d/e/g +links/d/e/i -- cgit v1.2.3