printf(1): add tests for warn about incomplete uses n$

Submitted by:	jilles
MFC after:	2 weeks
This commit is contained in:
pfg 2014-05-26 15:08:39 +00:00
parent 1818973ea9
commit ac467aea1f
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1 @@
printf: incomplete use of n$

View File

@ -19,5 +19,13 @@ REGRESSION_TEST('zero', `printf "%u%u\n" 15')
REGRESSION_TEST('zero', `printf "%d%d\n" 15')
REGRESSION_TEST('zero', `printf "%d%u\n" 15')
REGRESSION_TEST('zero', `printf "%u%d\n" 15')
REGRESSION_TEST(`missingpos1', `printf "%1\$*s" 1 1 2>&1')
REGRESSION_TEST(`missingpos1', `printf "%*1\$s" 1 1 2>&1')
REGRESSION_TEST(`missingpos1', `printf "%1\$*.*s" 1 1 1 2>&1')
REGRESSION_TEST(`missingpos1', `printf "%*1\$.*s" 1 1 1 2>&1')
REGRESSION_TEST(`missingpos1', `printf "%*.*1\$s" 1 1 1 2>&1')
REGRESSION_TEST(`missingpos1', `printf "%1\$*2\$.*s" 1 1 1 2>&1')
REGRESSION_TEST(`missingpos1', `printf "%*1\$.*2\$s" 1 1 1 2>&1')
REGRESSION_TEST(`missingpos1', `printf "%1\$*.*2\$s" 1 1 1 2>&1')
REGRESSION_END()