diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-10-30 21:33:59 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-10-30 21:33:59 +0200 |
commit | c2cda8d3736b59738f579fce748e94ca109ccc58 (patch) | |
tree | 87cd8b65028cdc2b553de69d5a2ebd5a4cb1a92e /test | |
parent | e982e87ced45d48d23ffc86fa0b6cf6fabfbef8d (diff) | |
download | egawk-c2cda8d3736b59738f579fce748e94ca109ccc58.tar.gz egawk-c2cda8d3736b59738f579fce748e94ca109ccc58.tar.bz2 egawk-c2cda8d3736b59738f579fce748e94ca109ccc58.zip |
Fixes in pretty-printer.
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 10 | ||||
-rw-r--r-- | test/Makefile.in | 10 | ||||
-rw-r--r-- | test/profile6.awk | 7 | ||||
-rw-r--r-- | test/profile6.ok | 10 |
5 files changed, 40 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index f85de800..c9fe4a27 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2014-10-30 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (profile6): New test. + * profile6.awk, profile6.ok: New files. + 2014-10-17 Andrew J. Schorr <aschorr@telemetry-investments.com> * Makefile.am (profile1, testext): Use explicit ./foo.awk to avoid diff --git a/test/Makefile.am b/test/Makefile.am index f0965d77..15539504 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -706,6 +706,8 @@ EXTRA_DIST = \ profile4.ok \ profile5.awk \ profile5.ok \ + profile6.awk \ + profile6.ok \ prt1eval.awk \ prt1eval.ok \ prtoeval.awk \ @@ -1017,7 +1019,7 @@ GAWK_EXT_TESTS = \ manyfiles match1 match2 match3 mbstr1 \ nastyparm next nondec nondec2 \ patsplit posix printfbad1 printfbad2 printfbad3 printhuge procinfs \ - profile1 profile2 profile3 profile4 profile5 pty1 \ + profile1 profile2 profile3 profile4 profile5 profile6 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \ splitarg4 strftime \ @@ -1699,6 +1701,12 @@ profile5: @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +profile6: + @echo $@ + @GAWK_NO_PP_RUN=1 $(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out + @-$(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 3df34522..9e56dbf3 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -952,6 +952,8 @@ EXTRA_DIST = \ profile4.ok \ profile5.awk \ profile5.ok \ + profile6.awk \ + profile6.ok \ prt1eval.awk \ prt1eval.ok \ prtoeval.awk \ @@ -1262,7 +1264,7 @@ GAWK_EXT_TESTS = \ manyfiles match1 match2 match3 mbstr1 \ nastyparm next nondec nondec2 \ patsplit posix printfbad1 printfbad2 printfbad3 printhuge procinfs \ - profile1 profile2 profile3 profile4 profile5 pty1 \ + profile1 profile2 profile3 profile4 profile5 profile6 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \ splitarg4 strftime \ @@ -2123,6 +2125,12 @@ profile5: @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +profile6: + @echo $@ + @GAWK_NO_PP_RUN=1 $(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + posix2008sub: @echo $@ @$(AWK) --posix -f "$(srcdir)"/$@.awk > _$@ 2>&1 diff --git a/test/profile6.awk b/test/profile6.awk new file mode 100644 index 00000000..754f8ae6 --- /dev/null +++ b/test/profile6.awk @@ -0,0 +1,7 @@ +BEGIN { + x = 3 + print -(-x) + Q = "|" + print -3 Q (-4) + print -3 Q (-4) (-5) +} diff --git a/test/profile6.ok b/test/profile6.ok new file mode 100644 index 00000000..86ff68a6 --- /dev/null +++ b/test/profile6.ok @@ -0,0 +1,10 @@ + # BEGIN rule(s) + + BEGIN { + x = 3 + print -(-x) + Q = "|" + print -3 Q (-4) + print -3 Q (-4) (-5) + } + |