diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/awk.tests | 6 | ||||
-rwxr-xr-x | testsuite/printf.tests | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests index dc2ae2e..bcaafe8 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests @@ -463,4 +463,10 @@ testing "awk \"cmd\" | getline" \ "HELLO\n" \ '' '' +# printf %% should print one % (had a bug where it didn't) +testing 'awk printf %% prints one %' \ + "awk 'BEGIN { printf \"%%\n\" }'" \ + "%\n" \ + '' '' + exit $FAILCOUNT diff --git a/testsuite/printf.tests b/testsuite/printf.tests index 34a6592..050edef 100755 --- a/testsuite/printf.tests +++ b/testsuite/printf.tests @@ -79,6 +79,11 @@ testing "printf understands %Ld" \ "-5\n""0\n" \ "" "" +testing "printf understands %%" \ + "${bb}printf '%%\n' 2>&1; echo \$?" \ + "%\n""0\n" \ + "" "" + testing "printf handles positive numbers for %d" \ "${bb}printf '%d\n' 3 +3 ' 3' ' +3' 2>&1; echo \$?" \ "3\n"\ |