diff options
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 10 | ||||
-rw-r--r-- | test/Makefile.in | 10 | ||||
-rw-r--r-- | test/profile0.awk | 1 | ||||
-rw-r--r-- | test/profile0.in | 2 | ||||
-rw-r--r-- | test/profile0.ok | 6 |
6 files changed, 32 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 8672cb00..0d6934e9 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2015-02-10 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (profile0): New test. + * profile0.awk, profile0.in, profile0.ok: New files. + 2015-02-01 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (paramasfunc1, paramasfunc2): Now need --posix. diff --git a/test/Makefile.am b/test/Makefile.am index 3160494e..419265f9 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -710,6 +710,8 @@ EXTRA_DIST = \ prmreuse.ok \ procinfs.awk \ procinfs.ok \ + profile0.awk \ + profile0.ok \ profile2.ok \ profile3.awk \ profile3.ok \ @@ -1039,7 +1041,7 @@ GAWK_EXT_TESTS = \ manyfiles match1 match2 match3 mbstr1 \ nastyparm next nondec nondec2 \ patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \ - profile1 profile2 profile3 profile4 profile5 profile6 profile7 pty1 \ + profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \ splitarg4 strftime \ @@ -1689,6 +1691,12 @@ dumpvars:: @grep -v ENVIRON < awkvars.out | grep -v PROCINFO > _$@; rm awkvars.out @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +profile0: + @echo $@ + @$(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + profile1: @echo $@ @$(AWK) --pretty-print=ap-$@.out -f "$(srcdir)"/xref.awk "$(srcdir)"/dtdgport.awk > _$@.out1 diff --git a/test/Makefile.in b/test/Makefile.in index d1bbf4f8..598285ed 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -967,6 +967,8 @@ EXTRA_DIST = \ prmreuse.ok \ procinfs.awk \ procinfs.ok \ + profile0.awk \ + profile0.ok \ profile2.ok \ profile3.awk \ profile3.ok \ @@ -1295,7 +1297,7 @@ GAWK_EXT_TESTS = \ manyfiles match1 match2 match3 mbstr1 \ nastyparm next nondec nondec2 \ patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \ - profile1 profile2 profile3 profile4 profile5 profile6 profile7 pty1 \ + profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \ splitarg4 strftime \ @@ -2127,6 +2129,12 @@ dumpvars:: @grep -v ENVIRON < awkvars.out | grep -v PROCINFO > _$@; rm awkvars.out @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +profile0: + @echo $@ + @$(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.in > /dev/null + @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + profile1: @echo $@ @$(AWK) --pretty-print=ap-$@.out -f "$(srcdir)"/xref.awk "$(srcdir)"/dtdgport.awk > _$@.out1 diff --git a/test/profile0.awk b/test/profile0.awk new file mode 100644 index 00000000..a42e94df --- /dev/null +++ b/test/profile0.awk @@ -0,0 +1 @@ +NR == 1 diff --git a/test/profile0.in b/test/profile0.in new file mode 100644 index 00000000..7bba8c8e --- /dev/null +++ b/test/profile0.in @@ -0,0 +1,2 @@ +line 1 +line 2 diff --git a/test/profile0.ok b/test/profile0.ok new file mode 100644 index 00000000..2e3c5728 --- /dev/null +++ b/test/profile0.ok @@ -0,0 +1,6 @@ + # Rule(s) + + 2 NR == 1 { # 1 + 1 print $0 + } + |