summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-09-18 16:55:37 -0400
committerTavian Barnes <tavianator@tavianator.com>2021-10-09 12:33:59 -0400
commit32c54e2769c3e4c5ada44e6107745d0893e86c70 (patch)
tree4711f553986365a78445fd4a960e2be70580fd58 /tests.sh
parent41a569afc420651dbfc39a14deec6e6da3468250 (diff)
downloadbfs-32c54e2769c3e4c5ada44e6107745d0893e86c70.tar.xz
printf: Colorize file names/paths in simple cases
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh5
1 files changed, 5 insertions, 0 deletions
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