source: trunk/essentials/sys-apps/gawk/vms/vmstest.com

Last change on this file was 3076, checked in by bird, 18 years ago

gawk 3.1.5

File size: 40.0 KB
Line 
1$! vmstest.com -- DCL script to perform test/Makefile actions for VMS
2$!
3$! Usage:
4$! $ set default [-.test]
5$! $ @[-.vms]vmstest.com bigtest
6$! This assumes that newly built gawk.exe is in the next directory up.
7$!
8$ echo = "write sys$output"
9$ cmp = "diff/Output=_NL:/Maximum=1"
10$ rm = "delete/noConfirm/noLog"
11$ gawk = "$sys$disk:[-]gawk"
12$ AWKPATH_srcdir = "define/User AWKPATH sys$disk:[]"
13$
14$ if p1.eqs."" then p1 = "bigtest"
15$ gosub 'p1'
16$ if p2.nes."" then gosub 'p2'
17$ if p3.nes."" then gosub 'p3'
18$ if p4.nes."" then gosub 'p4'
19$ if p5.nes."" then gosub 'p5'
20$ if p6.nes."" then gosub 'p6'
21$ if p7.nes."" then gosub 'p7'
22$ if p8.nes."" then gosub 'p8'
23$ exit
24$
25$all:
26$bigtest: bigtest_list = "basic unix_tests gawk_ext vms_tests"
27$ echo "bigtest"
28$bigtest_loop: bigtest_test = f$element(0," ",bigtest_list)
29$ bigtest_list = bigtest_list - bigtest_test - " "
30$ if bigtest_test.nes." " then gosub 'bigtest_test'
31$ if bigtest_list.nes."" then goto bigtest_loop
32$ return
33$
34$basic: basic_lst1 = "msg swaplns messages argarray longwrds" -
35 + " getline2 fstabplus compare arrayref rs fsrs rand" -
36 + " fsbs negexp asgext anchgsub splitargv awkpath nfset" -
37 + " reparse convfmt arrayparm paramdup nonl defref" -
38 + " nofmtch litoct resplit rswhite prmarscl sclforin" -
39 + " sclifin intprec childin noeffect numsubstr pcntplus" -
40 + " prmreuse math fldchg fldchgnf reindops sprintfc" -
41 + " backgsub tweakfld clsflnam mmap8k fnarray dynlj" -
42 + " substr eofsplit prt1eval splitwht back89 tradanch"
43$ basic_lst2 = "nlfldsep splitvar intest nfldstr nors" -
44 + " fnarydel noparms funstack clobber delarprm prdupval" -
45 + " nasty nasty2 zeroflag getnr2tm getnr2tb printf1" -
46 + " funsmnam fnamedat numindex subslash opasnslf" -
47 + " opasnidx arynocls getlnbuf arysubnm fnparydl" -
48 + " nlstrina octsub nlinstr ofmt hsprint ofmts parseme" -
49 + " splitdef fnaryscl fnasgnm ofmtbig paramtyp rsnul1nl" -
50 + " datanonl regeq redfilnm strtod leaddig arynasty" -
51 + " psx96sub addcomma"
52$ basic_lst3 = "rebt8b1 rebt8b2 leadnl funsemnl ofmtfidl" -
53 + " onlynl arrymem1 compare2 minusstr membug1 forsimp" -
54 + " concat1 longsub arrayprm2 arrayprm3 arryref2" -
55 + " arryref3 arryref4 arryref5 aryprm1 aryprm2 aryprm3" -
56 + " aryprm4 aryprm5 aryprm6 aryprm7 aryprm8 concat2" -
57 + " concat3 delarpm2 delfunc exitval2 fmttest fnarray2" -
58 + " fnmisc fordel getline getline3 gsubasgn gsubtest" -
59 + " gsubtst2 gsubtst4 gsubtst5 hex inputred iobug1"
60$ basic_lst4 = "manglprm nested nfneg noloop1 noloop2" -
61 + " nulrsend prec prtoeval rstest1 rstest2 rstest3" -
62 + " rstest4 rstest5 scalar sortempty splitarr strcat1" -
63 + " subsepnm synerr1 uninit2 uninit3 uninit4" -
64 + " uninitialized unterm wjposer1 zeroe0"
65$ echo "basic"
66$basic_loop1: basic_test = f$element(0," ",basic_lst1)
67$ basic_lst1 = basic_lst1 - basic_test - " "
68$ if basic_test.nes." " then gosub 'basic_test'
69$ if basic_lst1.nes."" then goto basic_loop1
70$basic_loop2: basic_test = f$element(0," ",basic_lst2)
71$ basic_lst2 = basic_lst2 - basic_test - " "
72$ if basic_test.nes." " then gosub 'basic_test'
73$ if basic_lst2.nes."" then goto basic_loop2
74$basic_loop3: basic_test = f$element(0," ",basic_lst3)
75$ basic_lst3 = basic_lst3 - basic_test - " "
76$ if basic_test.nes." " then gosub 'basic_test'
77$ if basic_lst3.nes."" then goto basic_loop3
78$basic_loop4: basic_test = f$element(0," ",basic_lst4)
79$ basic_lst4 = basic_lst4 - basic_test - " "
80$ if basic_test.nes." " then gosub 'basic_test'
81$ if basic_lst4.nes."" then goto basic_loop4
82$ return
83$
84$unix_tests: unix_tst_list = "fflush getlnhd pid pipeio1" -
85 + " pipeio2 poundbang strftlng"
86$ echo "unix_tests"
87$unix_tst_loop: unix_tst_test = f$element(0," ",unix_tst_list)
88$ unix_tst_list = unix_tst_list - unix_tst_test - " "
89$ if unix_tst_test.nes." " then gosub 'unix_tst_test'
90$ if unix_tst_list.nes."" then goto unix_tst_loop
91$ return
92$
93$gawk_ext: gawk_ext_list = "argtest badargs clos1way fieldwdth" -
94 + " fsfwfs gensub gnuops2 gnureops igncdym igncfs" -
95 + " ignrcase lint manyfiles nondec posix procinfs" -
96 + " regx8bit reint shadow sort1 strftime"
97$ echo "gawk_ext (gawk.extensions)"
98$gawk_ext_loop: gawk_ext_test = f$element(0," ",gawk_ext_list)
99$ gawk_ext_list = gawk_ext_list - gawk_ext_test - " "
100$ if gawk_ext_test.nes." " then gosub 'gawk_ext_test'
101$ if gawk_ext_list.nes."" then goto gawk_ext_loop
102$ return
103$
104$vms_tests: vms_tst_list = "vms_io1"
105$ echo "vms_tests"
106$vms_tst_loop: vms_tst_test = f$element(0," ",vms_tst_list)
107$ vms_tst_list = vms_tst_list - vms_tst_test - " "
108$ if vms_tst_test.nes." " then gosub 'vms_tst_test'
109$ if vms_tst_list.nes."" then goto vms_tst_loop
110$ return
111$
112$extra: extra_list = "regtest inftest inet"
113$ echo "extra"
114$extra_loop: extra_test = f$element(0," ",extra_list)
115$ extra_list = extra_list - extra_test - " "
116$ if extra_test.nes." " then gosub 'extra_test'
117$ if extra_list.nes."" then goto extra_loop
118$ return
119$
120$inet: inet_list = "inetechu inetecht inetdayu inetdayt"
121$ echo "inet"
122$ type sys$input:
123 The inet tests only work if gawk has been built with tcp/ip socket
124 support and your system supports the services "discard" at port 9
125 and "daytimed" at port 13.
126$inet_loop: inet_test = f$element(0," ",inet_list)
127$ inet_list = inet_list - inet_test - " "
128$ if inet_test.nes." " then gosub 'inet_test'
129$ if inet_list.nes."" then goto inet_loop
130$ return
131$
132$poundbang:
133$ echo "poundbang: useless for VMS, so skipped"
134$ return
135$
136$msg:
137$ echo "Any output from ""DIFF"" is bad news, although some differences"
138$ echo "in floating point values are probably benign -- in particular,"
139$ echo "some systems may omit a leading zero and the floating point"
140$ echo "precision may lead to slightly different output in a few cases."
141$ return
142$
143$swaplns: echo "swaplns"
144$ gawk -f swaplns.awk swaplns.in >tmp.
145$ cmp swaplns.ok tmp.
146$ if $status then rm tmp.;
147$ return
148$
149$messages: echo "messages"
150$ set noOn
151$ gawk -f messages.awk > out2 >& out3
152$ cmp out1.ok out1.
153$ if $status then rm out1.;
154$ cmp out2.ok out2.
155$ if $status then rm out2.;
156$ cmp out3.ok out3.
157$ if $status then rm out3.;
158$ set On
159$ return
160$
161$argarray: echo "argarray"
162$ define/User TEST "test" !this is useless...
163$ gawk -f argarray.awk ./argarray.in - >tmp.
164just a test
165$ cmp argarray.ok tmp.
166$ if $status then rm tmp.;
167$ return
168$
169$fstabplus: echo "fstabplus"
170$ gawk -f fstabplus.awk >tmp.
1711 2
172$ cmp fstabplus.ok tmp.
173$ if $status then rm tmp.;
174$ return
175$
176$fsrs: echo "fsrs"
177$ gawk -f fsrs.awk fsrs.in >tmp.
178$ cmp fsrs.ok tmp.
179$ if $status then rm tmp.;
180$ return
181$
182$igncfs: echo "igncfs"
183$ gawk -f igncfs.awk igncfs.in >tmp.
184$ cmp igncfs.ok tmp.
185$ if $status then rm tmp.;
186$ return
187$
188$longwrds: echo "longwrds"
189$ gawk -v "SORT=sort sys$input: tmp." -f longwrds.awk longwrds.in >_NL:
190$ cmp longwrds.ok tmp.
191$ if $status then rm tmp.;
192$ return
193$
194$fieldwdth: echo "fieldwdth"
195$ gawk -v "FIELDWIDTHS=2 3 4" "{ print $2}" >tmp.
196123456789
197$ cmp fieldwdth.ok tmp.
198$ if $status then rm tmp.;
199$ return
200$
201$ignrcase: echo "ignrcase"
202$ gawk -v "IGNORECASE=1" "{ sub(/y/, """"); print}" >tmp.
203xYz
204$ cmp ignrcase.ok tmp.
205$ if $status then rm tmp.;
206$ return
207$
208$regtest:
209$ if f$search("regtest.com").eqs.""
210$ then echo "regtest: not available"
211$ else echo "regtest"
212$ echo "Some of the output from regtest is very system specific, do not"
213$ echo "be distressed if your output differs from that distributed."
214$ echo "Manual inspection is called for."
215$ @regtest.com
216$ endif
217$ return
218$
219$posix: echo "posix"
220$ gawk -f posix.awk >tmp.
2211:2,3 4
222$ cmp posix.ok tmp.
223$ if $status then rm tmp.;
224$ return
225$
226$manyfiles: echo "manyfiles"
227$ if f$search("[.junk]*.*").nes."" then rm [.junk]*.*;*
228$ if f$parse("[.junk]").eqs."" then create/Dir/Prot=(O:rwed) [.junk]
229$ gawk "BEGIN { for (i = 1; i <= 300; i++) print i, i}" >tmp.
230$ echo "This may take quite a while..."
231$ echo ""
232$ gawk -f manyfiles.awk tmp. tmp.
233$ define/User sys$error _NL:
234$ define/User sys$output tmp.too
235$ search/Match=Nor/Output=_NL:/Log [.junk]*.* ""
236$!/Log output: "%SEARCH-S-NOMATCH, <filename> - <#> records" plus 1 line summary
237$ gawk "$4!=2{++count}; END{if(NR!=301||count!=1){print ""Failed!""}}" tmp.too
238$ rm tmp.;,tmp.too;,[.junk]*.*;*,[]junk.dir;
239$ return
240$
241$compare: echo "compare"
242$ gawk -f compare.awk 0 1 compare.in >tmp.
243$ cmp compare.ok tmp.
244$ if $status then rm tmp.;
245$ return
246$
247$arrayref: echo "arrayref"
248$ gawk -f arrayref.awk >tmp.
249$ cmp arrayref.ok tmp.
250$ if $status then rm tmp.;
251$ return
252$
253$rs: echo "rs"
254$ gawk -v "RS=" "{ print $1, $2}" rs.in >tmp.
255$ cmp rs.ok tmp.
256$ if $status then rm tmp.;
257$ return
258$
259$fsbs: echo "fsbs"
260$ gawk -v "FS=\" "{ print $1, $2 }" fsbs.in >tmp.
261$ cmp fsbs.ok tmp.
262$ if $status then rm tmp.;
263$ return
264$
265$inftest: echo "inftest"
266$ !! echo "This test is very machine specific..."
267$ set noOn
268$ gawk -f inftest.awk >tmp.
269$ !! cmp inftest.ok tmp. !just care that gawk doesn't crash...
270$ if $status then rm tmp.;
271$ set On
272$ return
273$
274$getline2: echo "getline2"
275$ gawk -f getline2.awk getline2.awk getline2.awk >tmp.
276$ cmp getline2.ok tmp.
277$ if $status then rm tmp.;
278$ return
279$
280$rand: echo "rand"
281$ echo "The following line should just be 19 random numbers between 1 and 100"
282$ echo ""
283$ gawk -f rand.awk
284$ return
285$
286$negexp: echo "negexp"
287$ gawk "BEGIN { a = -2; print 10^a }" >tmp.
288$ cmp negexp.ok tmp.
289$ if $status then rm tmp.;
290$ return
291$
292$asgext: echo "asgext"
293$ gawk -f asgext.awk asgext.in >tmp.
294$ cmp asgext.ok tmp.
295$ if $status then rm tmp.;
296$ return
297$
298$anchgsub: echo "anchgsub"
299$ gawk -f anchgsub.awk anchgsub.in >tmp.
300$ cmp anchgsub.ok tmp.
301$ if $status then rm tmp.;
302$ return
303$
304$splitargv: echo "splitargv"
305$ gawk -f splitargv.awk splitargv.in >tmp.
306$ cmp splitargv.ok tmp.
307$ if $status then rm tmp.;
308$ return
309$
310$awkpath: echo "awkpath"
311$ define/User AWK_LIBRARY [],[.lib]
312$ gawk -f awkpath.awk >tmp.
313$ cmp awkpath.ok tmp.
314$ if $status then rm tmp.;
315$ return
316$
317$nfset: echo "nfset"
318$ gawk -f nfset.awk nfset.in >tmp.
319$ cmp nfset.ok tmp.
320$ if $status then rm tmp.;
321$ return
322$
323$reparse: echo "reparse"
324$ gawk -f reparse.awk reparse.in >tmp.
325$ cmp reparse.ok tmp.
326$ if $status then rm tmp.;
327$ return
328$
329$argtest: echo "argtest"
330$ gawk -f argtest.awk -x -y abc >tmp.
331$ cmp argtest.ok tmp.
332$ if $status then rm tmp.;
333$ return
334$
335$badargs: echo "badargs"
336$ on error then continue
337$ gawk -f 2>&1 >tmp.too
338$! search/Match=Nor tmp. "patchlevel" /Output=tmp.
339$ gawk "/patchlevel/{next}; {gsub(""\"""",""'""); print}" <tmp.too >tmp.
340$ cmp badargs.ok tmp.
341$ if $status then rm tmp.;,tmp.too;
342$ return
343$
344$convfmt: echo "convfmt"
345$ gawk -f convfmt.awk >tmp.
346$ cmp convfmt.ok tmp.
347$ if $status then rm tmp.;
348$ return
349$
350$arrayparm: echo "arrayparm"
351$ set noOn
352$ AWKPATH_srcdir
353$ gawk -f arrayparm.awk >tmp. 2>&1
354$ if .not.$status then call exit_code 2
355$ set On
356$ cmp arrayparm.ok tmp.
357$ if $status then rm tmp.;
358$ return
359$
360$paramdup: echo "paramdup"
361$ set noOn
362$ AWKPATH_srcdir
363$ gawk -f paramdup.awk >tmp. 2>&1
364$ if .not.$status then call exit_code 1
365$ set On
366$ cmp paramdup.ok tmp.
367$ if $status then rm tmp.;
368$ return
369$
370$nonl: echo "nonl"
371$ ! This one might fail, depending on the tool used to unpack the
372$ ! distribution. Some will add a final newline if the file lacks one.
373$ AWKPATH_srcdir
374$ gawk --lint -f nonl.awk _NL: >tmp. 2>&1
375$ cmp nonl.ok tmp.
376$ if $status then rm tmp.;
377$ return
378$
379$defref: echo "defref"
380$ set noOn
381$ AWKPATH_srcdir
382$ gawk --lint -f defref.awk >tmp. 2>&1
383$ if .not.$status then call exit_code 2
384$ set On
385$ cmp defref.ok tmp.
386$ if $status then rm tmp.;
387$ return
388$
389$nofmtch: echo "nofmtch"
390$ AWKPATH_srcdir
391$ gawk --lint -f nofmtch.awk >tmp. 2>&1
392$ cmp nofmtch.ok tmp.
393$ if $status then rm tmp.;
394$ return
395$
396$strftime: echo "strftime"
397$ ! this test could fail on slow machines or on a second boundary,
398$ ! so if it does, double check the actual results
399$!! date | gawk -v "OUTPUT"=tmp. -f strftime.awk
400$ now = f$time()
401$ wkd = f$extract(0,3,f$cvtime(now,,"WEEKDAY"))
402$ mon = f$cvtime(now,"ABSOLUTE","MONTH")
403$ mon = f$extract(0,1,mon) + f$edit(f$extract(1,2,mon),"LOWERCASE")
404$ day = f$cvtime(now,,"DAY")
405$ tim = f$extract(0,8,f$cvtime(now,,"TIME"))
406$ tz = ""
407$ yr = f$cvtime(now,,"YEAR")
408$ if f$trnlnm("FTMP").nes."" then close/noLog ftmp
409$ open/Write ftmp strftime.in
410$ write ftmp wkd," ",mon," ",day," ",tim," ",tz," ",yr
411$ close ftmp
412$ gawk -v "OUTPUT"=tmp. -f strftime.awk strftime.in
413$ set noOn
414$ cmp strftime.ok tmp.
415$ if $status then rm tmp.;,strftime.ok;*,strftime.in;*
416$ set On
417$ return
418$
419$litoct: echo "litoct"
420$ gawk --traditional -f litoct.awk >tmp.
421ab
422$ cmp litoct.ok tmp.
423$ if $status then rm tmp.;
424$ return
425$
426$gensub: echo "gensub"
427$ gawk -f gensub.awk gensub.in >tmp.
428$ cmp gensub.ok tmp.
429$ if $status then rm tmp.;
430$ return
431$
432$resplit: echo "resplit"
433$ gawk -- "{ FS = "":""; $0 = $0; print $2 }" >tmp.
434a:b:c d:e:f
435$ cmp resplit.ok tmp.
436$ if $status then rm tmp.;
437$ return
438$
439$rswhite: echo "rswhite"
440$ gawk -f rswhite.awk rswhite.in >tmp.
441$ cmp rswhite.ok tmp.
442$ if $status then rm tmp.;
443$ return
444$
445$prmarscl: echo "prmarscl"
446$ set noOn
447$ AWKPATH_srcdir
448$ gawk -f prmarscl.awk >tmp. 2>&1
449$ if .not.$status then call exit_code 2
450$ set On
451$ cmp prmarscl.ok tmp.
452$ if $status then rm tmp.;
453$ return
454$
455$sclforin: echo "sclforin"
456$ set noOn
457$ AWKPATH_srcdir
458$ gawk -f sclforin.awk >tmp. 2>&1
459$ if .not.$status then call exit_code 2
460$ set On
461$ cmp sclforin.ok tmp.
462$ if $status then rm tmp.;
463$ return
464$
465$sclifin: echo "sclifin"
466$ set noOn
467$ AWKPATH_srcdir
468$ gawk -f sclifin.awk >tmp. 2>&1
469$ if .not.$status then call exit_code 2
470$ set On
471$ cmp sclifin.ok tmp.
472$ if $status then rm tmp.;
473$ return
474$
475$intprec: echo "intprec"
476$ gawk -f intprec.awk >tmp. 2>&1
477$ cmp intprec.ok tmp.
478$ if $status then rm tmp.;
479$ return
480$
481$childin: echo "childin: currently fails for the VMS port, so skipped"
482$ return
483$! note: this `childin' test currently [gawk 3.0.3] fails for vms
484$!!childin: echo "childin"
485$ echo "note: type ``hi<return><ctrl/Z>'",-
486 "' if testing appears to hang in `childin'"
487$!! @echo hi | gawk "BEGIN { ""cat"" | getline; print; close(""cat"") }" >tmp.
488$ gawk "BEGIN { ""type sys$input:"" | getline; print; close(""type sys$input:"") }" >tmp.
489hi
490$ cmp childin.ok tmp.
491$ if $status then rm tmp.;
492$ return
493$
494$noeffect: echo "noeffect"
495$ AWKPATH_srcdir
496$ gawk --lint -f noeffect.awk >tmp. 2>&1
497$ cmp noeffect.ok tmp.
498$ if $status then rm tmp.;
499$ return
500$
501$numsubstr: echo "numsubstr"
502$ AWKPATH_srcdir
503$ gawk -f numsubstr.awk numsubstr.in >tmp.
504$ cmp numsubstr.ok tmp.
505$ if $status then rm tmp.;
506$ return
507$
508$gnureops: echo "gnureops"
509$ gawk -f gnureops.awk >tmp.
510$ cmp gnureops.ok tmp.
511$ if $status then rm tmp.;
512$ return
513$
514$pcntplus: echo "pcntplus"
515$ gawk -f pcntplus.awk >tmp.
516$ cmp pcntplus.ok tmp.
517$ if $status then rm tmp.;
518$ return
519$
520$prmreuse: echo "prmreuse"
521$ if f$search("prmreuse.ok").eqs."" then create prmreuse.ok
522$ gawk -f prmreuse.awk >tmp.
523$ cmp prmreuse.ok tmp.
524$ if $status then rm tmp.;
525$ return
526$
527$math: echo "math"
528$ gawk -f math.awk >tmp.
529$ cmp math.ok tmp.
530$ if $status then rm tmp.;
531$ return
532$
533$fflush:
534$ echo "fflush: hopeless for VMS, so skipped"
535$ return
536$!!fflush: echo "fflush"
537$ ! hopelessly Unix-specific
538$!! @fflush.sh >tmp.
539$ cmp fflush.ok tmp.
540$ if $status then rm tmp.;
541$ return
542$
543$fldchg: echo "fldchg"
544$ gawk -f fldchg.awk fldchg.in >tmp.
545$ cmp fldchg.ok tmp.
546$ if $status then rm tmp.;
547$ return
548$
549$fldchgnf: echo "fldchgnf"
550$ gawk -f fldchgnf.awk fldchgnf.in >tmp.
551$ cmp fldchgnf.ok tmp.
552$ if $status then rm tmp.;
553$ return
554$
555$reindops: echo "reindops"
556$ gawk -f reindops.awk reindops.in >tmp.
557$ cmp reindops.ok tmp.
558$ if $status then rm tmp.;
559$ return
560$
561$sprintfc: echo "sprintfc"
562$ gawk -f sprintfc.awk sprintfc.in >tmp.
563$ cmp sprintfc.ok tmp.
564$ if $status then rm tmp.;
565$ return
566$
567$getlnhd:
568$ echo "getlnhd: uses Unix-specific command so won't work on VMS"
569$ return
570$!!getlnhd: echo "getlnhd"
571$ gawk -f getlnhd.awk >tmp.
572$ cmp getlnhd.ok tmp.
573$ if $status then rm tmp.;
574$ return
575$
576$backgsub: echo "backgsub"
577$ gawk -f backgsub.awk backgsub.in >tmp.
578$ cmp backgsub.ok tmp.
579$ if $status then rm tmp.;
580$ return
581$
582$tweakfld: echo "tweakfld"
583$ gawk -f tweakfld.awk tweakfld.in >tmp.
584$ if f$search("errors.cleanup").nes."" then rm errors.cleanup;*
585$ cmp tweakfld.ok tmp.
586$ if $status then rm tmp.;
587$ return
588$
589$clsflnam: echo "clsflnam"
590$ if f$search("clsflnam.ok").eqs."" then create clsflnam.ok
591$ gawk -f clsflnam.awk clsflnam.in >tmp. 2>&1
592$ cmp clsflnam.ok tmp.
593$ if $status then rm tmp.;
594$ return
595$
596$mmap8k: echo "mmap8k"
597$ gawk "{ print }" mmap8k.in >tmp.
598$ cmp mmap8k.in tmp.
599$ if $status then rm tmp.;
600$ return
601$
602$fnarray: echo "fnarray"
603$ set noOn
604$ AWKPATH_srcdir
605$ gawk -f fnarray.awk >tmp. 2>&1
606$ if .not.$status then call exit_code 1
607$ set On
608$ cmp fnarray.ok tmp.
609$ if $status then rm tmp.;
610$ return
611$
612$dynlj: echo "dynlj"
613$ gawk -f dynlj.awk >tmp.
614$ cmp dynlj.ok tmp.
615$ if $status then rm tmp.;
616$ return
617$
618$substr: echo "substr"
619$ gawk -f substr.awk >tmp.
620$ cmp substr.ok tmp.
621$ if $status then rm tmp.;
622$ return
623$
624$eofsplit: echo "eofsplit"
625$ if f$search("eofsplit.ok").eqs."" then create eofsplit.ok
626$ gawk -f eofsplit.awk >tmp.
627$ cmp eofsplit.ok tmp.
628$ if $status then rm tmp.;
629$ return
630$
631$prt1eval: echo "prt1eval"
632$ gawk -f prt1eval.awk >tmp.
633$ cmp prt1eval.ok tmp.
634$ if $status then rm tmp.;
635$ return
636$
637$splitwht: echo "splitwht"
638$ gawk -f splitwht.awk >tmp.
639$ cmp splitwht.ok tmp.
640$ if $status then rm tmp.;
641$ return
642$
643$back89: echo "back89"
644$ gawk "/a\8b/" back89.in >tmp.
645$ cmp back89.ok tmp.
646$ if $status then rm tmp.;
647$ return
648$
649$tradanch: echo "tradanch"
650$ if f$search("tradanch.ok").eqs."" then create tradanch.ok
651$ gawk --traditional -f tradanch.awk tradanch.in >tmp.
652$ cmp tradanch.ok tmp.
653$ if $status then rm tmp.;
654$ return
655$
656$nlfldsep: echo "nlfldsep"
657$ gawk -f nlfldsep.awk nlfldsep.in >tmp.
658$ cmp nlfldsep.ok tmp.
659$ if $status then rm tmp.;
660$ return
661$
662$splitvar: echo "splitvar"
663$ gawk -f splitvar.awk splitvar.in >tmp.
664$ cmp splitvar.ok tmp.
665$ if $status then rm tmp.;
666$ return
667$
668$intest: echo "intest"
669$ gawk -f intest.awk >tmp.
670$ cmp intest.ok tmp.
671$ if $status then rm tmp.;
672$ return
673$
674$pid: echo "pid"
675$ if f$search("pid.ok").eqs."" then create pid.ok
676$ if f$trnlnm("FTMP").nes."" then close/noLog ftmp
677$ open/Write ftmp _pid.in
678$ write ftmp f$integer("%x" + f$getjpi("","PID"))
679$ write ftmp f$integer("%x" + f$getjpi("","OWNER"))
680$ close ftmp
681$ gawk -f pid.awk _pid.in >tmp. >& _NL:
682$ rm _pid.in;
683$ cmp pid.ok tmp.
684$ if $status then rm tmp.;
685$ return
686$
687$strftlng: echo "strftlng"
688$ define/User TZ "UTC" !useless
689$ gawk -f strftlng.awk >tmp.
690$ cmp strftlng.ok tmp.
691$ if $status then rm tmp.;
692$ return
693$
694$nfldstr: echo "nfldstr"
695$ if f$search("nfldstr.ok").eqs."" then create nfldstr.ok
696$ gawk "$1 == 0 { print ""bug"" }" >tmp.
697
698$ cmp nfldstr.ok tmp.
699$ if $status then rm tmp.;
700$ return
701$
702$nors: echo "nors"
703$!! there's no straightforward way to supply non-terminated input on the fly
704$!! @echo A B C D E | tr -d '\12' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@
705$!! so just read a line from sys$input instead
706$ gawk "{ print $NF }" - nors.in >tmp.
707A B C D E
708$ cmp nors.ok tmp.
709$ if $status then rm tmp.;
710$ return
711$
712$fnarydel: echo "fnarydel"
713$ gawk -f fnarydel.awk >tmp.
714$ cmp fnarydel.ok tmp.
715$ if $status then rm tmp.;
716$ return
717$
718$reint: echo "reint"
719$ gawk --re-interval -f reint.awk reint.in >tmp.
720$ cmp reint.ok tmp.
721$ if $status then rm tmp.;
722$ return
723$
724$noparms: echo "noparms"
725$ set noOn
726$ AWKPATH_srcdir
727$ gawk -f noparms.awk >tmp. 2>&1
728$ if .not.$status then call exit_code 1
729$ set On
730$ cmp noparms.ok tmp.
731$ if $status then rm tmp.;
732$ return
733$
734$pipeio1: echo "pipeio1"
735$ cat = "TYPE" !close enough, as long as we avoid .LIS default suffix
736$ define/User test1 []test1.
737$ define/User test2 []test2.
738$ gawk -f pipeio1.awk >tmp.
739$ rm test1.;,test2.;
740$ cmp pipeio1.ok tmp.
741$ if $status then rm tmp.;
742$ return
743$
744$pipeio2:
745$ echo "pipeio2: uses Unix-specific command so won't work on VMS"
746$ return
747$!!pipeio2: echo "pipeio2"
748$ cat = "gawk -- {print}"
749$ tr = "??" !unfortunately, no trivial substitution available...
750$ gawk -v "SRCDIR=." -f pipeio2.awk >tmp.
751$ cmp pipeio2.ok tmp.
752$ if $status then rm tmp.;
753$ return
754$
755$funstack: echo "funstack"
756$ gawk -f funstack.awk funstack.in >tmp.
757$ cmp funstack.ok tmp.
758$ if $status then rm tmp.;
759$ return
760$
761$clobber: echo "clobber"
762$ gawk -f clobber.awk >tmp.
763$ cmp clobber.ok seq.
764$ if $status then rm seq.;*
765$ cmp clobber.ok tmp.
766$ if $status then rm tmp.;
767$ return
768$
769$delarprm: echo "delarprm"
770$ gawk -f delarprm.awk >tmp.
771$ cmp delarprm.ok tmp.
772$ if $status then rm tmp.;
773$ return
774$
775$prdupval: echo "prdupval"
776$ gawk -f prdupval.awk prdupval.in >tmp.
777$ cmp prdupval.ok tmp.
778$ if $status then rm tmp.;
779$ return
780$
781$nasty: echo "nasty"
782$ set noOn
783$ gawk -f nasty.awk >tmp.
784$ call fixup_LRL nasty.ok
785$ call fixup_LRL tmp. "purge"
786$ cmp nasty.ok tmp.
787$ if $status then rm tmp.;
788$ set On
789$ return
790$
791$nasty2: echo "nasty2"
792$ set noOn
793$ gawk -f nasty2.awk >tmp.
794$ call fixup_LRL nasty2.ok
795$ call fixup_LRL tmp. "purge"
796$ cmp nasty2.ok tmp.
797$ if $status then rm tmp.;
798$ set On
799$ return
800$
801$zeroflag: echo "zeroflag"
802$ gawk -f zeroflag.awk >tmp.
803$ cmp zeroflag.ok tmp.
804$ if $status then rm tmp.;
805$ return
806$
807$getnr2tm: echo "getnr2tm"
808$ gawk -f getnr2tm.awk getnr2tm.in >tmp.
809$ cmp getnr2tm.ok tmp.
810$ if $status then rm tmp.;
811$ return
812$
813$getnr2tb: echo "getnr2tb"
814$ gawk -f getnr2tb.awk getnr2tb.in >tmp.
815$ cmp getnr2tb.ok tmp.
816$ if $status then rm tmp.;
817$ return
818$
819$printf1: echo "printf1"
820$ gawk -f printf1.awk >tmp.
821$ cmp printf1.ok tmp.
822$ if $status then rm tmp.;
823$ return
824$
825$funsmnam: echo "funsmnam"
826$ set noOn
827$ gawk -f funsmnam.awk >tmp. 2>&1
828$ if .not.$status then call exit_code 2
829$ set On
830$ cmp funsmnam.ok tmp.
831$ if $status then rm tmp.;
832$ return
833$
834$fnamedat: echo "fnamedat"
835$ set noOn
836$ gawk -f fnamedat.awk < fnamedat.in >tmp. 2>&1
837$ if .not.$status then call exit_code 2
838$ set On
839$ cmp fnamedat.ok tmp.
840$ if $status then rm tmp.;
841$ return
842$
843$numindex: echo "numindex"
844$ set noOn
845$ gawk -f numindex.awk < numindex.in >tmp. 2>&1
846$ if .not.$status then call exit_code 2
847$ set On
848$ cmp numindex.ok tmp.
849$ if $status then rm tmp.;
850$ return
851$
852$subslash: echo "subslash"
853$ set noOn
854$ gawk -f subslash.awk >tmp. 2>&1
855$ if .not.$status then call exit_code 2
856$ set On
857$ cmp subslash.ok tmp.
858$ if $status then rm tmp.;
859$ return
860$
861$opasnslf: echo "opasnslf"
862$ set noOn
863$ gawk -f opasnslf.awk >tmp. 2>&1
864$ if .not.$status then call exit_code 2
865$ set On
866$ cmp opasnslf.ok tmp.
867$ if $status then rm tmp.;
868$ return
869$
870$opasnidx: echo "opasnidx"
871$ set noOn
872$ gawk -f opasnidx.awk >tmp. 2>&1
873$ if .not.$status then call exit_code 2
874$ set On
875$ cmp opasnidx.ok tmp.
876$ if $status then rm tmp.;
877$ return
878$
879$arynocls: echo "arynocls"
880$ gawk -v "INPUT"=arynocls.in -f arynocls.awk >tmp.
881$ cmp arynocls.ok tmp.
882$ if $status then rm tmp.;
883$ return
884$
885$igncdym: echo "igncdym"
886$ gawk -f igncdym.awk igncdym.in >tmp.
887$ cmp igncdym.ok tmp.
888$ if $status then rm tmp.;
889$ return
890$
891$getlnbuf: echo "getlnbuf"
892$ gawk -f getlnbuf.awk getlnbuf.in >tmp.
893$ gawk -f gtlnbufv.awk getlnbuf.in >tmp2.
894$ cmp getlnbuf.ok tmp.
895$ if $status then rm tmp.;
896$ cmp getlnbuf.ok tmp2.
897$ if $status then rm tmp2.;
898$ return
899$
900$arysubnm: echo "arysubnm"
901$ gawk -f arysubnm.awk >tmp.
902$ cmp arysubnm.ok tmp.
903$ if $status then rm tmp.;
904$ return
905$
906$fnparydl: echo "fnparydl"
907$ gawk -f fnparydl.awk >tmp.
908$ cmp fnparydl.ok tmp.
909$ if $status then rm tmp.;
910$ return
911$
912$nondec: echo "nondec"
913$ gawk -f nondec.awk >tmp.
914$ cmp nondec.ok tmp.
915$ if $status then rm tmp.;
916$ return
917$
918$nlstrina: echo "nlstrina"
919$ AWKPATH_srcdir
920$ gawk -f nlstrina.awk >tmp.
921$ cmp nlstrina.ok tmp.
922$ if $status then rm tmp.;
923$ return
924$
925$octsub: echo "octsub"
926$ AWKPATH_srcdir
927$ gawk -f octsub.awk >tmp.
928$ cmp octsub.ok tmp.
929$ if $status then rm tmp.;
930$ return
931$
932$nlinstr: echo "nlinstr"
933$ gawk -f nlinstr.awk nlinstr.in >tmp.
934$ cmp nlinstr.ok tmp.
935$ if $status then rm tmp.;
936$ return
937$
938$ofmt: echo "ofmt"
939$ gawk -f ofmt.awk ofmt.in >tmp.
940$ cmp ofmt.ok tmp.
941$ if $status then rm tmp.;
942$ return
943$
944$hsprint: echo "hsprint"
945$ gawk -f hsprint.awk >tmp.
946$ cmp hsprint.ok tmp.
947$ if $status then rm tmp.;
948$ return
949$
950$fsfwfs: echo "fsfwfs"
951$ gawk -f fsfwfs.awk fsfwfs.in >tmp.
952$ cmp fsfwfs.ok tmp.
953$ if $status then rm tmp.;
954$ return
955$
956$ofmts: echo "ofmts"
957$ gawk -f ofmts.awk ofmts.in >tmp.
958$ cmp ofmts.ok tmp.
959$ if $status then rm tmp.;
960$ return
961$
962$parseme: echo "parseme"
963$ set noOn
964$ AWKPATH_srcdir
965$ gawk -f parseme.awk >tmp. 2>&1
966$ if .not.$status then call exit_code 2
967$ set On
968$ cmp parseme.ok tmp.
969$ if $status then rm tmp.;
970$ return
971$
972$splitdef: echo "splitdef"
973$ gawk -f splitdef.awk >tmp.
974$ cmp splitdef.ok tmp.
975$ if $status then rm tmp.;
976$ return
977$
978$fnaryscl: echo "fnaryscl"
979$ set noOn
980$ AWKPATH_srcdir
981$ gawk -f fnaryscl.awk >tmp. 2>&1
982$ if .not.$status then call exit_code 2
983$ set On
984$ cmp fnaryscl.ok tmp.
985$ if $status then rm tmp.;
986$ return
987$
988$fnasgnm: echo "fnasgnm"
989$ set noOn
990$ AWKPATH_srcdir
991$ gawk -f fnasgnm.awk < fnasgnm.in >tmp. 2>&1
992$ if .not.$status then call exit_code 2
993$ set On
994$ cmp fnasgnm.ok tmp.
995$ if $status then rm tmp.;
996$ return
997$
998$lint: echo "lint"
999$ AWKPATH_srcdir
1000$ gawk -f lint.awk >tmp. 2>&1
1001$ cmp lint.ok tmp.
1002$ if $status then rm tmp.;
1003$ return
1004$
1005$procinfs: echo "procinfs"
1006$ gawk -f procinfs.awk >tmp.
1007$ cmp procinfs.ok tmp.
1008$ if $status then rm tmp.;
1009$ return
1010$
1011$sort1: echo "sort1"
1012$ gawk -f sort1.awk >tmp.
1013$ cmp sort1.ok tmp.
1014$ if $status then rm tmp.;
1015$ return
1016$
1017$ofmtbig: echo "ofmtbig"
1018$ set noOn
1019$ gawk -f ofmtbig.awk ofmtbig.in >tmp. 2>&1
1020$ set On
1021$ cmp ofmtbig.ok tmp.
1022$ if $status then rm tmp.;
1023$ return
1024$
1025$inetechu: echo "inetechu"
1026$ echo "this test is for establishing UDP connections"
1027$ set noOn
1028$ gawk -- "BEGIN {print """" |& ""/inet/udp/0/127.0.0.1/9""}"
1029$ set On
1030$ return
1031$
1032$inetecht: echo "inetecht"
1033$ echo "this test is for establishing TCP connections"
1034$ set noOn
1035$ gawk -- "BEGIN {print """" |& ""/inet/tcp/0/127.0.0.1/9""}"
1036$ set On
1037$ return
1038$
1039$inetdayu: echo "inetdayu"
1040$ echo "this test is for bidirectional UDP transmission"
1041$ set noOn
1042$ gawk -f - nl:
1043BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13";
1044 "/inet/udp/0/127.0.0.1/13" |& getline; print $0}
1045$ set On
1046$ return
1047$
1048$inetdayt: echo "inetdayt"
1049$ echo "this test is for bidirectional TCP transmission"
1050$ set noOn
1051$ gawk -f - nl:
1052BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13";
1053 "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}
1054$ set On
1055$ return
1056$
1057$paramtyp: echo "paramtyp"
1058$ gawk -f paramtyp.awk >tmp.
1059$ cmp paramtyp.ok tmp.
1060$ if $status then rm tmp.;
1061$ return
1062$
1063$rsnul1nl: echo "rsnul1nl"
1064$ gawk -f rsnul1nl.awk rsnul1nl.in >tmp.
1065$ cmp rsnul1nl.ok tmp.
1066$ if $status then rm tmp.;
1067$ return
1068$
1069$datanonl: echo "datanonl"
1070$ gawk -f datanonl.awk datanonl.in >tmp.
1071$ cmp datanonl.ok tmp.
1072$ if $status then rm tmp.;
1073$ return
1074$
1075$regeq: echo "regeq"
1076$ gawk -f regeq.awk regeq.in >tmp.
1077$ cmp regeq.ok tmp.
1078$ if $status then rm tmp.;
1079$ return
1080$
1081$redfilnm: echo "redfilnm"
1082$ gawk -f redfilnm.awk srcdir="." redfilnm.in >tmp.
1083$ cmp redfilnm.ok tmp.
1084$ if $status then rm tmp.;
1085$ return
1086$
1087$strtod: echo "strtod"
1088$ gawk -f strtod.awk strtod.in >tmp.
1089$ cmp strtod.ok tmp.
1090$ if $status then rm tmp.;
1091$ return
1092$
1093$leaddig: echo "leaddig"
1094$ gawk -v "x=2E" -f leaddig.awk >tmp.
1095$ cmp leaddig.ok tmp.
1096$ if $status then rm tmp.;
1097$ return
1098$
1099$clos1way:
1100$ echo "clos1way: uses unsupported `|&' redirection, so skipped"
1101$ return
1102$!!clos1way: echo "clos1way"
1103$ gawk -f clos1way.awk >tmp.
1104$ cmp clos1way.ok tmp.
1105$ if $status then rm tmp.;
1106$ return
1107$
1108$arynasty: echo "arynasty"
1109$ gawk -f arynasty.awk >tmp.
1110$ cmp arynasty.ok tmp.
1111$ if $status then rm tmp.;
1112$ return
1113$
1114$shadow: echo "shadow"
1115$ set noOn
1116$ AWKPATH_srcdir
1117$ gawk --lint -f shadow.awk >tmp. 2>&1
1118$ set On
1119$ cmp shadow.ok tmp.
1120$ if $status then rm tmp.;
1121$ return
1122$
1123$regx8bit: echo "regx8bit"
1124$ gawk -f regx8bit.awk >tmp.
1125$ cmp regx8bit.ok tmp.
1126$ if $status then rm tmp.;
1127$ return
1128$
1129$psx96sub: echo "psx96sub"
1130$ gawk -f psx96sub.awk >tmp.
1131$ cmp psx96sub.ok tmp.
1132$ if $status then rm tmp.;
1133$ return
1134$
1135$addcomma: echo "addcomma"
1136$ gawk -f addcomma.awk addcomma.in >tmp.
1137$ cmp addcomma.ok tmp.
1138$ if $status then rm tmp.;
1139$ return
1140$
1141$gnuops2: echo "gnuops2"
1142$ gawk -f gnuops2.awk >tmp.
1143$ cmp gnuops2.ok tmp.
1144$ if $status then rm tmp.;
1145$ return
1146$
1147$rebt8b1: echo "rebt8b1"
1148$ gawk -f rebt8b1.awk >tmp.
1149$ cmp rebt8b1.ok tmp.
1150$ if $status then rm tmp.;
1151$ return
1152$
1153$rebt8b2: echo "rebt8b2"
1154$ gawk -f rebt8b2.awk >tmp.
1155$ cmp rebt8b2.ok tmp.
1156$ if $status then rm tmp.;
1157$ return
1158$
1159$leadnl: echo "leadnl"
1160$ gawk -f leadnl.awk leadnl.in >tmp.
1161$ cmp leadnl.ok tmp.
1162$ if $status then rm tmp.;
1163$ return
1164$
1165$funsemnl: echo "funsemnl"
1166$ gawk -f funsemnl.awk >tmp.
1167$ cmp funsemnl.ok tmp.
1168$ if $status then rm tmp.;
1169$ return
1170$
1171$ofmtfidl: echo "ofmtfidl"
1172$ gawk -f ofmtfidl.awk ofmtfidl.in >tmp.
1173$ cmp ofmtfidl.ok tmp.
1174$ if $status then rm tmp.;
1175$ return
1176$
1177$onlynl: echo "onlynl"
1178$ gawk -f onlynl.awk onlynl.in >tmp.
1179$ cmp onlynl.ok tmp.
1180$ if $status then rm tmp.;
1181$ return
1182$
1183$arrymem1: echo "arrymem1"
1184$ gawk -f arrymem1.awk >tmp.
1185$ cmp arrymem1.ok tmp.
1186$ if $status then rm tmp.;
1187$ return
1188$
1189$compare2: echo "compare2"
1190$ gawk -f compare2.awk >tmp.
1191$ cmp compare2.ok tmp.
1192$ if $status then rm tmp.;
1193$ return
1194$
1195$minusstr: echo "minusstr"
1196$ gawk -f minusstr.awk >tmp.
1197$ cmp minusstr.ok tmp.
1198$ if $status then rm tmp.;
1199$ return
1200$
1201$membug1: echo "membug1"
1202$ gawk -f membug1.awk membug1.in >tmp.
1203$ cmp membug1.ok tmp.
1204$ if $status then rm tmp.;
1205$ return
1206$
1207$forsimp: echo "forsimp"
1208$ gawk -f forsimp.awk >tmp.
1209$ cmp forsimp.ok tmp.
1210$ if $status then rm tmp.;
1211$ return
1212$
1213$concat1: echo "concat1"
1214$ gawk -f concat1.awk concat1.in >tmp.
1215$ cmp concat1.ok tmp.
1216$ if $status then rm tmp.;
1217$ return
1218$
1219$longsub: echo "longsub"
1220$ gawk -f longsub.awk longsub.in >tmp.
1221$!! the records here are too long for DIFF to handle
1222$!! so assume success as long as gawk doesn't crash
1223$!! call fixup_LRL longsub.ok
1224$!! call fixup_LRL tmp. "purge"
1225$!! cmp longsub.ok tmp.
1226$ if $status then rm tmp.;
1227$ return
1228$
1229$arrayprm2: echo "arrayprm2"
1230$ gawk -f arrayprm2.awk arrayprm2.in >tmp.
1231$ cmp arrayprm2.ok tmp.
1232$ if $status then rm tmp.;
1233$ return
1234$
1235$arrayprm3: echo "arrayprm3"
1236$ gawk -f arrayprm3.awk arrayprm3.in >tmp.
1237$ cmp arrayprm3.ok tmp.
1238$ if $status then rm tmp.;
1239$ return
1240$
1241$arryref2: echo "arryref2"
1242$ gawk -f arryref2.awk arryref2.in >tmp.
1243$ cmp arryref2.ok tmp.
1244$ if $status then rm tmp.;
1245$ return
1246$
1247$arryref3: echo "arryref3"
1248$ set noOn
1249$ gawk -f arryref3.awk arryref3.in >tmp. 2>&1
1250$ if .not.$status then call exit_code 2
1251$ set On
1252$ cmp arryref3.ok tmp.
1253$ if $status then rm tmp.;
1254$ return
1255$
1256$arryref4: echo "arryref4"
1257$ set noOn
1258$ gawk -f arryref4.awk arryref4.in >tmp. 2>&1
1259$ if .not.$status then call exit_code 2
1260$ set On
1261$ cmp arryref4.ok tmp.
1262$ if $status then rm tmp.;
1263$ return
1264$
1265$arryref5: echo "arryref5"
1266$ set noOn
1267$ gawk -f arryref5.awk arryref5.in >tmp. 2>&1
1268$ if .not.$status then call exit_code 2
1269$ set On
1270$ cmp arryref5.ok tmp.
1271$ if $status then rm tmp.;
1272$ return
1273$
1274$aryprm1: echo "aryprm1"
1275$ set noOn
1276$ gawk -f aryprm1.awk aryprm1.in >tmp. 2>&1
1277$ if .not.$status then call exit_code 2
1278$ set On
1279$ cmp aryprm1.ok tmp.
1280$ if $status then rm tmp.;
1281$ return
1282$
1283$aryprm2: echo "aryprm2"
1284$ set noOn
1285$ gawk -f aryprm2.awk aryprm2.in >tmp. 2>&1
1286$ if .not.$status then call exit_code 2
1287$ set On
1288$ cmp aryprm2.ok tmp.
1289$ if $status then rm tmp.;
1290$ return
1291$
1292$aryprm3: echo "aryprm3"
1293$ set noOn
1294$ gawk -f aryprm3.awk aryprm3.in >tmp. 2>&1
1295$ if .not.$status then call exit_code 2
1296$ set On
1297$ cmp aryprm3.ok tmp.
1298$ if $status then rm tmp.;
1299$ return
1300$
1301$aryprm4: echo "aryprm4"
1302$ set noOn
1303$ gawk -f aryprm4.awk aryprm4.in >tmp. 2>&1
1304$ if .not.$status then call exit_code 2
1305$ set On
1306$ cmp aryprm4.ok tmp.
1307$ if $status then rm tmp.;
1308$ return
1309$
1310$aryprm5: echo "aryprm5"
1311$ set noOn
1312$ gawk -f aryprm5.awk aryprm5.in >tmp. 2>&1
1313$ if .not.$status then call exit_code 2
1314$ set On
1315$ cmp aryprm5.ok tmp.
1316$ if $status then rm tmp.;
1317$ return
1318$
1319$aryprm6: echo "aryprm6"
1320$ set noOn
1321$ gawk -f aryprm6.awk aryprm6.in >tmp. 2>&1
1322$ if .not.$status then call exit_code 2
1323$ set On
1324$ cmp aryprm6.ok tmp.
1325$ if $status then rm tmp.;
1326$ return
1327$
1328$aryprm7: echo "aryprm7"
1329$ set noOn
1330$ gawk -f aryprm7.awk aryprm7.in >tmp. 2>&1
1331$ if .not.$status then call exit_code 2
1332$ set On
1333$ cmp aryprm7.ok tmp.
1334$ if $status then rm tmp.;
1335$ return
1336$
1337$aryprm8: echo "aryprm8"
1338$ gawk -f aryprm8.awk aryprm8.in >tmp.
1339$ cmp aryprm8.ok tmp.
1340$ if $status then rm tmp.;
1341$ return
1342$
1343$concat2: echo "concat2"
1344$ gawk -f concat2.awk concat2.in >tmp.
1345$ cmp concat2.ok tmp.
1346$ if $status then rm tmp.;
1347$ return
1348$
1349$concat3: echo "concat3"
1350$ gawk -f concat3.awk concat3.in >tmp.
1351$ cmp concat3.ok tmp.
1352$ if $status then rm tmp.;
1353$ return
1354$
1355$delarpm2: echo "delarpm2"
1356$ gawk -f delarpm2.awk delarpm2.in >tmp.
1357$ cmp delarpm2.ok tmp.
1358$ if $status then rm tmp.;
1359$ return
1360$
1361$delfunc: echo "delfunc"
1362$ set noOn
1363$ gawk -f delfunc.awk delfunc.in >tmp. 2>&1
1364$ if .not.$status then call exit_code 2
1365$ set On
1366$ cmp delfunc.ok tmp.
1367$ if $status then rm tmp.;
1368$ return
1369$
1370$exitval2: echo "exitval2 skipped"
1371$ return
1372$!!exitval2: echo "exitval2"
1373$ gawk -f exitval2.awk exitval2.in >tmp.
1374$ cmp exitval2.ok tmp.
1375$ if $status then rm tmp.;
1376$ return
1377$
1378$fmttest: echo "fmttest"
1379$ gawk -f fmttest.awk fmttest.in >tmp.
1380$ cmp fmttest.ok tmp.
1381$ if $status then rm tmp.;
1382$ return
1383$
1384$fnarray2: echo "fnarray2"
1385$ set noOn
1386$ gawk -f fnarray2.awk fnarray2.in >tmp. 2>&1
1387$ if .not.$status then call exit_code 1
1388$ set On
1389$ cmp fnarray2.ok tmp.
1390$ if $status then rm tmp.;
1391$ return
1392$
1393$fnmisc: echo "fnmisc"
1394$ set noOn
1395$ gawk -f fnmisc.awk fnmisc.in >tmp. 2>&1
1396$ if .not.$status then call exit_code 1
1397$ set On
1398$ cmp fnmisc.ok tmp.
1399$ if $status then rm tmp.;
1400$ return
1401$
1402$fordel: echo "fordel"
1403$ gawk -f fordel.awk fordel.in >tmp.
1404$ cmp fordel.ok tmp.
1405$ if $status then rm tmp.;
1406$ return
1407$
1408$getline: echo "getline skipped"
1409$ return
1410$!!getline: echo "getline"
1411$ gawk -f getline.awk getline.in >tmp.
1412$ cmp getline.ok tmp.
1413$ if $status then rm tmp.;
1414$ return
1415$
1416$getline3: echo "getline3"
1417$ gawk -f getline3.awk getline3.in >tmp.
1418$ cmp getline3.ok tmp.
1419$ if $status then rm tmp.;
1420$ return
1421$
1422$gsubasgn: echo "gsubasgn"
1423$ set noOn
1424$ gawk -f gsubasgn.awk gsubasgn.in >tmp. 2>&1
1425$ if .not.$status then call exit_code 1
1426$ set On
1427$ cmp gsubasgn.ok tmp.
1428$ if $status then rm tmp.;
1429$ return
1430$
1431$gsubtest: echo "gsubtest"
1432$ gawk -f gsubtest.awk gsubtest.in >tmp.
1433$ cmp gsubtest.ok tmp.
1434$ if $status then rm tmp.;
1435$ return
1436$
1437$gsubtst2: echo "gsubtst2"
1438$ gawk -f gsubtst2.awk gsubtst2.in >tmp.
1439$ cmp gsubtst2.ok tmp.
1440$ if $status then rm tmp.;
1441$ return
1442$
1443$gsubtst3: echo "gsubtst3"
1444$ gawk --re-interval -f gsubtst3.awk gsubtst3.in >tmp.
1445$ cmp gsubtst3.ok tmp.
1446$ if $status then rm tmp.;
1447$ return
1448$
1449$gsubtst4: echo "gsubtst4"
1450$ gawk -f gsubtst4.awk gsubtst4.in >tmp.
1451$ cmp gsubtst4.ok tmp.
1452$ if $status then rm tmp.;
1453$ return
1454$
1455$gsubtst5: echo "gsubtst5"
1456$ gawk -f gsubtst5.awk gsubtst5.in >tmp.
1457$ cmp gsubtst5.ok tmp.
1458$ if $status then rm tmp.;
1459$ return
1460$
1461$hex: echo "hex"
1462$ gawk -f hex.awk hex.in >tmp.
1463$ cmp hex.ok tmp.
1464$ if $status then rm tmp.;
1465$ return
1466$
1467$inputred: echo "inputred"
1468$ gawk -f inputred.awk inputred.in >tmp.
1469$ cmp inputred.ok tmp.
1470$ if $status then rm tmp.;
1471$ return
1472$
1473$iobug1: echo "iobug1"
1474$ cat = "TYPE sys$input:"
1475$ true = "exit 1" !success
1476$ gawk -f iobug1.awk iobug1.in >tmp.
1477$ cmp iobug1.ok tmp.
1478$ if $status then rm tmp.;
1479$ return
1480$
1481$manglprm: echo "manglprm"
1482$ gawk -f manglprm.awk manglprm.in >tmp.
1483$ cmp manglprm.ok tmp.
1484$ if $status then rm tmp.;
1485$ return
1486$
1487$nested: echo "nested"
1488$ gawk -f nested.awk nested.in >tmp.
1489$ cmp nested.ok tmp.
1490$ if $status then rm tmp.;
1491$ return
1492$
1493$nfneg: echo "nfneg"
1494$ set noOn
1495$ gawk -f nfneg.awk nfneg.in >tmp. 2>&1
1496$ if .not.$status then call exit_code 2
1497$ set On
1498$ cmp nfneg.ok tmp.
1499$ if $status then rm tmp.;
1500$ return
1501$
1502$noloop1: echo "noloop1"
1503$ gawk -f noloop1.awk noloop1.in >tmp.
1504$ cmp noloop1.ok tmp.
1505$ if $status then rm tmp.;
1506$ return
1507$
1508$noloop2: echo "noloop2"
1509$ gawk -f noloop2.awk noloop2.in >tmp.
1510$ cmp noloop2.ok tmp.
1511$ if $status then rm tmp.;
1512$ return
1513$
1514$nulrsend: echo "nulrsend"
1515$ gawk -f nulrsend.awk nulrsend.in >tmp.
1516$ cmp nulrsend.ok tmp.
1517$ if $status then rm tmp.;
1518$ return
1519$
1520$prec: echo "prec"
1521$ gawk -f prec.awk prec.in >tmp.
1522$ cmp prec.ok tmp.
1523$ if $status then rm tmp.;
1524$ return
1525$
1526$prtoeval: echo "prtoeval"
1527$ gawk -f prtoeval.awk prtoeval.in >tmp.
1528$ cmp prtoeval.ok tmp.
1529$ if $status then rm tmp.;
1530$ return
1531$
1532$rstest1: echo "rstest1"
1533$ gawk -f rstest1.awk rstest1.in >tmp.
1534$ cmp rstest1.ok tmp.
1535$ if $status then rm tmp.;
1536$ return
1537$
1538$rstest2: echo "rstest2"
1539$ gawk -f rstest2.awk rstest2.in >tmp.
1540$ cmp rstest2.ok tmp.
1541$ if $status then rm tmp.;
1542$ return
1543$
1544$rstest3: echo "rstest3"
1545$ gawk -f rstest3.awk rstest3.in >tmp.
1546$ cmp rstest3.ok tmp.
1547$ if $status then rm tmp.;
1548$ return
1549$
1550$rstest4: echo "rstest4 skipped"
1551$ return
1552$!!rstest4: echo "rstest4"
1553$ gawk -f rstest4.awk rstest4.in >tmp.
1554$ cmp rstest4.ok tmp.
1555$ if $status then rm tmp.;
1556$ return
1557$
1558$rstest5: echo "rstest5 skipped"
1559$ return
1560$!!rstest5: echo "rstest5"
1561$ gawk -f rstest5.awk rstest5.in >tmp.
1562$ cmp rstest5.ok tmp.
1563$ if $status then rm tmp.;
1564$ return
1565$
1566$scalar: echo "scalar"
1567$ set noOn
1568$ gawk -f scalar.awk scalar.in >tmp. 2>&1
1569$ if .not.$status then call exit_code 2
1570$ set On
1571$ cmp scalar.ok tmp.
1572$ if $status then rm tmp.;
1573$ return
1574$
1575$sortempty: echo "sortempty"
1576$ gawk -f sortempty.awk sortempty.in >tmp.
1577$ cmp sortempty.ok tmp.
1578$ if $status then rm tmp.;
1579$ return
1580$
1581$splitarr: echo "splitarr"
1582$ gawk -f splitarr.awk splitarr.in >tmp.
1583$ cmp splitarr.ok tmp.
1584$ if $status then rm tmp.;
1585$ return
1586$
1587$strcat1: echo "strcat1"
1588$ gawk -f strcat1.awk strcat1.in >tmp.
1589$ cmp strcat1.ok tmp.
1590$ if $status then rm tmp.;
1591$ return
1592$
1593$subsepnm: echo "subsepnm"
1594$ gawk -f subsepnm.awk subsepnm.in >tmp.
1595$ cmp subsepnm.ok tmp.
1596$ if $status then rm tmp.;
1597$ return
1598$
1599$synerr1: echo "synerr1"
1600$ set noOn
1601$ gawk -f synerr1.awk synerr1.in >tmp. 2>&1
1602$ if .not.$status then call exit_code 1
1603$ set On
1604$ cmp synerr1.ok tmp.
1605$ if $status then rm tmp.;
1606$ return
1607$
1608$uninitialized: echo "uninitialized"
1609$ gawk --lint -f uninitialized.awk uninitialized.in >tmp. 2>&1
1610$ cmp uninitialized.ok tmp.
1611$ if $status then rm tmp.;
1612$ return
1613$
1614$uninit2: echo "uninit2"
1615$ gawk --lint -f uninit2.awk uninit2.in >tmp. 2>&1
1616$ cmp uninit2.ok tmp.
1617$ if $status then rm tmp.;
1618$ return
1619$
1620$uninit3: echo "uninit3"
1621$ gawk --lint -f uninit3.awk uninit3.in >tmp. 2>&1
1622$ cmp uninit3.ok tmp.
1623$ if $status then rm tmp.;
1624$ return
1625$
1626$uninit4: echo "uninit4"
1627$ gawk --lint -f uninit4.awk uninit4.in >tmp. 2>&1
1628$ cmp uninit4.ok tmp.
1629$ if $status then rm tmp.;
1630$ return
1631$
1632$unterm: echo "unterm"
1633$ set noOn
1634$ gawk -f unterm.awk unterm.in >tmp. 2>&1
1635$ if .not.$status then call exit_code 1
1636$ set On
1637$ cmp unterm.ok tmp.
1638$ if $status then rm tmp.;
1639$ return
1640$
1641$wjposer1: echo "wjposer1"
1642$ gawk -f wjposer1.awk wjposer1.in >tmp.
1643$ cmp wjposer1.ok tmp.
1644$ if $status then rm tmp.;
1645$ return
1646$
1647$zeroe0: echo "zeroe0"
1648$ gawk -f zeroe0.awk zeroe0.in >tmp.
1649$ cmp zeroe0.ok tmp.
1650$ if $status then rm tmp.;
1651$ return
1652$
1653$vms_io1: echo "vms_io1"
1654$ if f$search("vms_io1.ok").eqs.""
1655$ then create vms_io1.ok
1656Hello
1657$ endif
1658$ ! define/User dbg$input sys$command:
1659$ gawk /Input=sys$input _NL: /Output=tmp.
1660# prior to 3.0.4, gawk crashed doing any redirection after closing stdin
1661BEGIN { print "Hello" >"/dev/stdout" }
1662$ cmp vms_io1.ok tmp.
1663$ if $status then rm tmp.;
1664$ return
1665$
1666$clean:
1667$ if f$search("tmp.") .nes."" then rm tmp.;*
1668$ if f$search("tmp.too") .nes."" then rm tmp.too;*
1669$ if f$search("out%.") .nes."" then rm out%.;*
1670$ if f$search("strftime.ok").nes."" then rm strftime.ok;*
1671$ if f$search("test%.") .nes."" then rm test%.;*
1672$ if f$search("seq.") .nes."" then rm seq.;*
1673$ if f$search("_pid.in") .nes."" then rm _pid.in;*
1674$ if f$search("[.junk]*.*").nes."" then rm [.junk]*.*;*
1675$ if f$parse("[.junk]") .nes."" then rm []junk.dir;1
1676$ return
1677$
1678$! make sure that the specified file's longest-record-length field is set;
1679$! otherwise DIFF will choke if any record is longer than 512 bytes
1680$fixup_LRL: subroutine
1681$ lrl = 0 !VMS V5.5-2 didn't support the LRL argument yet
1682$ define/user sys$error nl:
1683$ define/user sys$output nl:
1684$ lrl = f$file_attribute(p1,"LRL")
1685$ if lrl.eq.0 then lrl = f$file_attribute(p1,"MRS")
1686$ if lrl.eq.0
1687$ then convert/fdl=sys$input: 'p1' *.*
1688file
1689 organization sequential
1690record
1691 format stream_lf
1692 size 32767
1693$ if $status .and. p2.eqs."purge" then rm 'p1';-1
1694$ else cmp nl: nl: !deassign/user sys${error,output}
1695$ endif
1696$ endsubroutine !fixup_LRL
1697$
1698$! add a fake "EXIT CODE" record to the end of the temporary output file
1699$! to simulate the ``|| echo EXIT CODE $$? >>_$@'' shell script usage
1700$exit_code: subroutine
1701$ if f$trnlnm("FTMP").nes."" then close/noLog ftmp
1702$ open/Append ftmp tmp.
1703$ write ftmp "EXIT CODE: ",p1
1704$ close ftmp
1705$ endsubroutine !exit_code
1706$
1707$!NOTREACHED
1708$ exit
Note: See TracBrowser for help on using the repository browser.