[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-920
From: |
John Malmberg |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-920-g3b72ebf |
Date: |
Thu, 16 Jun 2016 21:30:37 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk-4.1-stable has been updated
via 3b72ebf754d401a3197a7680b3a0bae03b4b39b1 (commit)
from e48a5f8c731e44fa71e8a53d57a4a47c2b8b3dc0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=3b72ebf754d401a3197a7680b3a0bae03b4b39b1
commit 3b72ebf754d401a3197a7680b3a0bae03b4b39b1
Author: John Malmberg <address@hidden>
Date: Thu Jun 16 16:29:08 2016 -0500
VMS vmstest.com update
diff --git a/vms/ChangeLog b/vms/ChangeLog
index c5b12a2..3a01878 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,6 +1,13 @@
+2016-06-16 John E. Malmberg <address@hidden>
+
+ * vmstest.com: New tests (basic) hex2, mixed1, subback
+
+
2016-05-30 John E. Malmberg <address@hidden>
* vmstest.com: New tests (basic) fsnul1
+ New tests (ext) fpat4, symtab10
+ vmstest.com: Outputs test_output.xml in junit format.
2016-05-29 John E. Malmberg <address@hidden>
diff --git a/vms/vmstest.com b/vms/vmstest.com
index f047b5b..93e5a14 100644
--- a/vms/vmstest.com
+++ b/vms/vmstest.com
@@ -48,7 +48,8 @@ $! 4.1.3f: New tests
$! basic: arrayind1,rscompat,sigpipe1
$!
$! 4.1.3.g: New tests
-$! basic: fsnul1
+$! basic: fsnul1, hex2, mixed1, subback
+$! ext: fpat4, symtab10
$
$
$ echo = "write sys$output"
@@ -74,9 +75,80 @@ $
$ list = p1+" "+p2+" "+p3+" "+p4+" "+p5+" "+p6+" "+p7+" "+p8
$ list = f$edit(list,"TRIM,LOWERCASE")
$ if list.eqs."" then list = "all" ! bigtest
+$ gosub create_junit_test_header
$ gosub list_of_tests
+$ gosub finish_junit_test
$ echo "done."
$ exit
+$!
+$create_junit_test_header:
+$ junit_count = 0
+$ temp_fdl = "sys$disk:[]stream_lf.fdl"
+$ arch_code = f$extract(0, 1, arch_name)
+$!
+$ junit_hdr_file = "sys$disk:[]test_output.xml"
+$ if f$search(junit_hdr_file) .nes. "" then delete 'junit_hdr_file';*
+$ junit_body_file = "sys$disk:[]test_body_tmp.xml"
+$ if f$search(junit_body_file) .nes. "" then delete 'junit_body_file';*
+$!!
+$ if arch_code .nes. "V"
+$ then
+$ create 'junit_hdr_file'/fdl="RECORD; FORMAT STREAM_LF;"
+$ create 'junit_body_file'/fdl="RECORD; FORMAT STREAM_LF;"
+$ else
+$ if f$search(temp_fdl) .nes. "" then delete 'temp_fdl';*
+$ create 'temp_fdl'
+RECORD
+ FORMAT stream_lf
+$ continue
+$ create 'junit_hdr_file'/fdl='temp_fdl'
+$ create 'junit_body_file'/fdl='temp_fdl'
+$ endif
+$ open/append junit 'junit_body_file'
+$ return
+$!
+$finish_junit_test:
+$ open/append junit_hdr 'junit_hdr_file'
+$ write junit_hdr "<?xml version=""1.0"" encoding=""UTF-8""?>"
+$ write junit_hdr "<testsuite name=""gawk"""
+$ write junit_hdr " tests=""''junit_count'"">"
+$ close junit_hdr
+$ write junit "</testsuite>"
+$ close junit
+$ append 'junit_body_file' 'junit_hdr_file'
+$ delete 'junit_body_file';*
+$ return
+$!
+$junit_report_skip:
+$ write sys$output "Skipping test ''test' reason ''skip_reason'."
+$ junit_count = junit_count + 1
+$ write junit " <testcase name=""''test'"""
+$ write junit " classname=""''test_class'"">"
+$ write junit " <skipped/>"
+$ write junit " </testcase>"
+$ return
+$!
+$junit_report_fail_diff:
+$ fail_msg = "failed"
+$ fail_type = "diff"
+$! fall through to junit_report_fail
+$junit_report_fail:
+$ write sys$output "failing test ''test' reason ''fail_msg'."
+$ junit_count = junit_count + 1
+$ write junit " <testcase name=""''test'"""
+$ write junit " classname=""''test_class'"">"
+$ write junit -
+ " <failure message=""''fail_msg'"" type=""''fail_type'"" >"
+$ write junit " </failure>"
+$ write junit " </testcase>"
+$ return
+$!
+$junit_report_pass:
+$ junit_count = junit_count + 1
+$ write junit " <testcase name=""''test'"""
+$ write junit " classname=""''test_class'"">"
+$ write junit " </testcase>"
+$ return
$
$vms_debug: echo "Switching to gawk_debug.exe"
$ gawk = "$sys$disk:[-]gawk_debug.exe"
@@ -116,11 +188,11 @@ $ list = "getline getline2 getline3 getline4
getline5 " -
+ " getlnbuf getnr2tb getnr2tm gsubasgn gsubtest" -
+ " gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6" -
+ " gsubtst7 gsubtst8" -
- + " hex hsprint" -
+ + " hex hex2 hsprint" -
+ " inpref inputred intest intprec iobug1" -
+ " leaddig leadnl litoct longsub longwrds"-
- + " manglprm math membug1 messages minusstr mmap8k" -
- + " mtchi18n"
+ + " manglprm math membug1 messages minusstr mixed1" -
+ + " mmap8k mtchi18n"
$ gosub list_of_tests
$ list = "nasty nasty2 negexp negrange nested nfldstr" -
+ " nfloop nfneg nfset nlfldsep nlinstr nlstrina" -
@@ -142,7 +214,7 @@ $ list = "rand range1 rebrackloc rebt8b1 redfilnm
regeq" -
$ gosub list_of_tests
$ list = "scalar sclforin sclifin sigpipe1 sortempty sortglos" -
+ " splitargv splitarr splitdef splitvar splitwht" -
- + " strcat1 strtod strnum1 subamp subi18n subsepnm" -
+ + " strcat1 strtod strnum1 subamp subback subi18n subsepnm" -
+ " subslash substr swaplns synerr1 synerr2"
$ gosub list_of_tests
$ list = "tradanch tweakfld" -
@@ -170,8 +242,8 @@ $ list = "aadelete1 aadelete2 aarray1 aasort
aasorti" -
+ " clos1way5 charasbytes crlf" -
+ " dbugeval delsub devfd devfd1 devfd2 dumpvars" -
+ " exit" -
- + " fieldwdth fpat1 fpat2 fpat3 fpatnull funlen functab1" -
- + " functab2 functab3 fsfwfs fwtest fwtest2 fwtest3"
+ + " fieldwdth fpat1 fpat2 fpat3 fpat4 fpatnull funlen" -
+ + " functab1 functab2 functab3 fsfwfs fwtest fwtest2 fwtest3"
$ gosub list_of_tests
$ list = "genpot gensub gensub2 getlndir gnuops2 gnuops3" -
+ " gnureops" -
@@ -193,7 +265,7 @@ $ list = "regx8bit rebuf reginttrad regnul1
regnul2" -
+ " shadow sortfor sortu split_after_fpat splitarg4" -
+ " strtonum strftime switch2 symtab1 symtab2 symtab3" -
+ " symtab4 symtab5 symtab6 symtab7 symtab8 symtab9" -
- + " watchpoint1"
+ + " symtab10 watchpoint1"
$ gosub list_of_tests
$ return
$
@@ -253,8 +325,11 @@ $ list = "fnmatch filefuncs fork fork2 fts
functab4" -
$ gosub list_of_tests
$ return
$!
-$mpfr: echo "mpfr... - Not yet implmented on VMS"
+$mpfr:
+$ test_class = "mpfr"
+$ skip_reason = "Not yet implmented on VMS"
$ ! mpfr has not yet been ported to VMS.
+$ gosub junit_report_skip
$ return
$!
$! list_of_tests: process 'list', a space-separated list of tests.
@@ -285,33 +360,19 @@ $aryprm8:
$aryprm9:
$asgext:
$backgsub:
-$backsmalls2:
-$backw:
$concat1:
$concat2:
$concat3:
-$crlf:
$datanonl:
$delarpm2:
$dfamb1:
$exit2:
$fldchg:
$fldchgnf:
-$fmttest:
$fordel:
-$fpat1:
-$fpat3:
-$fpat4:
-$fpatnull:
-$fsfwfs:
$fsnul1:
$fsrs:
-$funlen:
$funstack:
-$fwtest:
-$fwtest2:
-$fwtest3:
-$gensub:
$getline3:
$getline4:
$getnr2tb:
@@ -323,16 +384,11 @@ $gsubtst5:
$gsubtst7:
$gsubtst8:
$hex:
-$icasers:
-$igncfs:
-$igncdym:
-$indirectcall:
+$hex2:
$inpref:
$inputred:
-$lc_num1:
$leadnl:
$manglprm:
-$match3:
$membug1:
$nested:
$nfloop:
@@ -354,56 +410,107 @@ $prec:
$prtoeval:
$range1:
$rebrackloc:
-$rebuf:
$regeq:
$regexpbrack:
-$regnul1:
-$regnul2:
$reindops:
$reparse:
-$rsgetline:
$rsnul1nl:
-$rsstart1:
$rstest1:
$rstest2:
$rstest3:
-$rstest6:
$rswhite:
$sortempty:
-$sortfor:
$sortglos:
-$split_after_fpat:
-$splitarg4:
$splitargv:
$splitarr:
$splitvar:
-$sprintfc:
$strcat1:
$strtod:
+$subback:
$subsepnm:
$swaplns:
$uparrfs:
$wjposer1:
$zeroe0:
+$ test_class = "basic"
+$ goto common_with_test_in
+$!
+$backsmalls2:
+$fmttest:
+$lc_num1:
+$sprintfc:
+$ classname="charset_tests"
+$ goto common_with_test_in
+$!
+$backw:
+$crlf:
+$fpat1:
+$fpat3:
+$fpat4:
+$fpatnull:
+$fsfwfs:
+$funlen:
+$fwtest:
+$fwtest2:
+$fwtest3:
+$gensub:
+$icasers:
+$igncdym:
+$igncfs:
+$indirectcall:
+$match3:
+$rebuf:
+$regnul1:
+$regnul2:
+$rsgetline:
+$rsstart1:
+$rstest6:
+$sortfor:
+$split_after_fpat:
+$splitarg4:
+$ classname="gawk_ext"
+$ goto common_with_test_in
+$!
+$common_with_test_in:
$! common with 'test'.in
$!
$ echo "''test'"
$ gawk -f 'test'.awk 'test'.in >_'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
+$!
+$!
$arrayind1:
$ echo "''test'"
+$ test_class = "basic"
$ define/user sys$error _'test'.tmp
$ gawk -f 'test'.awk 'test'.in >_'test'.tmp2
$ append _'test'.tmp2 _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;,_'test'.tmp2;
+$ if $status
+$ then
+$ rm _'test'.tmp;,_'test'.tmp2;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$indirectbuiltin: ! 4.1.2
$ echo "''test'"
+$ classname="gawk_ext"
$ ! No shell simulation in gawk
$ temp_file = "sys$disk:[]_'test'.tmp"
$ if f$search(temp_file) .nes. "" then delete 'temp_file';*
@@ -414,26 +521,28 @@ $ rm = old_rm
$ ! gawk subprocesses creating new generation of stdout
$ ! instead of appending to open one.
$ cmp 'test'.ok sys$disk:[]_'test'.tmp;1
-$ if $status then rm _'test'.tmp;*,x1.out;,x2.out;
+$ if $status
+$ then
+$ rm _'test'.tmp;*,x1.out;,x2.out;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$! more common tests, without a data file: gawk -f 'test'.awk
$ofmta:
$ if arch_name .eqs. "VAX"
$ then
-$ echo "''test' skipped on VAX."
+$ test_class = "basic"
+$ skip_reason = "skipped on VAX"
+$ gosub junit_report_skip
$ return
$ endif
-$aarray1:
-$aasort:
-$aasorti:
$arrayref:
-$arraysort:
$arrymem1:
$arynasty:
$arysubnm:
-$asort:
-$asorti:
$badassign1:
$badbuild:
$callparam:
@@ -442,72 +551,114 @@ $compare2:
$convfmt:
$delargv:
$delarprm:
-$delsub:
$dynlj:
-$fnarydel:
-$fnparydl:
-$fpat2:
$forref:
$forsimp:
$funsemnl:
-$gensub2:
-$gnuops2:
-$gnuops3:
-$gnureops:
$hsprint:
-$icasefs:
$intest:
-$match1:
$math:
$minusstr:
$negrange:
$nulinsrc:
$nlstrina:
-$nondec:
$octsub:
$paramtyp:
$paramuninitglobal:
-$patsplit:
$pcntplus:
$printf1:
-$procinfs:
$prt1eval:
$rebt8b1:
-$rebt8b2:
$regexprange:
$regrange:
-$regx8bit:
-$sort1:
-$sortu:
$splitdef:
$splitwht:
$strnum1:
-$strtonum:
$substr:
-$switch2:
$zero2:
$zeroflag:
+$ test_class = "basic"
+$ goto common_without_test_in
+$!
+$aarray1:
+$aasort:
+$aasorti:
+$arraysort:
+$delsub:
+$fpat2:
+$gensub2:
+$gnuops2:
+$gnuops3:
+$gnureops:
+$icasefs:
+$match1:
+$nondec:
+$patsplit:
+$procinfs:
+$regx8bit:
+$sortu:
+$strtonum:
+$switch2:
+$ classname="gawk_ext"
+$ goto common_without_test_in
+$!
+$asort:
+$asorti:
+$fnarydel:
+$fnparydl:
+$rebt8b2:
+$sort1:
+$ classname="charset_tests"
+$ goto common_without_test_in
+$!
+$common_without_test_in:
$! common without 'test'.in
$ echo "''test'"
$ set noOn
$ gawk -f 'test'.awk 2>&1 >_'test'.tmp
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$colonwarn: echo "''test'"
+$ classname="gawk_ext"
$ gawk -f 'test'.awk 1 < 'test'.in > _'test'.tmp
$ gawk -f 'test'.awk 2 < 'test'.in > _'test'_2.tmp
$ gawk -f 'test'.awk 3 < 'test'.in > _'test'_3.tmp
+$ if f$search("sys$disk:[]_''test'_%.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'_%.tmp;2
+$ endif
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ append _'test'_2.tmp,_'test'_3.tmp _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp;1
-$ if $status then rm _'test'*.tmp;*
+$ if $status
+$ then
+$ rm _'test'*.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$dbugeval:
$ echo "''test'"
+$ classname="gawk_ext"
$ if f$getdvi("SYS$COMMAND", "TRM")
$ then
$ set noOn
@@ -515,64 +666,112 @@ $ gawk --debug -f /dev/null < 'test'.in 2>&1
> _'test.tmp'
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp;1
-$ if $status then rm _'test'*.tmp;*
-$ return
+$ if $status
+$ then
+$ rm _'test'*.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ else
-$ echo "Skipping because not a terminal."
+$ skip_reason = "Skipping because not a terminal."
+$ gosub junit_report_skip
$ endif
+$ return
$!
$rsglstdin:
$ echo "''test'"
+$ classname="gawk_ext"
$ set noOn
$ define/user sys$input rsgetline.in
$ gawk -f rsgetline.awk 2>&1 > _'test'.tmp
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$genpot:
$ echo "''test'"
+$ classname="gawk_ext"
$ set noOn
$ gawk -f 'test'.awk --gen-pot 2>&1 >_'test'.tmp
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$paramasfunc1:
$paramasfunc2:
$ echo "''test'"
+$ classname="basic"
$ set noOn
$ gawk -f 'test'.awk --posix 2>&1 >_'test'.tmp
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$watchpoint1:
$ echo "''test'"
+$ classname="gawk_ext"
$ set noOn
$ gawk "-D" -f 'test'.awk 'test'.in < 'test'.script 2>&1 >_'test'.tmp
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$!
$!
$fork: ! 4.0.2
$fork2: ! 4.0.2
-$ echo "''test' not implemented on VMS skipped"
+$ classname="shlib"
+$ skip_reasons = "''test' not implemented on VMS"
+$ gosub junit_report_skip
$ return
$!
$testext:
-$ set process/parse=extended ! ODS-5 only
$ echo "''test'"
+$ classname="shlib"
+$ if arch_name .eqs. "VAX"
+$ then
+$ skip_reason = "ODS-5 required"
+$ gosub junit_report_skip
+$ return
+$ endif
+$ set process/parse=extended ! ODS-5 only
$ gawk "/^(@load|BEGIN)/,/^}/" [-.extension]'test'.c > _'test'.awk
$ set noOn
$ AWKLIBPATH_dir
@@ -583,16 +782,26 @@ $ gawk "{gsub(""no children"",""No child processes"")}1" -
$ rm sys$disk:[]_'test'.tmp;*
$ mv sys$disk:[]_'test'.tmp1 sys$disk:[]_'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$!
$double1:
$double2:
-$ echo "''test' skipped"
+$ echo "''test'"
+$ test_class = "hardware"
+$ skip_reason = "skipped"
+$ gosub junit_report_skip
$ return
$
$getline5: echo "''test'"
+$ test_class = "basic"
$ ! Use of echo and rm inside the awk script makes it necessary
$ ! for some temporary redefinitions. The VMS gawk.exe also creates
$ ! multiple output files. Only the first contains the data.
@@ -606,7 +815,13 @@ $ rm = old_rm
$ delsym old_echo
$ delsym old_rm
$ cmp 'test'.ok sys$disk:[]_'test'.tmp;1
-$ if $status then rm _'test'.tmp;*,f.;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*,f.;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$msg:
@@ -647,20 +862,41 @@ $ gawk -f printlang.awk
$ return
$
$poundbang:
+$ echo "''test'"
+$ test_class = "unix_tests"
+$ skip_reason = "not supported"
+$ gosub junit_report_skip
+$ return
+$!
$pty1:
-$ echo "''test': not supported"
+$ echo "''test'"
+$ test_class = "gawk_ext"
+$ skip_reason = "not supported"
+$ gosub junit_report_skip
$ return
$!
$rscompat:
$ echo "''test'"
+$ test_class = "basic"
$ gawk --traditional -f 'test'.awk 'test'.in >_'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$
$
$messages: echo "''test'"
+$ test_class = "basic"
$ set noOn
$ gawk -f 'test'.awk > _out2 >& _out3
$ cmp out1.ok sys$disk:[]_out1.
@@ -668,64 +904,140 @@ $ if $status then rm _out1.;
$ cmp out2.ok sys$disk:[]_out2.
$ if $status then rm _out2.;
$ cmp out3.ok sys$disk:[]_out3.
-$ if $status then rm _out3.;
+$ if $status
+$ then
+$ rm _out3.;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$argarray: echo "argarray"
+$ test_class = "basic"
$ define/User TEST "test" !this is useless...
$ gawk -f argarray.awk ./argarray.in - >_argarray.tmp
just a test
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp argarray.ok sys$disk:[]_argarray.tmp
-$ if $status then rm _argarray.tmp;
+$ if $status
+$ then
+$ rm _argarray.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$fstabplus: echo "fstabplus"
+$ test_class = "basic"
$ gawk -f fstabplus.awk >_fstabplus.tmp
1 2
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp fstabplus.ok sys$disk:[]_fstabplus.tmp
-$ if $status then rm _fstabplus.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$longwrds: echo "longwrds"
+$ test_class = "basic"
$ gawk -v "SORT=sort sys$input: _longwrds.tmp" -f longwrds.awk
longwrds.in >_NL:
$ cmp longwrds.ok sys$disk:[]_longwrds.tmp
-$ if $status then rm _longwrds.tmp;
+$ if $status
+$ then
+$ rm _longwrds.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$fieldwdth: echo "fieldwdth"
+$ test_class = "gawk_ext"
$ gawk -v "FIELDWIDTHS=2 3 4" "{ print $2}" >_fieldwdth.tmp
123456789
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp fieldwdth.ok sys$disk:[]_fieldwdth.tmp
-$ if $status then rm _fieldwdth.tmp;
+$ if $status
+$ then
+$ rm _fieldwdth.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$ignrcase: echo "ignrcase"
+$ test_class = "gawk_ext"
$ gawk -v "IGNORECASE=1" "{ sub(/y/, """"); print}" >_ignrcase.tmp
xYz
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp ignrcase.ok sys$disk:[]_ignrcase.tmp
-$ if $status then rm _ignrcase.tmp;
+$ if $status
+$ then
+$ rm _ignrcase.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$regtest:
+$ echo "regtest"
+$ test_class = "extra"
$ if f$search("regtest.com").eqs.""
-$ then echo "regtest: not available"
-$ else echo "regtest"
+$ then
+$ skip_reason = "Not implemented on VMS"
+$ gosub junit_report_skip
+$ else
+$ echo "regtest"
$ echo "Some of the output from regtest is very system specific, do not"
$ echo "be distressed if your output differs from that distributed."
$ echo "Manual inspection is called for."
$ @regtest.com
+$ skip_reason = "Not implemented on VMS"
+$ gosub junit_report_skip
$ endif
$ return
$
$posix: echo "posix"
+$ test_class = "gawk_ext"
$ gawk -f posix.awk >_posix.tmp
1:2,3 4
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp posix.ok sys$disk:[]_posix.tmp
-$ if $status then rm _posix.tmp;
+$ if $status
+$ then
+$ rm _posix.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$manyfiles: echo "manyfiles"
+$ test_class = "gawk_ext"
$!! this used to use a hard-coded value of 300 simultaneously open
$!! files, but if our open file quota is generous enough then that
$!! wouldn't exercise the ability to handle more than the maximum
@@ -741,7 +1053,6 @@ $ gawk -- "BEGIN {for (i = 1; i <= ''f_cnt'; i++) print
i, i}" >_manyfiles.dat
$ echo "(processing ''f_cnt' files; this may take quite a while)"
$ set noOn ! continue even if gawk fails
$ gawk -f manyfiles.awk _manyfiles.dat _manyfiles.dat
-$ set On
$ define/User sys$error _NL:
$ define/User sys$output _manyfiles.tmp
$ search/Match=Nor/Output=_NL:/Log [.junk]*.* ""
@@ -751,103 +1062,230 @@ $deck !some input begins with "$"
$4 != 2 {++count}
END {if (NR != F_CNT+1 || count != 1) {print "\nFailed!"}}
$eod
+$ set On
+$ skip_reason = "Test detection not implemented yet"
+$ gosub junit_report_skip
$ rm _manyfiles.tmp;,_manyfiles.dat;,[.junk]*.*;*,[]junk.dir;
$ return
$
$compare: echo "compare"
+$ test_class = "basic"
$ gawk -f compare.awk 0 1 compare.in >_compare.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp compare.ok sys$disk:[]_compare.tmp
-$ if $status then rm _compare.tmp;
+$ if $status
+$ then
+$ rm _compare.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$rs: echo "rs"
+$ test_class = "basic"
$ gawk -v "RS=" "{ print $1, $2}" rs.in >_rs.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp rs.ok sys$disk:[]_rs.tmp
-$ if $status then rm _rs.tmp;
+$ if $status
+$ then
+$ rm _rs.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$fsbs: echo "fsbs"
+$ test_class = "basic"
$ gawk -v "FS=\" "{ print $1, $2 }" fsbs.in >_fsbs.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp fsbs.ok sys$disk:[]_fsbs.tmp
-$ if $status then rm _fsbs.tmp;
+$ if $status
+$ then
+$ rm _fsbs.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$inftest: echo "inftest"
+$ test_class = "extra"
$ !! echo "This test is very machine specific..."
$ set noOn
$ gawk -f inftest.awk >_inftest.tmp
$ !! cmp inftest.ok sys$disk:[]_inftest.tmp !just care that gawk
doesn't crash...
-$ if $status then rm _inftest.tmp;
+$ if $status
+$ then
+$ rm _inftest.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$getline2: echo "getline2"
+$ test_class = "basic"
$ gawk -f getline2.awk getline2.awk getline2.awk >_getline2.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp getline2.ok sys$disk:[]_getline2.tmp
-$ if $status then rm _getline2.tmp;
+$ if $status
+$ then
+$ rm _getline2.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$rand: echo "rand"
+$ test_class = "basic"
$ echo "The following line should just be 19 random numbers between 1 and
100"
$ echo ""
$ gawk -f rand.awk
+$ skip_reason = "Test detection not implemented yet"
+$ gosub junit_report_skip
$ return
$
$negexp: echo "negexp"
+$ test_class = "basic"
$ gawk "BEGIN { a = -2; print 10^a }" >_negexp.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp negexp.ok sys$disk:[]_negexp.tmp
-$ if $status then rm _negexp.tmp;
+$ if $status
+$ then
+$ rm _negexp.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$awkpath: echo "awkpath"
+$ test_class = "basic"
$ define/User AWK_LIBRARY [],[.lib]
$ gawk -f awkpath.awk >_awkpath.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp awkpath.ok sys$disk:[]_awkpath.tmp
-$ if $status then rm _awkpath.tmp;
+$ if $status
+$ then
+$ rm _awkpath.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$argtest: echo "argtest"
+$ test_class = "gawk_ext"
$ gawk -f argtest.awk -x -y abc >_argtest.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp argtest.ok sys$disk:[]_argtest.tmp
-$ if $status then rm _argtest.tmp;
+$ if $status
+$ then
+$ rm _argtest.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$badargs: echo "badargs"
+$ test_class = "gawk_ext"
$ on error then continue
$ gawk -f 2>&1 >_badargs.too
+$ if f$search("sys$disk:[]_''test'.too;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.too;2
+$ endif
$! search/Match=Nor _badargs.too "patchlevel" /Output=_badargs.tmp
$ gawk "/patchlevel/{next}; {gsub(""\"""",""'""); print}" <_badargs.too
>_badargs.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp badargs.ok sys$disk:[]_badargs.tmp
-$ if $status then rm _badargs.tmp;,_badargs.too;
+$ if $status
+$ then
+$ rm _badargs.tmp;,_badargs.too;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$nonl: echo "nonl"
+$ test_class = "basic"
$ ! This one might fail, depending on the tool used to unpack the
$ ! distribution. Some will add a final newline if the file lacks one.
$ AWKPATH_srcdir
$ gawk --lint -f nonl.awk _NL: >_nonl.tmp 2>&1
$ cmp nonl.ok sys$disk:[]_nonl.tmp
-$ if $status then rm _nonl.tmp;
+$ if $status
+$ then
+$ rm _nonl.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$defref: echo "defref"
+$ test_class = "basic"
$ set noOn
$ AWKPATH_srcdir
$ gawk --lint -f defref.awk >_defref.tmp 2>&1
$ if .not. $status then call exit_code '$status' _defref.tmp
$ set On
$ cmp defref.ok sys$disk:[]_defref.tmp
-$ if $status then rm _defref.tmp;
+$ if $status
+$ then
+$ rm _defref.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$nofmtch: echo "nofmtch"
+$ test_class = "basic"
$ AWKPATH_srcdir
$ gawk --lint -f nofmtch.awk >_nofmtch.tmp 2>&1
$ cmp nofmtch.ok sys$disk:[]_nofmtch.tmp
-$ if $status then rm _nofmtch.tmp;
+$ if $status
+$ then
+$ rm _nofmtch.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$strftime: echo "strftime"
+$ test_class = "gawk_ext"
$ ! this test could fail on slow machines or on a second boundary,
$ ! so if it does, double check the actual results
$ ! This test needs SYS$TIMEZONE_NAME and SYS$TIMEZONE_RULE
@@ -856,7 +1294,8 @@ $ ! This test now needs GNV Corutils to work
$ date_bin = "gnv$gnu:[bin]gnv$date.exe"
$ if f$search(date_bin) .eqs. ""
$ then
-$ echo "''test' skipped"
+$ skip_reason = "Need GNV Coreutils gnv$date.exe"
+$ gosub junit_report_skip
$ return
$ endif
$ date := $'date_bin'
@@ -877,100 +1316,192 @@ $ close ftmp
$ gawk -v "OUTPUT"=_strftime.tmp -f strftime.awk strftime.in
$ set noOn
$ cmp strftime.ok sys$disk:[]_strftime.tmp
-$ if $status then rm _strftime.tmp;,strftime.ok;*,strftime.in;*
+$ if $status
+$ then
+$ rm _strftime.tmp;,strftime.ok;*,strftime.in;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$litoct: echo "litoct"
+$ test_class = "basic"
$ gawk --traditional -f litoct.awk >_litoct.tmp
ab
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp litoct.ok sys$disk:[]_litoct.tmp
-$ if $status then rm _litoct.tmp;
+$ if $status
+$ then
+$ rm _litoct.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$resplit: echo "resplit"
+$ test_class = "gawk_ext"
$ gawk -- "{ FS = "":""; $0 = $0; print $2 }" >_resplit.tmp
a:b:c d:e:f
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp resplit.ok sys$disk:[]_resplit.tmp
-$ if $status then rm _resplit.tmp;
+$ if $status
+$ then
+$ rm _resplit.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$intprec: echo "intprec"
+$ test_class = "basic"
$ gawk -f intprec.awk >_intprec.tmp 2>&1
$ cmp intprec.ok sys$disk:[]_intprec.tmp
-$ if $status then rm _intprec.tmp;
+$ if $status
+$ then
+$ rm _intprec.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$incdupe: echo "''test'"
+$ test_class = "gawk_ext"
$ set noOn
$ gawk --lint -i inclib -i inclib.awk "BEGIN {print sandwich(""a"", ""b"",
""c"")}" > _'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$incdupe2: echo "''test'"
+$ test_class = "gawk_ext"
$ set noOn
$ gawk --lint -f inclib -f inclib.awk >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$incdupe3: echo "''test'"
+$ test_class = "gawk_ext"
$ gawk --lint -f hello -f hello.awk >_'test'.tmp 2>&1
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$incdupe4: echo "''test'"
+$ test_class = "gawk_ext"
$ set NoOn
$ gawk --lint -f hello -i hello.awk >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$incdupe5: echo "''test'"
+$ test_class = "gawk_ext"
$ set NoOn
$ gawk --lint -i hello -f hello.awk >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$incdupe6: echo "''test'"
+$ test_class = "gawk_ext"
$ set NoOn
$ gawk --lint -i inchello -f hello.awk >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$incdupe7: echo "''test'"
+$ test_class = "gawk_ext"
$ set NoOn
$ gawk --lint -f hello -i inchello >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$include2: echo "''test'"
+$ test_class = "gawk_ext"
$ gawk -i inclib "BEGIN {print sandwich(""a"", ""b"", ""c"")}" >_'test'.tmp
2>&1
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$id:
$symtab1:
$symtab2:
$symtab3: echo "''test'"
+$ test_class = "gawk_ext"
$ set noOn
$ old_sort = sort
$ sort = "@sys$disk:[-.vms]vms_sort.com"
@@ -978,37 +1509,68 @@ $ gawk -f 'test'.awk >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ sort = old_sort
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$symtab4:
$symtab5:
$symtab7: echo "''test'"
+$ test_class = "gawk_ext"
$ set noOn
$ gawk -f 'test'.awk <'test'.in >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$symtab6: echo "''test'"
+$ test_class = "gawk_ext"
$ set noOn
$ gawk -d__'test'.tmp -f 'test'.awk
$ pipe search __'test'.tmp "ENVIRON","PROCINFO" /match=nor > _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*,__'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*,__'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$symtab8: echo "''test'"
+$ test_class = "gawk_ext"
$ set noOn
$ gawk -d__'test'.tmp -f 'test'.awk 'test'.in > _'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ pipe search __'test'.tmp "ENVIRON","PROCINFO","FILENAME" /match=nor >
___'test'.tmp
$ convert/append ___'test'.tmp _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*,__'test'.tmp;*,___'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*,__'test'.tmp;*,___'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
@@ -1021,170 +1583,378 @@ $! Additionally each awk "system" call results in a
new version of the output fi
$! so we need to compensate for that as well.
$!-----------------------------------------------------------------------------------
$symtab9: echo "''test'"
+$ test_class = "gawk_ext"
$ old_rm = rm ! Remember old definition of rm
$ rm = "!" ! Redefine rm to something harmless
$ gawk -f 'test'.awk >_'test'.tmp
$ rm = old_rm ! Restore old value
$ delsym old_rm
$ cmp 'test'.ok sys$disk:[]_'test'.tmp;-0 ! -0 is the lowest version
-$ if $status then rm _'test'.tmp;*,testit.txt;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*,testit.txt;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
+$ return
+$!
+$symtab10: echo "''test'"
+$ test_class = "gawk_ext"
+$ set noOn
+$ gawk "-D" -f 'test'.awk < 'test'.in > _'test'.tmp 2>&1
+$ if .not. $status then call exit_code '$status' _'test'.tmp
+$ cmp 'test'.ok sys$disk:[]_'test'.tmp
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
+$ set On
$ return
$
$childin: echo "''test'"
+$ test_class = "basic"
$ cat = "type sys$input"
$ gawk -f 'test'.awk < 'test'.in > _'test'.tmp
$ delsym cat
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$noeffect: echo "noeffect"
+$ test_class = "basic"
$ AWKPATH_srcdir
$ gawk --lint -f noeffect.awk >_noeffect.tmp 2>&1
$ cmp noeffect.ok sys$disk:[]_noeffect.tmp
-$ if $status then rm _noeffect.tmp;
+$ if $status
+$ then
+$ rm _noeffect.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$numsubstr: echo "numsubstr"
+$ test_class = "basic"
$ AWKPATH_srcdir
$ gawk -f numsubstr.awk numsubstr.in >_numsubstr.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp numsubstr.ok sys$disk:[]_numsubstr.tmp
-$ if $status then rm _numsubstr.tmp;
+$ if $status
+$ then
+$ rm _numsubstr.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$prmreuse: echo "prmreuse"
+$ test_class = "basic"
$ if f$search("prmreuse.ok").eqs."" then create prmreuse.ok
$ gawk -f prmreuse.awk >_prmreuse.tmp
$ cmp prmreuse.ok sys$disk:[]_prmreuse.tmp
-$ if $status then rm _prmreuse.tmp;
+$ if $status
+$ then
+$ rm _prmreuse.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$fflush:
-$ echo "fflush: not supported"
+$ echo "fflush"
+$ test_class = "unix_tests"
+$ skip_reason = "not supported"
+$ gosub junit_report_skip
$ return
$!!fflush: echo "fflush"
$ ! hopelessly Unix-specific
$!! @fflush.sh >_fflush.tmp
$ cmp fflush.ok sys$disk:[]_fflush.tmp
-$ if $status then rm _fflush.tmp;
+$ if $status
+$ then
+$ rm _fflush.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$getlnhd:
-$ echo "getlnhd skipped"
+$ echo "getlnhd"
$ !Expects a Unix shell
+$ test_class = "unix_tests"
+$ skip_reason = "Expects a Unix shell"
+$ gosub junit_report_skip
$ return
$!!getlnhd: echo "getlnhd"
$ gawk -f getlnhd.awk >_getlnhd.tmp
$ cmp getlnhd.ok sys$disk:[]_getlnhd.tmp
-$ if $status then rm _getlnhd.tmp;
+$ if $status
+$ then
+$ rm _getlnhd.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$tweakfld: echo "tweakfld"
+$ test_class = "basic"
$ gawk -f tweakfld.awk tweakfld.in >_tweakfld.tmp
$ if f$search("errors.cleanup").nes."" then rm errors.cleanup;*
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp tweakfld.ok sys$disk:[]_tweakfld.tmp
-$ if $status then rm _tweakfld.tmp;
+$ if $status
+$ then
+$ rm _tweakfld.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$clsflnam: echo "clsflnam"
+$ test_class = "basic"
$ if f$search("clsflnam.ok").eqs."" then create clsflnam.ok
$ gawk -f clsflnam.awk clsflnam.in >_clsflnam.tmp 2>&1
$ cmp clsflnam.ok sys$disk:[]_clsflnam.tmp
-$ if $status then rm _clsflnam.tmp;
+$ if $status
+$ then
+$ rm _clsflnam.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$mmap8k: echo "mmap8k"
+$ test_class = "basic"
$ gawk "{ print }" mmap8k.in >_mmap8k.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp mmap8k.in sys$disk:[]_mmap8k.tmp
-$ if $status then rm _mmap8k.tmp;
+$ if $status
+$ then
+$ rm _mmap8k.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$eofsplit: echo "eofsplit"
+$ test_class = "basic"
$ if f$search("eofsplit.ok").eqs."" then create eofsplit.ok
$ gawk -f eofsplit.awk >_eofsplit.tmp
$ cmp eofsplit.ok sys$disk:[]_eofsplit.tmp
-$ if $status then rm _eofsplit.tmp;
+$ if $status
+$ then
+$ rm _eofsplit.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$back89: echo "back89"
+$ test_class = "basic"
$ gawk "/a\8b/" back89.in >_back89.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp back89.ok sys$disk:[]_back89.tmp
-$ if $status then rm _back89.tmp;
+$ if $status
+$ then
+$ rm _back89.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$tradanch: echo "tradanch"
+$ test_class = "basic"
$ if f$search("tradanch.ok").eqs."" then create tradanch.ok
$ gawk --traditional -f tradanch.awk tradanch.in >_tradanch.tmp
$ cmp tradanch.ok sys$disk:[]_tradanch.tmp
-$ if $status then rm _tradanch.tmp;
+$ if $status
+$ then
+$ rm _tradanch.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$reginttrad: echo "''test'"
+$ test_class = "basic"
$ gawk --traditional -r -f 'test'.awk >_'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$pid: echo "pid"
+$ test_class = "unix_tests"
$ pid = f$integer("%x" + f$getjpi("","PID"))
$ ppid = f$integer("%x" + f$getjpi("","OWNER"))
$ gawk -v "ok_pid=''pid'" -v "ok_ppid=''ppid'" -f pid.awk >_pid.tmp >&
_NL:
$ cmp pid.ok sys$disk:[]_pid.tmp
-$ if $status then rm _pid.tmp;
+$ if $status
+$ then
+$ rm _pid.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$strftlng: echo "strftlng"
+$ test_class = "unix_tests"
$ define/User TZ "UTC" !useless
$ gawk -f strftlng.awk >_strftlng.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp strftlng.ok sys$disk:[]_strftlng.tmp
-$ if $status then rm _strftlng.tmp;
+$ if $status
+$ then
+$ rm _strftlng.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$nfldstr: echo "nfldstr"
+$ test_class = "basic"
$ if f$search("nfldstr.ok").eqs."" then create nfldstr.ok
$ gawk "$1 == 0 { print ""bug"" }" >_nfldstr.tmp
$ cmp nfldstr.ok sys$disk:[]_nfldstr.tmp
-$ if $status then rm _nfldstr.tmp;
+$ if $status
+$ then
+$ rm _nfldstr.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$nors: echo "nors"
+$ test_class = "basic"
$!! there's no straightforward way to supply non-terminated input on the fly
$!! @echo A B C D E | tr -d '\12' | $(AWK) '{ print $$NF }' -
$(srcdir)/nors.in > _$@
$!! so just read a line from sys$input instead
$ gawk "{ print $NF }" - nors.in >_nors.tmp
A B C D E
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp nors.ok sys$disk:[]_nors.tmp
-$ if $status then rm _nors.tmp;
+$ if $status
+$ then
+$ rm _nors.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$reint: echo "reint"
+$ test_class = "gawk_ext"
$ gawk --re-interval -f reint.awk reint.in >_reint.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp reint.ok sys$disk:[]_reint.tmp
-$ if $status then rm _reint.tmp;
+$ if $status
+$ then
+$ rm _reint.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$noparms: echo "noparms"
+$ test_class = "basic"
$ set noOn
$ AWKPATH_srcdir
$ gawk -f noparms.awk >_noparms.tmp 2>&1
$ if .not. $status then call exit_code '$status' _noparms.tmp
$ set On
$ cmp noparms.ok sys$disk:[]_noparms.tmp
-$ if $status then rm _noparms.tmp;
+$ if $status
+$ then
+$ rm _noparms.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$pipeio1: echo "pipeio1"
+$ test_class = "unix_tests"
$ cat = "TYPE" !close enough, as long as we avoid .LIS default suffix
$ define/User test1 []test1.
$ define/User test2 []test2.
$ gawk -f pipeio1.awk >_pipeio1.tmp
$ rm test1.;,test2.;
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp pipeio1.ok sys$disk:[]_pipeio1.tmp
-$ if $status then rm _pipeio1.tmp;
+$ if $status
+$ then
+$ rm _pipeio1.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$pipeio2:
+$ test_class = "unix_tests"
$ echo "pipeio2 skipped"
$ ! Expects the sed utility and Posix shell
$ return
@@ -1193,148 +1963,275 @@ $ cat = "gawk -- {print}"
$ tr = "??" !unfortunately, no trivial substitution available...
$ gawk -v "SRCDIR=." -f pipeio2.awk >_pipeio2.tmp
$ cmp pipeio2.ok sys$disk:[]_pipeio2.tmp
-$ if $status then rm _pipeio2.tmp;
+$ if $status
+$ then
+$ rm _pipeio2.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$clobber: echo "clobber"
+$ test_class = "basic"
$ gawk -f clobber.awk >_clobber.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp clobber.ok sys$disk:[]seq.
$ if $status then rm seq.;*
$ cmp clobber.ok sys$disk:[]_clobber.tmp
-$ if $status then rm _clobber.tmp;
+$ if $status
+$ then
+$ rm _clobber.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$nasty: echo "nasty"
+$ test_class = "basic"
$ set noOn
$ gawk -f nasty.awk >_nasty.tmp
$ call fixup_LRL nasty.ok
$ call fixup_LRL _nasty.tmp "purge"
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp nasty.ok sys$disk:[]_nasty.tmp
$ if $status
$ then
$ rm _nasty.tmp;
$ file = "lcl_root:[]nasty.ok"
$ if f$search(file) .nes. "" then rm 'file';*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
$ endif
$ set On
$ return
$
$nasty2: echo "nasty2"
+$ test_class = "basic"
$ set noOn
$ gawk -f nasty2.awk >_nasty2.tmp
$ call fixup_LRL nasty2.ok
$ call fixup_LRL _nasty2.tmp "purge"
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp nasty2.ok sys$disk:[]_nasty2.tmp
$ if $status
$ then
$ rm _nasty2.tmp;
$ file = "lcl_root:[]nasty2.ok"
$ if f$search(file) .nes. "" then rm 'file';*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
$ endif
$ set On
$ return
$
-$aadelete1:
-$aadelete2:
$arrayparm:
$fnaryscl:
-$functab1:
-$functab2:
-$functab3:
-$nastyparm:
$opasnslf:
$opasnidx:
$printfbad1:
$prmarscl:
$subslash:
+$ test_class = "basic"
+$ goto test_error_capture1
+$!
+$functab1:
+$functab2:
+$functab3:
+$aadelete1:
+$aadelete2:
+$nastyparm:
+$ test_class = "gawk_ext"
+$ goto test_error_capture1
+$!
+$test_error_capture1:
$ echo "''test'"
$ set noOn
$ gawk -f 'test'.awk >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$arynocls: echo "arynocls"
+$ test_class = "basic"
$ gawk -v "INPUT"=arynocls.in -f arynocls.awk >_arynocls.tmp
$ cmp arynocls.ok sys$disk:[]_arynocls.tmp
-$ if $status then rm _arynocls.tmp;
+$ if $status
+$ then
+$ rm _arynocls.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$getlnbuf: echo "getlnbuf"
+$ test_class = "basic"
$ gawk -f getlnbuf.awk getlnbuf.in >_getlnbuf.tmp
$ gawk -f gtlnbufv.awk getlnbuf.in >_getlnbuf.too
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp getlnbuf.ok sys$disk:[]_getlnbuf.tmp
$ if $status then rm _getlnbuf.tmp;
+$ if f$search("sys$disk:[]_''test'.too;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.too;2
+$ endif
$ cmp getlnbuf.ok sys$disk:[]_getlnbuf.too
-$ if $status then rm _getlnbuf.too;
+$ if $status
+$ then
+$ rm _getlnbuf.too;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$lint: echo "lint"
+$ test_class = "gawk_ext"
$ AWKPATH_srcdir
$ gawk -f lint.awk >_lint.tmp 2>&1
$ cmp lint.ok sys$disk:[]_lint.tmp
-$ if $status then rm _lint.tmp;
+$ if $status
+$ then
+$ rm _lint.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$lintold: echo "lintold"
+$ test_class = "gawk_ext"
$ AWKPATH_srcdir
$ gawk -f lintold.awk --lint-old <lintold.in >_lintold.tmp 2>&1
$ cmp lintold.ok sys$disk:[]_lintold.tmp
-$ if $status then rm _lintold.tmp;
+$ if $status
+$ then
+$ rm _lintold.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$ofmtbig: echo "ofmtbig"
+$ test_class = "basic"
$ set noOn
$ gawk -f ofmtbig.awk ofmtbig.in >_ofmtbig.tmp 2>&1
$ set On
$ cmp ofmtbig.ok sys$disk:[]_ofmtbig.tmp
-$ if $status then rm _ofmtbig.tmp;
+$ if $status
+$ then
+$ rm _ofmtbig.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$inetechu: echo "inetechu"
+$ test_class = "inet"
$ echo "this test is for establishing UDP connections"
$ set noOn
$ gawk -- "BEGIN {print """" |& ""/inet/udp/0/127.0.0.1/9""}"
+$ ! report skip as we do not validate yet.
+$ skip_reason = "Test not validated."
+$ gosub junit_report_skip
$ set On
$ return
$
$inetecht: echo "inetecht"
+$ test_class = "inet"
$ echo "this test is for establishing TCP connections"
$ set noOn
$ gawk -- "BEGIN {print """" |& ""/inet/tcp/0/127.0.0.1/9""}"
+$ ! report skip as we do not validate yet.
+$ skip_reason = "Test not validated."
+$ gosub junit_report_skip
$ set On
$ return
$
$inetdayu: echo "inetdayu"
+$ test_class = "inet"
$ echo "this test is for bidirectional UDP transmission"
$ set noOn
$ gawk -f - _NL:
BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13";
"/inet/udp/0/127.0.0.1/13" |& getline; print $0}
+$ ! report skip as we do not validate yet.
+$ skip_reason = "Test not validated."
+$ gosub junit_report_skip
$ set On
$ return
$
$inetdayt: echo "inetdayt"
+$ test_class = "inet"
$ echo "this test is for bidirectional TCP transmission"
$ set noOn
$ gawk -f - _NL:
BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13";
"/inet/tcp/0/127.0.0.1/13" |& getline; print $0}
+$ ! report skip as we do not validate yet.
+$ skip_reason = "Test not validated."
+$ gosub junit_report_skip
$ set On
$ return
$
$redfilnm: echo "redfilnm"
+$ test_class = "basic"
$ gawk -f redfilnm.awk srcdir="." redfilnm.in >_redfilnm.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp redfilnm.ok sys$disk:[]_redfilnm.tmp
-$ if $status then rm _redfilnm.tmp;
+$ if $status
+$ then
+$ rm _redfilnm.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$leaddig: echo "leaddig"
+$ test_class = "basic"
$ gawk -v "x=2E" -f leaddig.awk >_leaddig.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp leaddig.ok sys$disk:[]_leaddig.tmp
-$ if $status then rm _leaddig.tmp;
+$ if $status
+$ then
+$ rm _leaddig.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$clos1way:
@@ -1342,34 +2239,58 @@ $clos1way2:
$clos1way3:
$clos1way4:
$clos1way5:
-$ echo "''test': not supported"
+$ test_class = "gawk_ext"
+$ echo "''test'"
+$ skip_reason = "Test not supported."
+$ gosub junit_report_skip
$ return
$#clos1way: echo "''test'"
$ gawk -f clos1way.awk >_clos1way.tmp
$ cmp clos1way.ok sys$disk:[]_clos1way.tmp
-$ if $status then rm _clos1way.tmp;
+$ if $status
+$ then
+$ rm _clos1way.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$shadow: echo "shadow"
+$ test_class = "gawk_ext"
$ set noOn
$ AWKPATH_srcdir
$ gawk --lint -f shadow.awk >_shadow.tmp 2>&1
$ set On
$ cmp shadow.ok sys$disk:[]_shadow.tmp
-$ if $status then rm _shadow.tmp;
+$ if $status
+$ then
+$ rm _shadow.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$lintwarn: echo "lintwarn"
+$ test_class = "basic"
$ set noOn
$ AWKPATH_srcdir
$ gawk --lint -f lintwarn.awk >_lintwarn.tmp 2>&1
$ if .not. $status then call exit_code '$status' _lintwarn.tmp
$ set On
$ cmp lintwarn.ok sys$disk:[]_lintwarn.tmp
-$ if $status then rm _lintwarn.tmp;
+$ if $status
+$ then
+$ rm _lintwarn.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$longsub: echo "longsub"
+$ test_class = "basic"
$ set noOn
$ gawk -f longsub.awk longsub.in >_longsub.tmp
$!! the records here are too long for DIFF to handle
@@ -1377,14 +2298,31 @@ $!! so assume success as long as gawk doesn't crash
$!! call fixup_LRL longsub.ok
$!! call fixup_LRL _longsub.tmp "purge"
$!! cmp longsub.ok sys$disk:[]_longsub.tmp
-$ if $status then rm _longsub.tmp;
+$ if $status
+$ then
+$ rm _longsub.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
$arrayprm3: echo "arrayprm3"
+$ test_class = "basic"
$ gawk -f arrayprm3.awk arrayprm3.in >_arrayprm3.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp arrayprm3.ok sys$disk:[]_arrayprm3.tmp
-$ if $status then rm _arrayprm3.tmp;
+$ if $status
+$ then
+$ rm _arrayprm3.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$arryref3:
@@ -1404,16 +2342,26 @@ $scalar:
$sclforin:
$sclifin:
$ echo "''test'"
+$ test_class = "basic"
$ set noOn
$ gawk -f 'test'.awk 'test'.in >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$sigpipe1:
-$ echo "''test': not supported"
+$ test_class = "basic"
+$ echo "''test'"
+$ skip_reason = "Test not supported."
+$ gosub junit_report_skip
$ return
$
$ !
@@ -1425,11 +2373,18 @@ $ gawk -f 'test'.awk <'test'.in >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$exitval2:
$ echo "''test'"
+$ test_class = "basic"
$ cmdfile = "sys$disk:[]_''test'.com"
$ if f$search(cmdfile) .nes. "" then delete 'cmdfile';*
$ open/write xxx 'cmdfile'
@@ -1450,18 +2405,28 @@ $ if $status
$ then
$ rm _'test'.tmp;*
$ if f$search(cmdfile) .nes. "" then rm 'cmdfile';*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
$ endif
$ return
$!
$exitval3:
$ echo "''test'"
+$ test_class = "basic"
$ set noOn
$ gawk -f 'test'.awk >_'test'.tmp
$ ! Unix exit 42 is VMS %x003A151
$ if $status .ne. 1 then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$!
@@ -1474,31 +2439,59 @@ $fnmisc:
$gsubasgn:
$unterm:
$ echo "''test'"
+$ test_class = "basic"
$ set noOn
$ gawk -f 'test'.awk 'test'.in >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
-$getline: echo "getline skipped"
+$getline: echo "getline"
+$ test_class = "basic"
$ !Expects a Unix shell
+$ skip_reason = "Requires a Unix shell."
+$ gosub junit_report_skip
$ return
$!!getline: echo "getline"
$ gawk -f getline.awk getline.in >_getline.tmp
$ cmp getline.ok sys$disk:[]_getline.tmp
-$ if $status then rm _getline.tmp;
+$ if $status
+$ then
+$ rm _getline.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$gsubtst3: echo "gsubtst3"
+$ test_class = "basic"
$ gawk --re-interval -f gsubtst3.awk gsubtst3.in >_gsubtst3.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp gsubtst3.ok sys$disk:[]_gsubtst3.tmp
-$ if $status then rm _gsubtst3.tmp;
+$ if $status
+$ then
+$ rm _gsubtst3.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$! FIXME: gawk generates an extra, empty output file while running this test...
$iobug1: echo "iobug1"
+$ test_class = "basic"
$ cat = "TYPE sys$input:"
$ true = "exit 1" !success
$ oldout = f$search("_iobug1.tmp;")
@@ -1506,50 +2499,83 @@ $ gawk -f iobug1.awk iobug1.in >_iobug1.tmp
$ badout = f$search("_iobug1.tmp;-1")
$ if badout.nes."" .and. badout.nes.oldout then rm 'badout'
$ cmp iobug1.ok sys$disk:[]_iobug1.tmp
-$ if $status then rm _iobug1.tmp;
+$ if $status
+$ then
+$ rm _iobug1.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$rstest4:
$ echo "rstest4"
+$ test_class = "basic"
$ old_echo = echo
$ echo = "write sys$output """
$ gawk -f rstest4.awk >_rstest4.tmp1
+$ if f$search("sys$disk:[]_''test'.tmp1;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp1;2
+$ endif
$ echo = old_echo
$ gawk "{gsub(""< A>"",""<a>"")}1" _'test'.tmp1 >_'test'.tmp
$ rm sys$disk:[]_'test'.tmp1;*
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp rstest4.ok sys$disk:[]_rstest4.tmp
-$ if $status then rm _rstest4.tmp;
+$! if $status then rm _rstest4.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$rstest5:
$ echo "rstest5"
+$ test_class = "basic"
$ old_echo = echo
$ echo = "write sys$output """
$ gawk -f rstest5.awk >_rstest5.tmp1
+$ if f$search("sys$disk:[]_''test'.tmp1;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp1;2
+$ endif
$ echo = old_echo
$ gawk "{gsub("" '"","""");gsub(""'"","""")}1" _'test'.tmp1 >_'test'.tmp
$ rm sys$disk:[]_'test'.tmp1;*
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp rstest5.ok sys$disk:[]_rstest5.tmp
-$ if $status then rm _rstest5.tmp;
+$ if $status
+$ then
+$ rm _rstest5.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$fcall_exit:
$fnarray:
$funsmnam:
-$match2:
$paramdup:
$paramres:
$parseme:
$synerr1:
$synerr2:
-$ echo "''test'"
-$ set noOn
-$ gawk -f 'test'.awk >_'test'.tmp 2>&1
-$ if .not. $status then call exit_code '$status' _'test'.tmp
-$ set On
-$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
-$ return
+$ test_class = "basic"
+$ goto test_error_capture1
+$match2:
+$ test_class = "gawk_ext"
+$ goto test_error_capture1
$!
$uninit2:
$uninit3:
@@ -1557,12 +2583,20 @@ $uninit4:
$uninit5:
$uninitialized:
$ echo "''test'"
+$ test_class = "basic"
$ gawk --lint -f 'test'.awk 'test'.in >_'test'.tmp 2>&1
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$space: echo "space"
+$ test_class = "unix_tests"
$ set noOn
$ gawk -f " " space.awk >_space.tmp 2>&1
$ if .not. $status then call exit_code '$status' _space.tmp
@@ -1570,21 +2604,43 @@ $ set On
$! we get a different error from what space.ok expects
$ gawk "{gsub(""file specification syntax error"", ""no such file or
directory""); print}" -
_space.tmp >_space.too
+$ if f$search("sys$disk:[]_''test'.too;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.too;2
+$ endif
$ rm _space.tmp;
$ mv _space.too _space.tmp
$ igncascmp space.ok sys$disk:[]_space.tmp
-$ if $status then rm _space.tmp;
+$ if $status
+$ then
+$ rm _space.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$posix2008sub:
$printf0:
$ echo "''test'"
+$ test_class = "basic"
$ gawk --posix -f 'test'.awk >_'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$rsnulbig: echo "rsnulbig"
+$ test_class = "basic"
$ if .not.pipeok
$ then echo "Without the PIPE command, ''test' can't be run."
$ On warning then return
@@ -1600,10 +2656,17 @@ $ pipe -
gawk -- "/^[^a]/; END {print NR}" >_rsnulbig.tmp
$ set On
$ cmp rsnulbig.ok sys$disk:[]_rsnulbig.tmp
-$ if $status then rm _rsnulbig.tmp;
+$ if $status
+$ then
+$ rm _rsnulbig.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$rsnulbig2: echo "rsnulbig2"
+$ test_class = "basic"
$ if .not.pipeok
$ then echo "Without the PIPE command, ''test' can't be run."
$ On warning then return
@@ -1619,26 +2682,44 @@ $ pipe -
gawk -- "/^[^a]/; END {print NR}" >_rsnulbig2.tmp
$ set On
$ cmp rsnulbig2.ok sys$disk:[]_rsnulbig2.tmp
-$ if $status then rm _rsnulbig2.tmp;
+$ if $status
+$ then
+$ rm _rsnulbig2.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$backbigs1: ! 4.1.1
-$ echo "''test' skipped'
+$ test_class = "charset_tests"
+$ echo "''test'"
$ ! needs a locale not on VMS currently
+$ skip_reason = "Needs locale not on VMS Currently"
+$ gosub junit_report_skip
$ return
$!
$backsmalls1:
+$ test_class = "charset_tests"
$ gosub define_gawklocale
$ if f$trnlnm("LC_ALL") .nes. "utf8-50"
$ then
-$ echo "''test' skipping"
+$ echo "''test'"
+$ skip_reason = "Needs utf8-50 locale."
+$ gosub junit_report_skip
$ return
$ else
$ echo "''test'"
$ endif
$ gawk -f 'test'.awk 'test'.in >_'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$subamp:
@@ -1646,54 +2727,122 @@ $wideidx:
$widesub2:
$widesub3:
$ echo "''test'"
+$ test_class = "basic"
$ gosub define_gawklocale
$ gawk -f 'test'.awk 'test'.in >_'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$ignrcas2:
+$ test_class = "gawk_ext"
+$ goto wide_tests_1
$wideidx2:
$widesub:
$widesub4:
+$ test_class = "basic"
+$ goto wide_tests_1
+$!
+$wide_tests_1:
$ echo "''test'"
$ gosub define_gawklocale
$ gawk -f 'test'.awk >_'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$! This test is somewhat suspect for vms due to exit code manipulation
$exitval1: echo "exitval1"
+$ test_class = "basic"
$ gawk -f exitval1.awk >_exitval1.tmp 2>&1
$ if $status then call exit_code '$status' _exitval1.tmp
$ cmp exitval1.ok sys$disk:[]_exitval1.tmp
-$ if $status then rm _exitval1.tmp;
+$ if $status
+$ then
+$ rm _exitval1.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$fsspcoln: echo "fsspcoln"
+$ test_class = "basic"
$ gawk -f fsspcoln.awk "FS=[ :]+" fsspcoln.in >_forspcoln.tmp
+$ if f$search("sys$disk:[]_forspcoln.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_forspcoln.tmp;2
+$ endif
$ cmp fsspcoln.ok sys$disk:[]_forspcoln.tmp
-$ if $status then rm _forspcoln.tmp;
+$ if $status
+$ then
+$ rm _forspcoln.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$getlndir: echo "getlndir"
+$ test_class = "gawk_ext"
$ ! assume we're running in the test subdirectory; we don't want to
$ ! perform a messy conversion of [] into its file specification
$ gawk -v "SRCDIR=[-]test.dir" -f getlndir.awk >_getlndir.tmp
$! getlndir.ok expects "Is a directory", we see "is a directory"
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ igncascmp getlndir.ok sys$disk:[]_getlndir.tmp
-$ if $status then rm _getlndir.tmp;
+$ if $status
+$ then
+$ rm _getlndir.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$rsstart2: echo "rsstart2"
+$ test_class = "gawk_ext"
$ gawk -f rsstart2.awk rsstart1.in >_rsstart2.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp rsstart2.ok sys$disk:[]_rsstart2.tmp
-$ if $status then rm _rsstart2.tmp;
+$ if $status
+$ then
+$ rm _rsstart2.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$rsstart3:
$ echo "rsstart3"
+$ test_class = "gawk_ext"
$! rsstart3 with pipe fails,
$! presumeably due to PIPE's use of print file format
$! if .not.pipeok
@@ -1716,16 +2865,36 @@ $ ! DCL pipes are mailboxes, not the same as CRTL
pipes,
$ ! So eventually someone should look into why CRTL pipes and
$ ! gawk are not always playing well together.
$ gawk -- "FNR <= 10" rsstart1.in > _'test'.tmp1
+$ if f$search("sys$disk:[]_''test'.tmp1;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp1;2
+$ endif
$ define/user sys$input _'test'.tmp1
$ gawk -f rsstart2.awk >_rsstart3.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ set On
$ cmp rsstart3.ok sys$disk:[]_rsstart3.tmp
-$ if $status then rm _rsstart3.tmp;, _rsstart3.tmp1;
+$ if $status
+$ then
+$ rm _rsstart3.tmp;, _rsstart3.tmp1;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$rtlen:
$rtlen01:
+$ test_class = "unix_tests"
+$ goto rtlen_tests_1
$rtlenmb:
+$ test_class = "charset_tests"
+$ goto rtlen_tests_1
+$!
+$rtlen_tests_1:
$ echo "''test'"
$ if .not.pipeok
$ then echo "Without the PIPE command, ''test' can't be run."
@@ -1743,15 +2912,29 @@ $ pipe -
gawk -- "BEGIN {RS=""""}; {print length(RT)}" >_'test'.tmp
$ if test.eqs."rtlenmb" then delet_/Symbol/Local GAWKLOCALE
$ if test.eqs."rtlenmb" then f = "rtlen.ok"
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ else
$ call/Output=_rtlen01.tmp do__rtlen01
$ ! first test yields 1 instead of 0 due to forced newline
$ gawk -- "FNR==1 {sub(""1"",""0"")}; {print}" _rtlen01.tmp >_rtlen01.too
+$ if f$search("sys$disk:[]_''test'.too;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.too;2
+$ endif
$ rm _rtlen01.tmp;
$ mv _rtlen01.too _rtlen01.tmp
$ endif
$ cmp 'f' sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$do__rtlen01: subroutine
@@ -1768,72 +2951,158 @@ $ pipe -
$ endsubroutine !do__rtlen01
$
$nondec2: echo "nondec2"
+$ test_class = "gawk_ext"
$ gawk --non-decimal-data -v "a=0x1" -f nondec2.awk >_nondec2.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp nondec2.ok sys$disk:[]_nondec2.tmp
-$ if $status then rm _nondec2.tmp;
+$ if $status
+$ then
+$ rm _nondec2.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$nofile: echo "nofile"
+$ test_class = "basic"
$! gawk "{}" no/such/file >_nofile.tmp 2>&1
$! nofile.ok expects no/such/file, but using that name in the test would
$! yield "file specification syntax error" instead of "no such file..."
$ set noOn
$ gawk "{}" no-such-file >_nofile.tmp 2>&1
$ if .not. $status then call exit_code '$status' _nofile.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ set On
$! restore altered file name
$ gawk "{gsub(""no-such-file"", ""no/such/file""); print}" _nofile.tmp
>_nofile.too
+$ if f$search("sys$disk:[]_''test'.too;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.too;2
+$ endif
$ rm _nofile.tmp;
$ mv _nofile.too _nofile.tmp
$! nofile.ok expects "No such file ...", we see "no such file ..."
$ igncascmp nofile.ok sys$disk:[]_nofile.tmp
-$ if $status then rm _nofile.tmp;
+$ if $status
+$ then
+$ rm _nofile.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$binmode1: echo "binmode1"
+$ test_class = "gawk_ext"
$ gawk -v "BINMODE=3" "BEGIN { print BINMODE }" >_binmode1.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp binmode1.ok sys$disk:[]_binmode1.tmp
-$ if $status then rm _binmode1.tmp;
+$ if $status
+$ then
+$ rm _binmode1.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$subi18n: echo "''test'"
+$ test_class = "basic"
$ define/User GAWKLOCALE "en_US.UTF-8"
$ gawk -f 'test'.awk > _'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$rri1:
$concat4: echo "''test'"
+$ test_class = "basic"
$ define/User GAWKLOCALE "en_US.UTF-8"
$ gawk -f 'test'.awk 'test'.in > _'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
-$devfd: echo "devfd: not supported"
+$devfd: echo "devfd"
+$ test_class = "gawk_ext"
+$ skip_reason = "Not supported."
+$ gosub junit_report_skip
$ return
$!!devfd: echo "devfd"
$ gawk 1 /dev/fd/4 /dev/fd/5 4< /devfd.in4 5< devfd.in5 >_devfd.tmp
$ cmp devfd.ok sys$disk:[]_devfd.tmp
-$ if $status then rm _devfd.tmp;
+$ if $status
+$ then
+$ rm _devfd.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
-$devfd1: echo "devfd1: not supported"
+$devfd1: echo "devfd1"
+$ test_class = "gawk_ext"
+$ skip_reason = "Not supported."
+$ gosub junit_report_skip
$ return
$!!devfd1: echo "devfd1"
$ gawk -f devfd1.awk 4< devfd.in1 5< devfd.in2 >_devfd1.tmp
$ cmp devfd1.ok sys$disk:[]_devfd1.tmp
-$ if $status then rm _devfd1.tmp;
+$ if $status
+$ then
+$ rm _devfd1.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
-$devfd2: echo "devfd2: not supported"
+$devfd2: echo "devfd2"
+$ test_class = "gawk_ext"
+$ skip_reason = "Not supported."
+$ gosub junit_report_skip
$ return
$!!devfd2: echo "devfd2"
$! The program text is the '1' which will print each record. How compact can
you get?
$ gawk 1 /dev/fd/4 /dev/fd/5 4< /devfd.in1 5< devfd.in2 >_devfd2.tmp
$ cmp devfd2.ok sys$disk:[]_devfd2.tmp
-$ if $status then rm _devfd2.tmp;
+$ if $status
+$ then
+$ rm _devfd2.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$charasbytes:
@@ -1842,150 +3111,291 @@ $! we must try as best as possible using DUMP and
SEARCH, instead of comparing
$! to charasbytes.ok
$!
$ echo "''test'"
+$ test_class = "gawk_ext"
$ gawk -b -f 'test'.awk 'test'.in >_'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ pipe dump/byte/block=count:1 _charasbytes.tmp | -
search sys$pipe /noout " 00 00 00 00 00 00 00 00 00 00 00 00 0A
5A 5A 5A"
-$ if $severity .eq. 1 then rm _'test'.tmp;*
+$ if $severity .eq. 1
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$mixed1: echo "mixed1"
+$ test_class = "basic"
$ set noOn
$ gawk -f /dev/null --source "BEGIN {return junk}" >_mixed1.tmp 2>&1
$ if .not. $status then call exit_code '$status' _mixed1.tmp
$ set On
$ cmp mixed1.ok sys$disk:[]_mixed1.tmp
-$ if $status then rm _mixed1.tmp;
+$ if $status
+$ then
+$ rm _mixed1.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$mtchi18n: echo "mtchi18n"
+$ test_class = "basic"
$ define/User GAWKLOCALE "ru_RU.UTF-8"
$ gawk -f mtchi18n.awk mtchi18n.in >_mtchi18n.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp mtchi18n.ok sys$disk:[]_mtchi18n.tmp
-$ if $status then rm _mtchi18n.tmp;
+$ if $status
+$ then
+$ rm _mtchi18n.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$reint2: echo "reint2"
+$ test_class = "gawk_ext"
$ gosub define_gawklocale
$ gawk --re-interval -f reint2.awk reint2.in >_reint2.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp reint2.ok sys$disk:[]_reint2.tmp
-$ if $status then rm _reint2.tmp;
+$ if $status
+$ then
+$ rm _reint2.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
-$localenl: echo "localenl skipped"
+$localenl: echo "localenl"
+$ test_class = "unix_tests"
+$ skip_reason = "Not supported."
+$ gosub junit_report_skip
$ return
$!!localenl: echo "localenl"
$ ! localenl.com does not exist.
$ @localenl.com /Output=_localenl.tmp ! sh ./localenl.sh >tmp.
$ cmp localenl.ok sys$disk:[]_localenl.tmp
-$ if $status then rm _localenl.tmp;
+$ if $status
+$ then
+$ rm _localenl.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$mbprintf1: echo "''test'"
+$ test_class = "charset_tests"
$! Makefile test exports this, but we don't want to impact user's environment
$! @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \
$! Only always have "utf8-20"
$ gosub define_gawklocale
$ gawk -f mbprintf1.awk mbprintf1.in >_mbprintf1.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp mbprintf1.ok sys$disk:[]_mbprintf1.tmp
-$ if $status then rm _mbprintf1.tmp;
+$ if $status
+$ then
+$ rm _mbprintf1.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$mbprintf2:
- echo "''test'"
+$ echo "''test'"
+$ test_class = "charset_tests"
$! Makefile test exports this, ...
$! @GAWKLOCALE=ja_JP.UTF-8 ; export GAWKLOCALE ; \
$! Only always have "utf8-20"
$! ja_jp_utf-8 is optional
$ gosub define_gawklocale_ja_jp
$ gawk -f 'test'.awk >_'test'.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$!
$mbprintf3:
$mbprintf4:
- echo "''test'"
+$ echo "''test'"
+$ test_class = "charset_tests"
$! Makefile test exports this
$! @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \
$! Only always have "utf8-20"
$ gosub define_gawklocale
$ gawk -f 'test'.awk 'test'.in 2>&1 >_'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$!
$mbfw1: echo "mbfw1"
+$ test_class = "charset_tests"
$! Makefile test exports this, ...
$ !define/User GAWKLOCALE "en_US.UTF-8"
$ gosub define_gawklocale
$ gawk -f mbfw1.awk mbfw1.in >_mbfw1.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp mbfw1.ok sys$disk:[]_mbfw1.tmp
-$ if $status then rm _mbfw1.tmp;
+$ if $status
+$ then
+$ rm _mbfw1.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$gsubtst6: echo "gsubtst6"
+$ test_class = "basic"
$ define/User GAWKLOCALE "C"
$ gawk -f gsubtst6.awk >_gsubtst6.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp gsubtst6.ok sys$disk:[]_gsubtst6.tmp
-$ if $status then rm _gsubtst6.tmp;
+$ if $status
+$ then
+$ rm _gsubtst6.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$mbstr1:
$ echo "''test'"
+$ test_class = "gawk_ext"
$ gosub define_gawklocale
$ AWKPATH_srcdir
$ gawk -f 'test'.awk 2>&1 >_'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$mbstr2:
$ echo "''test'"
+$ test_class = "gawk_ext"
$ gosub define_gawklocale
$ AWKPATH_srcdir
$ gawk -f 'test'.awk < 'test'.in 2>&1 >_'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$printhuge:
$ echo "''test'"
+$ test_class = "gawk_ext"
$ gosub define_gawklocale
$ AWKPATH_srcdir
$ gawk -f 'test'.awk 2>&1 >_'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$printfbad2:
$printfbad3:
$printfbad4:
$ echo "''test'"
+$ test_class = "gawk_ext"
$ set noOn
$ gawk --lint -f 'test'.awk 'test'.in >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
-$fmtspcl: echo "fmtspcl: not supported"
+$fmtspcl: echo "fmtspcl"
+$ test_class = "hardware"
+$ skip_reason = "Not supported."
+$ gosub junit_report_skip
$ return
$!!fmtspcl:
$! fmtspcl ought to work if gawk was compiled to use IEEE floating point
$ if floatmode.lt.0 then gosub calc_floatmode
$ if floatmode.lt.2
-$ then echo "fmtspcl: not supported"
-$ else echo "fmtspcl"
-$ gawk -f fmtspcl.awk >_fmtspcl.tmp 2>&1
-$ cmp fmtspcl.ok sys$disk:[]_fmtspcl.tmp
-$ if $status then rm _fmtspcl.tmp;
+$ then
+$ echo "fmtspcl: not supported"
+$ ! report skip ...
+$ return
+$ endif
+$ echo "fmtspcl"
+$ gawk -f fmtspcl.awk >_fmtspcl.tmp 2>&1
+$ cmp fmtspcl.ok sys$disk:[]_fmtspcl.tmp
+$ if $status
+$ then
+$ rm _fmtspcl.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
$ endif
$ return
$
$intformat: echo "intformat"
+$ test_class = "hardware"
$! note: we use the Alpha value for D_float; VAX value is slightly higher
$! due to not losing precision by being processed via G_float
$ huge_0 = "1.70141183460469213e+38" ! D_float
@@ -1997,11 +3407,18 @@ $ set noOn
$ gawk -v "HUGEVAL=''hugeval'" -f intformat.awk >_intformat.tmp 2>&1
$ set On
$ cmp intformat.ok sys$disk:[]_intformat.tmp
-$ if $status then rm _intformat.tmp;
+$ if $status
+$ then
+$ rm _intformat.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$! ugh... BEGINFILE functionality works fine, but test is heavily Unix-centric
$beginfile1: echo "beginfile1"
+$ test_class = "gawk_ext"
$ ! complications: "." is a filename, not the current directory
$ ! (even "[]" is actually "[].", that same filename, but we can
$ ! handle hacking it more easily);
@@ -2025,37 +3442,68 @@ $ gawk -f - _beginfile1.tmp >_beginfile1.too
{ if (gsub("\\[\\]",".")) gsub("no such file or directory","is a directory")
gsub("no-such-file","file"); gsub("Makefile.in","Makefile");
gsub("\\$M\\$akefile.in","Makefile"); print }
+$ if f$search("sys$disk:[]_''test'.too;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.too;2
+$ endif
$ rm _beginfile1.tmp;
$ mv _beginfile1.too _beginfile1.tmp
$ igncascmp beginfile1.ok sys$disk:[]_beginfile1.tmp
-$ if $status then rm _beginfile1.tmp;
+$ if $status
+$ then
+$ rm _beginfile1.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$dumpvars: echo "dumpvars"
+$ test_class = "gawk_ext"
$ gawk --dump-variables 1 <dumpvars.in >_NL: 2>&1
$ mv awkvars.out _dumpvars.tmp
$ gawk "!/ENVIRON|PROCINFO/" _dumpvars.tmp >_dumpvars.tmp1
+$ if f$search("sys$disk:[]_''test'.tmp1;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp1;2
+$ endif
$ rm sys$disk:[]_dumpvars.tmp;*
$ mv sys$disk:[]_dumpvars.tmp1 sys$disk:[]_dumpvars.tmp
$ cmp dumpvars.ok sys$disk:[]_dumpvars.tmp
-$ if $status then rm _dumpvars.tmp;
+$ if $status
+$ then
+$ rm _dumpvars.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$!
$profile0:
+$ echo "''test'"
+$ test_class = "gawk_ext"
$ gawk --profile=_ap-'test'.out -f 'test'.awk 'test'.in > _NL:
$ ! sed <awkprof.out 1,2d >_profile3.tmp
$ gawk "NR>2" _ap-'test'.out > sys$disk:[]_awkprof.out
+$ if f$search("sys$disk:[]_awkprof.out;2") .nes. ""
+$ then
+$ delete sys$disk:[]_awkprof.out;2
+$ endif
$ convert/fdl=nla0: _awkprof.out sys$disk:[]_'test'.tmp
$ convert/fdl=nla0: 'test'.ok _'test'.ok
$ cmp _'test'.ok sys$disk:[]_'test'.tmp
$ if $status
$ then
$ rm _'test'.tmp;*,_'test'.ok;*,_ap-'test'.out;,_awkprof.out;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
$ endif
$ return
$!
$profile1: echo "''test'"
+$ test_class = "gawk_ext"
$ ! FIXME: for both gawk invocations which pipe output to SORT,
$ ! two output files get created; the top version has real output
$ ! but there's also an empty lower version.
@@ -2074,6 +3522,7 @@ $ if $status then rm _'test'.tmp%;,awkprof.out;
$ return
$
$profile2: echo "''test'"
+$ test_class = "gawk_ext"
$ gawk --profile -v "sortcmd=SORT sys$input: sys$output:" -
-f xref.awk dtdgport.awk > _NL:
$ ! sed <awkprof.out 1,2d >_profile2.tmp
@@ -2082,21 +3531,36 @@ $ sumslp awkprof.out /update=sys$input:
/output=_'test'.tmp
/
$ rm awkprof.out;
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;*
+$ if $status
+$ then
+$ rm _'test'.tmp;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$profile4:
$profile5:
+$ echo "''test'"
+$ test_class = "gawk_ext"
$ define/user GAWK_NO_PP_RUN 1
$ gawk --profile -f 'test'.awk > _NL:
$ ! sed <awkprof.out 1,2d >_profile4.tmp
$ gawk "NR>2" awkprof.out > sys$disk:[]_awkprof.out
+$ if f$search("sys$disk:[]_awkprof.out;2") .nes. ""
+$ then
+$ delete sys$disk:[]_awkprof.out;2
+$ endif
$ convert/fdl=nla0: _awkprof.out sys$disk:[]_'test'.tmp
$ convert/fdl=nla0: 'test'.ok _'test'.ok
$ cmp _'test'.ok sys$disk:[]_'test'.tmp
$ if $status
$ then
$ rm _'test'.tmp;*,_'test'.ok;*,awkprof.out;,_awkprof.out;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
$ endif
$ return
$!
@@ -2104,19 +3568,28 @@ $profile6:
$profile7:
$profile8:
$profile3: echo "''test'"
+$ test_class = "gawk_ext"
$ gawk --profile -f 'test'.awk > _NL:
$ ! sed <awkprof.out 1,2d >_profile3.tmp
$ gawk "NR>2" awkprof.out > sys$disk:[]_awkprof.out
+$ if f$search("sys$disk:[]_awkprof.out;2") .nes. ""
+$ then
+$ delete sys$disk:[]_awkprof.out;2
+$ endif
$ convert/fdl=nla0: _awkprof.out sys$disk:[]_'test'.tmp
$ convert/fdl=nla0: 'test'.ok _'test'.ok
$ cmp _'test'.ok sys$disk:[]_'test'.tmp
$ if $status
$ then
$ rm _'test'.tmp;*,_'test'.ok;*,awkprof.out;,_awkprof.out;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
$ endif
$ return
$
$next: echo "next"
+$ test_class = "gawk_ext"
$ set noOn
$ gawk "{next}" _NL: > _next.tmp 2>&1
$ gawk "function f() {next}; {f()}" _NL: >>_next.tmp 2>&1
@@ -2126,23 +3599,37 @@ $ 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 sys$disk:[]_next.tmp
-$ if $status then rm _next.tmp;
+$ if $status
+$ then
+$ rm _next.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$exit: echo "exit"
+$ test_class = "gawk_ext"
$ 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"
+$ else
+$ echo "PIPE command is available; running exit test"
$ endif
$ set noOn
$ call/Output=_exit.tmp do__exit
$ set On
$ cmp exit.ok sys$disk:[]_exit.tmp
-$ if $status then rm _exit.tmp;
+$ if $status
+$ then
+$ rm _exit.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$do__exit: subroutine
@@ -2186,16 +3673,28 @@ $ echo "-- 11"
$ endsubroutine !do__exit
$
$vms_cmd: echo "vms_cmd"
+$ test_class = "vms_tests"
$ if f$search("vms_cmd.ok").eqs.""
$ then create vms_cmd.ok
World!
$ endif
$ gawk /Commands="BEGIN { print ""World!"" }" _NL: /Output=_vms_cmd.tmp
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp vms_cmd.ok sys$disk:[]_vms_cmd.tmp
-$ if $status then rm _vms_cmd.tmp;,vms_cmd.ok;*
+$ if $status
+$ then
+$ rm _vms_cmd.tmp;,vms_cmd.ok;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$vms_io1: echo "vms_io1"
+$ test_class = "vms_tests"
$ if f$search("vms_io1.ok").eqs.""
$ then create vms_io1.ok
Hello
@@ -2204,11 +3703,22 @@ $ ! define/User dbg$input sys$command:
$ gawk -f - >_vms_io1.tmp
# prior to 3.0.4, gawk crashed doing any redirection after closing stdin
BEGIN { print "Hello" >"/dev/stdout" }
+$ if f$search("sys$disk:[]_''test'.tmp;2") .nes. ""
+$ then
+$ delete sys$disk:[]_'test'.tmp;2
+$ endif
$ cmp vms_io1.ok sys$disk:[]_vms_io1.tmp
-$ if $status then rm _vms_io1.tmp;,vms_io1.ok;*
+$ if $status
+$ then
+$ rm _vms_io1.tmp;,vms_io1.ok;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$
$vms_io2: echo "vms_io2"
+$ test_class = "vms_tests"
$ if f$search("vms_io2.ok").eqs.""
$ then create vms_io2.ok
xyzzy
@@ -2233,14 +3743,27 @@ $ set On
$ cmp _NL: sys$disk:[]_vms_io2.tmp
$ if $status then rm _vms_io2.tmp;
$ cmp vms_io2.ok sys$disk:[]_vms_io2.vfc
-$ if $status then rm _vms_io2.vfc;*,vms_io2.ok;*
+$ if $status
+$ then
+$ rm _vms_io2.vfc;*,vms_io2.ok;*
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$!
$inplace1:
$inplace2:
-$ set process/parse=extended ! ODS-5 only
$ echo "''test'"
+$ if arch_name .eqs. "VAX"
+$ then
+$ skip_reason = "ODS-5 required"
+$ gosub junit_report_skip
+$ return
+$ endif
+$ set process/parse=extended ! ODS-5 only
+$ test_class = "shlib"
$ filefunc_file = "[-]gawkapi.o"
$ open/write awkfile _'test'.awk
$ write awkfile "@load ""inplace"""
@@ -2261,7 +3784,13 @@ $ set On
$ cmp 'test'.1.ok sys$disk:[]_'test'.1.tmp
$ if $status then rm _'test'.1.tmp;,_'test'.1;
$ cmp 'test'.2.ok sys$disk:[]_'test'.2.tmp
-$ if $status then rm _'test'.2.tmp;,_'test'.2;,_'test'.awk;
+$ if $status
+$ then
+$ rm _'test'.2.tmp;,_'test'.2;,_'test'.awk;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$filefuncs:
@@ -2273,6 +3802,7 @@ $revout:
$revtwoway:
$time:
$ echo "''test'"
+$ test_class = "shlib"
$ filefunc_file = "[-]gawkapi.o"
$ open/write gapi 'filefunc_file'
$ close gapi
@@ -2282,12 +3812,19 @@ $ gawk -f 'test'.awk 'test'.in >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ if f$search(filefunc_file) .nes. "" then rm 'filefunc_file';*
$ return
$!
$rwarray:
$ echo "''test'"
+$ test_class = "shlib"
$ set noOn
$ AWKLIBPATH_dir
$ gawk -f 'test'.awk 'test'.in >_'test'.tmp 2>&1
@@ -2301,12 +3838,19 @@ $ write tout "old and new are equal - GOOD"
$ close tout
$ endif
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;,orig.bin;,orig.out;,new.out;
+$ if $status
+$ then
+$ rm _'test'.tmp;,orig.bin;,orig.out;,new.out;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ return
$!
$readdir:
$fts:
$ echo "''test'"
+$ test_class = "shlib"
$ set noOn
$ AWKLIBPATH_dir
$ gawk -f 'test'.awk >_'test'.tmp 2>&1
@@ -2314,7 +3858,9 @@ $ if .not. $status
$ then
$ call exit_code '$status' _'test'.tmp
$ write sys$output _'test'.tmp
+$ gosub junit_report_fail_diff
$ else
+$ gosub junit_report_pass
$ if f$search("_''test'.tmp") .nes. "" then rm _'test'.tmp;*
$ if f$search("_''test'.") .nes. "" then rm _'test'.;*
$ endif
@@ -2323,9 +3869,12 @@ $ return
$!
$readfile:
$ echo "''test'"
+$ test_class = "shlib"
$ if f$search("sys$disk:[-]readfile.exe") .eqs. ""
$ then
$ echo "Readfile extension not currently building on VMS."
+$ skip_reason = "Readfile not building on VMS"
+$ gosub junit_report_skip
$ return
$ else
$ echo "Surprise! Found the readfile extension so attempting test."
@@ -2339,7 +3888,9 @@ $ cmp Makefile.in sys$disk:[]_'test'.tmp
$ if $status
$ then
$ rm _'test'.tmp;
+$ gosub junit_report_pass
$ else
+$ gosub junit_report_fail_diff
$ copy Makefile.in 'test'.ok
$ endif
$ set On
@@ -2347,9 +3898,12 @@ $ return
$!
$readfile2:
$ echo "''test'"
+$ test_class = "shlib"
$ if f$search("sys$disk:[-]readfile.exe") .eqs. ""
$ then
$ echo "Readfile extension not currently building on VMS."
+$ skip_reason = "Readfile not building on VMS"
+$ gosub junit_report_skip
$ return
$ else
$ echo "Surprise! Found the readfile extension so attempting test."
@@ -2359,7 +3913,13 @@ $ AWKLIBPATH_dir
$ gawk -f 'test'.awk 'test'.awk >_'test'.tmp 2>&1
$ if .not. $status then call exit_code '$status' _'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
-$ if $status then rm _'test'.tmp;
+$ if $status
+$ then
+$ rm _'test'.tmp;
+$ gosub junit_report_pass
+$ else
+$ gosub junit_report_fail_diff
+$ endif
$ set On
$ return
$
-----------------------------------------------------------------------
Summary of changes:
vms/ChangeLog | 7 +
vms/vmstest.com | 2066 ++++++++++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 1820 insertions(+), 253 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-920-g3b72ebf,
John Malmberg <=