diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 7 | ||||
-rw-r--r-- | test/Makefile.in | 7 | ||||
-rw-r--r-- | test/profile8.awk | 13 | ||||
-rw-r--r-- | test/profile8.ok | 23 | ||||
-rw-r--r-- | test/profile9.awk | 9 | ||||
-rw-r--r-- | test/profile9.ok | 14 |
7 files changed, 59 insertions, 19 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 7ecd2716..bf8a2665 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2015-12-27 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (profile8): New test. + * profile8.awk, profile8.ok: New files. + 2015-11-24 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (watchpoint1): New test. diff --git a/test/Makefile.am b/test/Makefile.am index e573f5e1..b9eb6739 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1130,7 +1130,7 @@ GAWK_EXT_TESTS = \ nonfatal1 nonfatal2 nonfatal3 \ patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \ profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7 \ - profile8 pty1 \ + profile8 profile9 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ rsstart2 rsstart3 rstest6 shadow shadowbuiltin \ sortfor sortu split_after_fpat \ @@ -1860,6 +1860,11 @@ profile8: @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +profile9: + @echo $@ + @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + posix2008sub: @echo $@ @$(AWK) --posix -f "$(srcdir)"/$@.awk > _$@ 2>&1 diff --git a/test/Makefile.in b/test/Makefile.in index 9771921c..df6c576f 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1386,7 +1386,7 @@ GAWK_EXT_TESTS = \ nonfatal1 nonfatal2 nonfatal3 \ patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \ profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7 \ - profile8 pty1 \ + profile8 profile9 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ rsstart2 rsstart3 rstest6 shadow shadowbuiltin \ sortfor sortu split_after_fpat \ @@ -2299,6 +2299,11 @@ profile8: @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +profile9: + @echo $@ + @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + posix2008sub: @echo $@ @$(AWK) --posix -f "$(srcdir)"/$@.awk > _$@ 2>&1 diff --git a/test/profile8.awk b/test/profile8.awk index 16252cea..68d0622e 100644 --- a/test/profile8.awk +++ b/test/profile8.awk @@ -1,9 +1,4 @@ -# Some -# header -# comments - -# Add up -{ sum += $1 } - -# Print sum -END { print sum } +{if(0){}else{}} +{while(0){}} +{do{}while(0)} +{for(;;){}} diff --git a/test/profile8.ok b/test/profile8.ok index 34f7a96b..2b9c156f 100644 --- a/test/profile8.ok +++ b/test/profile8.ok @@ -1,14 +1,21 @@ -# Some -# header -# comments +{ + if (0) { + } else { + } +} + +{ + while (0) { + } +} -# Add up { - sum += $1 + do { + } while (0) } -# Print sum -END { - print sum +{ + for (;;) { + } } diff --git a/test/profile9.awk b/test/profile9.awk new file mode 100644 index 00000000..16252cea --- /dev/null +++ b/test/profile9.awk @@ -0,0 +1,9 @@ +# Some +# header +# comments + +# Add up +{ sum += $1 } + +# Print sum +END { print sum } diff --git a/test/profile9.ok b/test/profile9.ok new file mode 100644 index 00000000..34f7a96b --- /dev/null +++ b/test/profile9.ok @@ -0,0 +1,14 @@ +# Some +# header +# comments + +# Add up +{ + sum += $1 +} + +# Print sum +END { + print sum +} + |