From b2b97e301892d89b9909bed17f4299e09af1e33b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 20 Jan 2018 11:53:36 -0500 Subject: 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) --- tests.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests.sh') 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" -- cgit v1.2.3