diff --git a/usr.bin/printf/tests/Makefile b/usr.bin/printf/tests/Makefile index 04b43fd3ae53..b4ea79be3332 100644 --- a/usr.bin/printf/tests/Makefile +++ b/usr.bin/printf/tests/Makefile @@ -5,6 +5,7 @@ PACKAGE= tests TAP_TESTS_SH= legacy_test ${PACKAGE}FILES+= regress.b.out +${PACKAGE}FILES+= regress.bwidth.out ${PACKAGE}FILES+= regress.d.out ${PACKAGE}FILES+= regress.f.out ${PACKAGE}FILES+= regress.l1.out diff --git a/usr.bin/printf/tests/regress.bwidth.out b/usr.bin/printf/tests/regress.bwidth.out new file mode 100644 index 000000000000..9e2ff61c869c --- /dev/null +++ b/usr.bin/printf/tests/regress.bwidth.out @@ -0,0 +1 @@ + a diff --git a/usr.bin/printf/tests/regress.sh b/usr.bin/printf/tests/regress.sh index c9668a35c69b..a2cf5fb7712c 100644 --- a/usr.bin/printf/tests/regress.sh +++ b/usr.bin/printf/tests/regress.sh @@ -2,7 +2,7 @@ REGRESSION_START($1) -echo '1..23' +echo '1..24' REGRESSION_TEST(`b', `printf "abc%b%b" "def\n" "\cghi"') REGRESSION_TEST(`d', `printf "%d,%5d,%.5d,%0*d,%.*d\n" 123 123 123 5 123 5 123') @@ -27,5 +27,6 @@ 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_TEST(`bwidth', `printf "%8.2b" "a\nb\n"') REGRESSION_END()