diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-05-09 15:16:17 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-05-09 15:16:17 +0300 |
commit | 40d4dae999918332bdbafbf51ba060db34fe254d (patch) | |
tree | 8a0968522b8cfe7e821908ececabdb659898c6b3 | |
parent | 64ef6d2c4622f1d3bdeb17d05f28921ef2755ed5 (diff) | |
download | egawk-40d4dae999918332bdbafbf51ba060db34fe254d.tar.gz egawk-40d4dae999918332bdbafbf51ba060db34fe254d.tar.bz2 egawk-40d4dae999918332bdbafbf51ba060db34fe254d.zip |
Test suite revisions, syncing across ports.
-rw-r--r-- | pc/ChangeLog | 4 | ||||
-rw-r--r-- | pc/Makefile.tst | 77 | ||||
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 8 | ||||
-rw-r--r-- | test/Makefile.in | 8 | ||||
-rwxr-xr-x | test/exit.sh | 2 | ||||
-rw-r--r-- | vms/ChangeLog | 8 | ||||
-rw-r--r-- | vms/vmstest.com | 111 |
8 files changed, 152 insertions, 71 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog index 0f58b7d7..bb394571 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,7 @@ +Mon May 9 15:13:18 2011 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.tst: Sync with mainline version. + Sun May 8 20:57:16 2011 Arnold D. Robbins <arnold@skeeve.com> * Makefile.tst: Sync with mainline version. diff --git a/pc/Makefile.tst b/pc/Makefile.tst index f020e419..87e6d599 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -120,49 +120,46 @@ srcdir = . CLEANFILES = core core.* fmtspcl.ok # try to keep these sorted -BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \ - arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ - arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ - aryprm8 arysubnm asgext awkpath back89 backgsub childin clobber \ - closebad clsflnam compare compare2 concat1 concat2 concat3 concat4 \ - convfmt datanonl defref delarpm2 delarprm delfunc dynlj eofsplit \ - exit \ - exitval1 exitval2 fcall_exit fcall_exit2 fldchg fldchgnf fnamedat \ - fnarray fnarray2 fnaryscl fnasgnm fnmisc fordel forref forsimp \ - fsbs fsrs fsspcoln fstabplus funsemnl funsmnam funstack getline \ - getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest gsubtst2 \ - gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex hsprint inputred intest intprec iobug1 \ - leaddig leadnl litoct longsub longwrds manglprm math membug1 messages \ - minusstr mmap8k mtchi18n nasty nasty2 negexp negrange nested next \ - nfldstr nfneg \ - nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \ - noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt ofmta \ - ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf paramdup paramres \ - paramtyp parse1 parsefld parseme pcntplus prdupval prec printf0 \ - printf1 prmarscl prmreuse prt1eval prtoeval posix2008sub rand range1 \ - rebt8b1 \ - redfilnm regeq reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 \ - rstest1 rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \ - sortempty splitargv splitarr splitdef splitvar splitwht strcat1 strnum1 \ - strtod subamp subi18n subsepnm subslash substr swaplns synerr1 synerr2 \ - tradanch tweakfld uninit2 uninit3 uninit4 uninit5 uninitialized unterm \ - uparrfs wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \ - zero2 zeroe0 zeroflag +BASIC_TESTS = \ + addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 arrayref \ + arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty arynocls \ + aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 aryprm8 \ + arysubnm asgext awkpath back89 backgsub childin clobber closebad \ + clsflnam compare compare2 concat1 concat2 concat3 concat4 convfmt \ + datanonl defref delarpm2 delarprm delfunc dynlj eofsplit exitval1 \ + exitval2 fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray \ + fnarray2 fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs \ + fsspcoln fstabplus funsemnl funsmnam funstack getline getline2 \ + getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest gsubtst2 \ + gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex hsprint inputred intest \ + intprec iobug1 leaddig leadnl litoct longsub longwrds manglprm \ + math membug1 messages minusstr mmap8k mtchi18n nasty nasty2 \ + negexp negrange nested nfldstr nfneg nfset nlfldsep nlinstr \ + nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms nors \ + nulrsend numindex numsubstr octsub ofmt ofmta ofmtbig ofmtfidl \ + ofmts onlynl opasnidx opasnslf paramdup paramres paramtyp parse1 \ + parsefld parseme pcntplus posix2008sub prdupval prec printf0 \ + printf1 prmarscl prmreuse prt1eval prtoeval rand range1 rebt8b1 \ + redfilnm regeq reindops reparse resplit rs rsnul1nl rsnulbig \ + rsnulbig2 rstest1 rstest2 rstest3 rstest4 rstest5 rswhite scalar \ + sclforin sclifin sortempty splitargv splitarr splitdef splitvar \ + splitwht strcat1 strnum1 strtod subamp subi18n subsepnm subslash \ + substr swaplns synerr1 synerr2 tradanch tweakfld uninit2 uninit3 \ + uninit4 uninit5 uninitialized unterm uparrfs wideidx wideidx2 \ + widesub widesub2 widesub3 widesub4 wjposer1 zero2 zeroe0 zeroflag UNIX_TESTS = fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng GAWK_EXT_TESTS = \ - aadelete1 aadelete2 aarray1 aasort aasorti \ - arraysort \ - argtest backw badargs beginfile1 binmode1 clos1way \ - devfd devfd1 devfd2 delsub dumpvars \ - fieldwdth fpat1 funlen fsfwfs fwtest fwtest2 gensub gensub2 getlndir \ - gnuops2 gnuops3 gnureops \ - icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall lint \ - lintwarn \ - lintold manyfiles match1 match2 match3 mbstr1 nastyparm nondec nondec2 patsplit \ - posix profile1 profile2 profile3 printfbad1 printfbad2 \ - procinfs rebuf regx8bit reint reint2 rsstart1 rsstart2 rsstart3 \ - rstest6 shadow sortfor sortu splitarg4 strftime strtonum switch2 + aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ + backw badargs beginfile1 binmode1 clos1way delsub devfd devfd1 \ + devfd2 dumpvars exit fieldwdth fpat1 fsfwfs funlen fwtest fwtest2 \ + gensub gensub2 getlndir gnuops2 gnuops3 gnureops icasefs icasers \ + igncdym igncfs ignrcas2 ignrcase indirectcall lint lintold \ + lintwarn manyfiles match1 match2 match3 mbstr1 nastyparm next \ + nondec nondec2 patsplit posix printfbad1 printfbad2 procinfs \ + profile1 profile2 profile3 rebuf regx8bit reint reint2 rsstart1 \ + rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ + strtonum switch2 EXTRA_TESTS = regtest inftest INET_TESTS = inetechu inetecht inetdayu inetdayt diff --git a/test/ChangeLog b/test/ChangeLog index c7a01ccc..7e486ce1 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +Mon May 9 15:06:17 2011 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am: Put next and exit tests into gawk specific tests + since they use BEGINFILE and ENDFILE. Thanks to Pat Rankin. + Sun May 8 20:32:59 2011 Arnold D. Robbins <arnold@skeeve.com> * arraysort.ok, sort1.ok: Updated. diff --git a/test/Makefile.am b/test/Makefile.am index 5c4b8d25..e51edfd3 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -751,14 +751,14 @@ BASIC_TESTS = \ aryprm8 arysubnm asgext awkpath back89 backgsub childin clobber \ closebad clsflnam compare compare2 concat1 concat2 concat3 \ concat4 convfmt datanonl defref delarpm2 delarprm delfunc dynlj \ - eofsplit exit exitval1 exitval2 fcall_exit fcall_exit2 fldchg \ + eofsplit exitval1 exitval2 fcall_exit fcall_exit2 fldchg \ fldchgnf fnamedat fnarray fnarray2 fnaryscl fnasgnm fnmisc fordel \ forref forsimp fsbs fsrs fsspcoln fstabplus funsemnl funsmnam \ funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm \ gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \ hex hsprint inputred intest intprec iobug1 leaddig leadnl litoct \ longsub longwrds manglprm math membug1 messages minusstr mmap8k \ - mtchi18n nasty nasty2 negexp negrange nested next nfldstr nfneg \ + mtchi18n nasty nasty2 negexp negrange nested nfldstr nfneg \ nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \ noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ ofmta ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf paramdup \ @@ -779,10 +779,10 @@ UNIX_TESTS = \ GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort backw \ badargs beginfile1 binmode1 clos1way delsub devfd devfd1 devfd2 \ - dumpvars fieldwdth fpat1 fsfwfs funlen fwtest fwtest2 gensub \ + dumpvars exit fieldwdth fpat1 fsfwfs funlen fwtest fwtest2 gensub \ gensub2 getlndir gnuops2 gnuops3 gnureops icasefs icasers igncdym \ igncfs ignrcas2 ignrcase indirectcall lint lintold lintwarn \ - manyfiles match1 match2 match3 mbstr1 nastyparm nondec nondec2 \ + manyfiles match1 match2 match3 mbstr1 nastyparm next nondec nondec2 \ patsplit posix printfbad1 printfbad2 procinfs profile1 profile2 \ profile3 rebuf regx8bit reint reint2 rsstart1 rsstart2 rsstart3 \ rstest6 shadow sortfor sortu splitarg4 strftime strtonum switch2 diff --git a/test/Makefile.in b/test/Makefile.in index c085fdbe..e99cc0b0 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -936,14 +936,14 @@ BASIC_TESTS = \ aryprm8 arysubnm asgext awkpath back89 backgsub childin clobber \ closebad clsflnam compare compare2 concat1 concat2 concat3 \ concat4 convfmt datanonl defref delarpm2 delarprm delfunc dynlj \ - eofsplit exit exitval1 exitval2 fcall_exit fcall_exit2 fldchg \ + eofsplit exitval1 exitval2 fcall_exit fcall_exit2 fldchg \ fldchgnf fnamedat fnarray fnarray2 fnaryscl fnasgnm fnmisc fordel \ forref forsimp fsbs fsrs fsspcoln fstabplus funsemnl funsmnam \ funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm \ gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \ hex hsprint inputred intest intprec iobug1 leaddig leadnl litoct \ longsub longwrds manglprm math membug1 messages minusstr mmap8k \ - mtchi18n nasty nasty2 negexp negrange nested next nfldstr nfneg \ + mtchi18n nasty nasty2 negexp negrange nested nfldstr nfneg \ nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \ noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ ofmta ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf paramdup \ @@ -964,10 +964,10 @@ UNIX_TESTS = \ GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort backw \ badargs beginfile1 binmode1 clos1way delsub devfd devfd1 devfd2 \ - dumpvars fieldwdth fpat1 fsfwfs funlen fwtest fwtest2 gensub \ + dumpvars exit fieldwdth fpat1 fsfwfs funlen fwtest fwtest2 gensub \ gensub2 getlndir gnuops2 gnuops3 gnureops icasefs icasers igncdym \ igncfs ignrcas2 ignrcase indirectcall lint lintold lintwarn \ - manyfiles match1 match2 match3 mbstr1 nastyparm nondec nondec2 \ + manyfiles match1 match2 match3 mbstr1 nastyparm next nondec nondec2 \ patsplit posix printfbad1 printfbad2 procinfs profile1 profile2 \ profile3 rebuf regx8bit reint reint2 rsstart1 rsstart2 rsstart3 \ rstest6 shadow sortfor sortu splitarg4 strftime strtonum switch2 diff --git a/test/exit.sh b/test/exit.sh index 8106fbb4..9510dcdc 100755 --- a/test/exit.sh +++ b/test/exit.sh @@ -1,6 +1,6 @@ #!/bin/sh -# exit.sh --- text exit invoked in various ways +# exit.sh --- test exit invoked in various ways if [ "$AWK" = "" ] then diff --git a/vms/ChangeLog b/vms/ChangeLog index 39381a81..faa1e409 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -1,3 +1,11 @@ +Mon May 9 01:43:40 2011 Pat Rankin <rankin@pactechdata.com> + + * vmstest.com (arraysort, delsub, exit, next, ofmta, sortu): New + tests. + (paramdup): Merge with other exit_code 1 tests. + {various}: change several instances of "nl:" to "_NL:" so that all + tests which reference the null device spell it the same way. + Fri Apr 29 18:10:49 2011 Pat Rankin <rankin@pactechdata.com> * gawkmisc.vms (os_isatty): New routine. diff --git a/vms/vmstest.com b/vms/vmstest.com index 32a7662e..d5130e54 100644 --- a/vms/vmstest.com +++ b/vms/vmstest.com @@ -47,7 +47,7 @@ $ list = "msg addcomma anchgsub argarray arrayparm arrayref" - + " clobber closebad clsflnam compare compare2 concat1" $ gosub list_of_tests $ list = "concat2 concat3 concat4 convfmt datanonl defref" - - + " delarprm delarpm2 delfunc dynlj eofsplit exitval1" - + + " delarprm delarpm2 delfunc dynlj eofsplit exit exitval1" - + " exitval2 fcall_exit fcall_exit2 fldchg fldchgnf" - + " fnamedat fnarray fnarray2 fnaryscl fnasgnm fnmisc" - + " fordel forref forsimp fsbs fsspcoln fsrs fstabplus" - @@ -58,12 +58,13 @@ $ list = "getlnbuf getnr2tb getnr2tm gsubasgn gsubtest" - + " hsprint inputred intest intprec iobug1" - + " leaddig leadnl litoct longsub longwrds"- + " manglprm math membug1 messages minusstr mmap8k" - - + " mtchi18n nasty nasty2 negexp negrange nested nfldstr nfneg" + + " mtchi18n nasty nasty2 negexp negrange nested next" - + + " nfldstr nfneg" $ gosub list_of_tests $ list = "nfset nlfldsep nlinstr nlstrina noeffect nofile" - + " nofmtch noloop1 noloop2 nonl noparms nors nulrsend" - + " numindex numsubstr octsub ofmt ofmtbig ofmtfidl" - - + " ofmts onlynl opasnidx opasnslf paramdup" - + + " ofmta ofmts onlynl opasnidx opasnslf paramdup" - + " paramres paramtyp parse1 parsefld parseme pcntplus" - + " posix2008sub prdupval prec printf0 printf1 prmarscl" $ gosub list_of_tests @@ -91,18 +92,19 @@ $ return $ $gnu: $gawk_ext: echo "gawk_ext... (gawk.extensions)" -$ list = "aadelete1 aadelete2 aarray1 aasort" - - + " aasorti argtest backw badargs beginfile1 binmode1" - - + " clos1way devfd devfd1 devfd2 dumpvars fieldwdth" - +$ list = "aadelete1 aadelete2 aarray1 aasort aasorti" - + + " argtest arraysort backw badargs beginfile1 binmode1" - + + " clos1way delsub devfd devfd1 devfd2 dumpvars fieldwdth" - + " fpat1 funlen fsfwfs fwtest fwtest2 gensub" - + " gensub2 getlndir gnuops2 gnuops3 gnureops icasefs" - + " icasers igncdym igncfs ignrcase ignrcas2" $ gosub list_of_tests $ list = "indirectcall lint lintold lintwarn match1" - - + " match2 match3 manyfiles mbprintf3 mbstr1 nondec" - + + " match2 match3 manyfiles mbprintf3 mbstr1" - + + " nastyparm nondec" - + " nondec2 patsplit posix profile1 procinfs printfbad1" - + " printfbad2 regx8bit rebuf reint reint2 rsstart1" - - + " rsstart2 rsstart3 rstest6 shadow sortfor" - + + " rsstart2 rsstart3 rstest6 shadow sortfor sortu" - + " splitarg4 strtonum strftime switch2" $ gosub list_of_tests $ return @@ -269,6 +271,7 @@ $aarray1: $aasort: $aasorti: $arrayref: +$arraysort: $arrymem1: $arynasty: $arysubnm: @@ -278,6 +281,7 @@ $closebad: $compare2: $convfmt: $delarprm: +$delsub: $!!double1: $!!double2: $dynlj: @@ -300,6 +304,7 @@ $negrange: $nlstrina: $nondec: $octsub: +$ofmta: $paramtyp: $patsplit: $pcntplus: @@ -311,6 +316,7 @@ $rebt8b1: $rebt8b2: $regx8bit: $sort1: +$sortu: $splitdef: $splitwht: $strnum1: @@ -512,15 +518,6 @@ $ cmp badargs.ok _badargs.tmp $ if $status then rm _badargs.tmp;,_badargs.too; $ return $ -$paramdup: echo "paramdup" -$ set noOn -$ gawk -f paramdup.awk >_paramdup.tmp 2>&1 -$ if .not.$status then call exit_code 1 _paramdup.tmp -$ set On -$ cmp paramdup.ok _paramdup.tmp -$ if $status then rm _paramdup.tmp; -$ return -$ $nonl: echo "nonl" $ ! This one might fail, depending on the tool used to unpack the $ ! distribution. Some will add a final newline if the file lacks one. @@ -786,6 +783,7 @@ $aadelete2: $arrayparm: $fnaryscl: $match2: +$nastyparm: $opasnslf: $opasnidx: $printfbad1: @@ -854,7 +852,7 @@ $ $inetdayu: echo "inetdayu" $ echo "this test is for bidirectional UDP transmission" $ set noOn -$ gawk -f - nl: +$ gawk -f - _NL: BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; "/inet/udp/0/127.0.0.1/13" |& getline; print $0} $ set On @@ -863,7 +861,7 @@ $ $inetdayt: echo "inetdayt" $ echo "this test is for bidirectional TCP transmission" $ set noOn -$ gawk -f - nl: +$ gawk -f - _NL: BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; "/inet/tcp/0/127.0.0.1/13" |& getline; print $0} $ set On @@ -1030,6 +1028,7 @@ $ $fcall_exit: $fnarray: $funsmnam: +$paramdup: $paramres: $parseme: $synerr1: @@ -1458,6 +1457,74 @@ $ cmp profile3.ok _profile3.tmp $ if $status then rm _profile3.tmp;* $ return $ +$next: echo "next" +$ set noOn +$ gawk "{next}" _NL: > _next.tmp 2>&1 +$ gawk "function f() {next}; {f()}" _NL: >>_next.tmp 2>&1 +$ gawk "function f() {next}; BEGIN{f()}" _NL: >>_next.tmp 2>&1 +$ gawk "function f() {next}; {f()}; END{f()}" _NL: >>_next.tmp 2>&1 +$ gawk "function f() {next}; BEGINFILE{f()}" _NL: >>_next.tmp 2>&1 +$ gawk "function f() {next}; {f()}; ENDFILE{f()}" _NL: >>_next.tmp 2>&1 +$ set On +$ cmp next.ok _next.tmp +$ if $status then rm _next.tmp; +$ return +$ +$exit: echo "exit" +$ if .not.pipeok +$ then echo "Without the PIPE command, ''test' can't be run." +$ On warning then return +$ pipe echo "PIPE command is available; running exit test" +$ On warning then $ +$ pipeok = 1 +$ else echo "PIPE command is available; running exit test" +$ endif +$ set noOn +$ call/Output=_exit.tmp do__exit +$ set On +$ cmp exit.ok _exit.tmp +$ if $status then rm _exit.tmp; +$ return +$ +$do__exit: subroutine +$ x = "BEGIN{print 1; exit; print 2}; NR>1{print}; END{print 3; exit; print 4}" +$ pipe gawk -- "BEGIN { print ""a\nb"" }" | gawk -- "''x'" +$ echo "-- 1" +$ x = "function f(){exit}; END{print NR;f();print NR}" +$ pipe gawk -- "BEGIN { print ""a\nb"" }" | gawk -- "''x'" +$ echo "-- 2" +$ x = "function f(){exit}; NR>1 {f()}; END{print NR; f();print NR}" +$ pipe gawk -- "BEGIN { print ""a\nb"" }" | gawk -- "''x'" +$ echo "-- 3" +$ x = "function f(){exit}; NR>1 {f()}; END{print NR;print NR}" +$ pipe gawk -- "BEGIN { print ""a\nb"" }" | gawk -- "''x'" +$ echo "-- 4" +$ x = "function f(){exit}; BEGINFILE {f()}; NR>1 {f()}; END{print NR}" +$ pipe gawk -- "BEGIN { print ""a\nb"" }" | gawk -- "''x'" +$ echo "-- 5" +$! Ugh; extra quotes are needed here to end up with """" after "''y'" +$! expansion and finally "" when gawk actually sees its command line. +$ y = "function strip(f) { sub(/.*\//, """""""", f); return f };" +$ x = "BEGINFILE{if(++i==1) exit;}; END{print i, strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 6" +$ x = "BEGINFILE{if(++i==1) exit;}; ENDFILE{print i++}; END{print i, strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 7" +$ x = "function f(){exit}; BEGINFILE{i++ && f()}; END{print NR,strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 8" +$ x = "function f(){exit}; BEGINFILE{i++ && f()}; ENDFILE{print i}; END{print NR,strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 9" +$ x = "function f(){exit}; BEGINFILE{i++}; ENDFILE{f(); print i}; END{print NR,strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 10" +$ x = "function f(){exit}; BEGINFILE{i++}; ENDFILE{i>1 && f(); print i, strip(FILENAME)}" +$ gawk "''y'''x'" /dev/null exit.sh +$ echo "-- 11" +$ endsubroutine !do__exit +$ $vms_cmd: echo "vms_cmd" $ if f$search("vms_cmd.ok").eqs."" $ then create vms_cmd.ok @@ -1558,8 +1625,8 @@ $! make sure that the specified file's longest-record-length field is set; $! otherwise DIFF will choke if any record is longer than 512 bytes $fixup_LRL: subroutine $ lrl = 0 !VMS V5.5-2 didn't support the LRL argument yet -$ define/user sys$error nl: -$ define/user sys$output nl: +$ define/user sys$error _NL: +$ define/user sys$output _NL: $ lrl = f$file_attribute(p1,"LRL") $ if lrl.eq.0 then lrl = f$file_attribute(p1,"MRS") $ if lrl.eq.0 @@ -1570,7 +1637,7 @@ record format stream_lf size 32767 $ if $status .and. p2.eqs."purge" then rm 'p1';-1 -$ else cmp nl: nl: !deassign/user sys${error,output} +$ else cmp _NL: _NL: !deassign/user sys${error,output} $ endif $ endsubroutine !fixup_LRL $ |