From 32c54e2769c3e4c5ada44e6107745d0893e86c70 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 18 Sep 2021 16:55:37 -0400 Subject: printf: Colorize file names/paths in simple cases --- tests.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index df6eb04..7bcda74 100755 --- a/tests.sh +++ b/tests.sh @@ -765,6 +765,7 @@ bfs_tests=( test_printf_invalid_format test_printf_duplicate_flag test_printf_must_be_numeric + test_printf_color test_type_multi @@ -2305,6 +2306,10 @@ function test_printf_must_be_numeric() { ! quiet invoke_bfs basic -printf '%+p' } +function test_printf_color() { + LS_COLORS= bfs_diff -color -path './rainbow*' -printf '%H %h %f %p %P %l\n' +} + function test_fprintf() { invoke_bfs basic -fprintf scratch/test_fprintf.out '%%p(%p) %%d(%d) %%f(%f) %%h(%h) %%H(%H) %%P(%P) %%m(%m) %%M(%M) %%y(%y)\n' sort -o scratch/test_fprintf.out scratch/test_fprintf.out -- cgit v1.2.3