printf: Don't print an error if not given an argument

This commit is contained in:
Fabian Homborg
2020-05-18 19:34:53 +02:00
parent 3cfcbe0975
commit 56f24f08d7
4 changed files with 9 additions and 2 deletions

View File

@@ -111,6 +111,11 @@ printf 'long signed %d\n' -498216206595
printf 'long signed to unsigned %u\n' -498216206596
# CHECK: long signed to unsigned 18446743575493345020
# Just check that we print no error for no arguments
printf
echo $status
# CHECK: 2
# Verify numeric conversion still happens even if it couldn't be fully converted
printf '%d\n' 15.1
# CHECK: 15