diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-09-20 11:55:57 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-09-20 11:55:57 -0400 |
commit | 9a21e60f6629aa5d79d8d228faf1944d5b4a6e19 (patch) | |
tree | 8b5e1b9c1d20e73f6d7570252227dff18e53be9d /tests.sh | |
parent | cac079d033259e72f0d11e81856c0266eada3b7f (diff) | |
download | bfs-9a21e60f6629aa5d79d8d228faf1944d5b4a6e19.tar.xz |
printf: Format the empty string for %l of non-links
It makes a difference if the format specifier has a width.
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -528,6 +528,7 @@ gnu_tests=( test_printf_Y_error test_printf_H test_printf_u_g_ulimit + test_printf_l_nonlink test_quit test_quit_child @@ -1990,6 +1991,10 @@ function test_printf_u_g_ulimit() { [ "$(invoke_bfs deep -printf '%u %g\n' | uniq)" = "$(id -un) $(id -gn)" ] } +function test_printf_l_nonlink() { + bfs_diff links -printf '| %24p -> %-24l |\n' +} + function test_fstype() { fstype="$(invoke_bfs basic -maxdepth 0 -printf '%F\n')" bfs_diff basic -fstype "$fstype" |