diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-09-18 16:55:37 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2021-10-09 12:33:59 -0400 |
commit | 32c54e2769c3e4c5ada44e6107745d0893e86c70 (patch) | |
tree | 4711f553986365a78445fd4a960e2be70580fd58 /tests.sh | |
parent | 41a569afc420651dbfc39a14deec6e6da3468250 (diff) | |
download | bfs-32c54e2769c3e4c5ada44e6107745d0893e86c70.tar.xz |
printf: Colorize file names/paths in simple cases
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 |