diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/misc/stat-fmt.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/misc/stat-fmt.sh b/tests/misc/stat-fmt.sh index baa7ca775..1245ddb9e 100755 --- a/tests/misc/stat-fmt.sh +++ b/tests/misc/stat-fmt.sh @@ -20,11 +20,24 @@ print_ver_ stat - +# ensure that stat properly handles a format string ending with % for i in $(seq 50); do fmt=$(printf "%${i}s" %) out=$(stat --form="$fmt" .) test "$out" = "$fmt" || fail=1 done +# ensure QUOTING_STYLE is honored by %N +touch "'" || framework_failure_ +# Default since v8.25 +stat -c%N \' >> out || fail=1 +# Default before v8.25 +QUOTING_STYLE=locale stat -c%N \' >> out || fail=1 +cat <<\EOF >exp +"'" +'\'' +EOF +compare exp out || fail=1 + + Exit $fail |