diff options
author | pfg <pfg@FreeBSD.org> | 2014-05-26 15:08:39 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-05-26 15:08:39 +0000 |
commit | ac467aea1fc1dd31bcbc50ff9dd158fa91f6b8a9 (patch) | |
tree | 69d8a685ee84ecb87ae3deec37155f2899c509db | |
parent | 1818973ea93ed180c9365102a1bc98b1c6ac912b (diff) | |
download | FreeBSD-src-ac467aea1fc1dd31bcbc50ff9dd158fa91f6b8a9.zip FreeBSD-src-ac467aea1fc1dd31bcbc50ff9dd158fa91f6b8a9.tar.gz |
printf(1): add tests for warn about incomplete uses n$
Submitted by: jilles
MFC after: 2 weeks
-rw-r--r-- | usr.bin/printf/tests/regress.missingpos1.out | 1 | ||||
-rw-r--r-- | usr.bin/printf/tests/regress.sh | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/usr.bin/printf/tests/regress.missingpos1.out b/usr.bin/printf/tests/regress.missingpos1.out new file mode 100644 index 0000000..3b04f03 --- /dev/null +++ b/usr.bin/printf/tests/regress.missingpos1.out @@ -0,0 +1 @@ +printf: incomplete use of n$ diff --git a/usr.bin/printf/tests/regress.sh b/usr.bin/printf/tests/regress.sh index 84e183b..15b8284 100644 --- a/usr.bin/printf/tests/regress.sh +++ b/usr.bin/printf/tests/regress.sh @@ -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() |