diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2018-07-20 12:42:31 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2018-07-20 12:48:03 -0400 |
commit | 510a7bd65c680fcf292493b5c00ce32c90a5155c (patch) | |
tree | df51e7be095863de316e7e9b4877de6d9baeb690 /tests.sh | |
parent | 45eafe9cf597c071029d61a9625bb96034d5aac9 (diff) | |
download | bfs-510a7bd65c680fcf292493b5c00ce32c90a5155c.tar.xz |
printf: Output ? for errors in %Y
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -395,6 +395,7 @@ gnu_tests=( test_printf_times test_printf_leak test_printf_nul + test_printf_Y_error test_quit_after_print test_quit_before_print test_fstype @@ -1400,6 +1401,21 @@ function test_printf_w() { bfs_diff times -false -printf '%w %WY\n' } +function test_printf_Y_error() { + rm -rf scratch/* + mkdir scratch/foo + chmod -x scratch/foo + ln -s foo/bar scratch/bar + + bfs_diff scratch -printf '(%p) (%l) %y %Y\n' 2>/dev/null + local ret=$? + + chmod +x scratch/foo + rm -rf scratch/* + + return $ret +} + function test_fstype() { fstype="$(invoke_bfs basic -maxdepth 0 -printf '%F\n')" bfs_diff basic -fstype "$fstype" |