summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2018-01-20 11:53:36 -0500
committerTavian Barnes <tavianator@tavianator.com>2018-01-20 12:36:08 -0500
commitb2b97e301892d89b9909bed17f4299e09af1e33b (patch)
tree1083300b9f710b8fcd50c9bfec6fa83b1575b9c8 /tests.sh
parent50432108fb3ef826301626b94c5e82ad2ab2bd75 (diff)
downloadbfs-b2b97e301892d89b9909bed17f4299e09af1e33b.tar.xz
printf: Add %w and %Wk for file birth times
%w and %W were chosen to match the format specifiers for file birth times from stat(1)
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 0585ff4..de0afb7 100755
--- a/tests.sh
+++ b/tests.sh
@@ -394,6 +394,7 @@ bfs_tests=(
test_execdir_plus
test_hidden
test_nohidden
+ test_printf_w
test_path_flag_expr
test_path_expr_flag
test_flag_expr_path
@@ -1290,6 +1291,11 @@ function test_printf_nul() {
fi
}
+function test_printf_w() {
+ # Birth times may not be supported, so just check that %w/%W can be parsed
+ bfs_diff times -false -printf '%w %WY\n'
+}
+
function test_fstype() {
fstype="$(invoke_bfs -printf '%F\n' | head -n1)"
bfs_diff basic -fstype "$fstype"