diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2015-03-24 20:32:42 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2015-03-24 20:32:42 -0400 |
commit | 90e1d42a99178608ec22216f7f35dadcad5a8b3a (patch) | |
tree | aaf1e18dfbdd1b73c03010798b55fa529e539409 /test | |
parent | 981e106b111672aac520fbb397ee82c64f3c4f2a (diff) | |
download | egawk-90e1d42a99178608ec22216f7f35dadcad5a8b3a.tar.gz egawk-90e1d42a99178608ec22216f7f35dadcad5a8b3a.tar.bz2 egawk-90e1d42a99178608ec22216f7f35dadcad5a8b3a.zip |
Fix bug where exit with no argument was setting the exit status to zero.
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 6 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.in | 9 | ||||
-rw-r--r-- | test/Maketests | 5 | ||||
-rw-r--r-- | test/exitval3.awk | 2 | ||||
-rw-r--r-- | test/exitval3.ok | 1 |
6 files changed, 25 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index c33ac108..862b8491 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2015-03-24 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * Makefile.am (EXTRA_DIST): Add exitval3.awk and exitval3.ok. + (BASIC_TESTS): Add new test exitval3. + * exitval3.awk, exitval3.ok: New files. + 2015-03-17 Andrew J. Schorr <aschorr@telemetry-investments.com> * inplace1.ok, inplace2.ok, inplace3.ok: Update error message line diff --git a/test/Makefile.am b/test/Makefile.am index f1a0a275..1b5a2a50 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -221,6 +221,8 @@ EXTRA_DIST = \ exitval2.awk \ exitval2.ok \ exitval2.w32 \ + exitval3.awk \ + exitval3.ok \ fcall_exit.awk \ fcall_exit.ok \ fcall_exit2.awk \ @@ -1001,7 +1003,7 @@ BASIC_TESTS = \ callparam childin clobber closebad clsflnam compare compare2 concat1 concat2 \ concat3 concat4 convfmt \ datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ - eofsplit exit2 exitval1 exitval2 \ + eofsplit exit2 exitval1 exitval2 exitval3 \ fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \ fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \ fstabplus funsemnl funsmnam funstack \ diff --git a/test/Makefile.in b/test/Makefile.in index b794e04e..d5f39447 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -478,6 +478,8 @@ EXTRA_DIST = \ exitval2.awk \ exitval2.ok \ exitval2.w32 \ + exitval3.awk \ + exitval3.ok \ fcall_exit.awk \ fcall_exit.ok \ fcall_exit2.awk \ @@ -1257,7 +1259,7 @@ BASIC_TESTS = \ callparam childin clobber closebad clsflnam compare compare2 concat1 concat2 \ concat3 concat4 convfmt \ datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ - eofsplit exit2 exitval1 exitval2 \ + eofsplit exit2 exitval1 exitval2 exitval3 \ fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \ fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \ fstabplus funsemnl funsmnam funstack \ @@ -2709,6 +2711,11 @@ exitval2: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +exitval3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + fcall_exit: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 8c270869..58a1d670 100644 --- a/test/Maketests +++ b/test/Maketests @@ -230,6 +230,11 @@ exitval2: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +exitval3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + fcall_exit: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/exitval3.awk b/test/exitval3.awk new file mode 100644 index 00000000..33e8c433 --- /dev/null +++ b/test/exitval3.awk @@ -0,0 +1,2 @@ +BEGIN { exit 42 } +END { exit } diff --git a/test/exitval3.ok b/test/exitval3.ok new file mode 100644 index 00000000..20f64b8c --- /dev/null +++ b/test/exitval3.ok @@ -0,0 +1 @@ +EXIT CODE: 42 |