diff options
Diffstat (limited to 'testsuite/awk.tests')
-rwxr-xr-x | testsuite/awk.tests | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests index 2c7642ce0..7910c8875 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests | |||
@@ -47,4 +47,21 @@ testing "awk NF in BEGIN" \ | |||
47 | ":0::::\n" \ | 47 | ":0::::\n" \ |
48 | "" "" | 48 | "" "" |
49 | 49 | ||
50 | prg=' | ||
51 | function b(tmp) { | ||
52 | tmp = 0; | ||
53 | print "" tmp; #this line causes the bug | ||
54 | return tmp; | ||
55 | } | ||
56 | function c(tmpc) { | ||
57 | tmpc = b(); return tmpc; | ||
58 | } | ||
59 | BEGIN { | ||
60 | print (c() ? "string" : "number"); | ||
61 | }' | ||
62 | testing "awk string cast (bug 725)" \ | ||
63 | "awk '$prg'" \ | ||
64 | "0\nnumber\n" \ | ||
65 | "" "" | ||
66 | |||
50 | exit $FAILCOUNT | 67 | exit $FAILCOUNT |