home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnuawk.zip / vms / vmstest.com < prev   
Text File  |  1997-05-13  |  18KB  |  733 lines

  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"
  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.           + " getline 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. $        echo "basic"
  46. $basic_loop1:    basic_test = f$element(0," ",basic_lst1)
  47. $        basic_lst1 = basic_lst1 - basic_test - " "
  48. $        if basic_test.nes." " then  gosub 'basic_test'
  49. $        if basic_lst1.nes.""  then  goto   basic_loop1
  50. $basic_loop2:    basic_test = f$element(0," ",basic_lst2)
  51. $        basic_lst2 = basic_lst2 - basic_test - " "
  52. $        if basic_test.nes." " then  gosub 'basic_test'
  53. $        if basic_lst2.nes.""  then  goto   basic_loop2
  54. $        return
  55. $
  56. $unix_tests:    unix_tst_list = "poundbang fflush getlnhd pipeio1" -
  57.           + " pipeio2 strftlng pid"
  58. $        echo "unix_tests"
  59. $unix_tst_loop: unix_tst_test = f$element(0," ",unix_tst_list)
  60. $        unix_tst_list = unix_tst_list - unix_tst_test - " "
  61. $        if unix_tst_test.nes." " then  gosub 'unix_tst_test'
  62. $        if unix_tst_list.nes.""  then  goto   unix_tst_loop
  63. $        return
  64. $
  65. $gawk_ext:    gawk_ext_list = "fieldwdth ignrcase posix manyfiles" -
  66.           + " igncfs argtest badargs strftime gensub gnureops reint" -
  67.           + " nondec"
  68. $        echo "gawk_ext (gawk.extensions)"
  69. $gawk_ext_loop: gawk_ext_test = f$element(0," ",gawk_ext_list)
  70. $        gawk_ext_list = gawk_ext_list - gawk_ext_test - " "
  71. $        if gawk_ext_test.nes." " then  gosub 'gawk_ext_test'
  72. $        if gawk_ext_list.nes.""  then  goto   gawk_ext_loop
  73. $        return
  74. $
  75. $extra:        extra_list = "regtest inftest"
  76. $        echo "extra"
  77. $        gosub "regtest"
  78. $        gosub "inftest"
  79. $        return
  80. $
  81. $poundbang:
  82. $    echo "poundbang:  useless for VMS, so skipped"
  83. $    return
  84. $
  85. $msg:
  86. $    echo "Any output from ""DIFF"" is bad news, although some differences"
  87. $    echo "in floating point values are probably benign -- in particular,"
  88. $    echo "some systems may omit a leading zero and the floating point"
  89. $    echo "precision may lead to slightly different output in a few cases."
  90. $    return
  91. $
  92. $swaplns:    echo "swaplns"
  93. $    gawk -f swaplns.awk swaplns.in >tmp.
  94. $    cmp swaplns.ok tmp.
  95. $    if $status then  rm tmp.;
  96. $    return
  97. $
  98. $messages:    echo "messages"
  99. $    set noOn
  100. $    gawk -f messages.awk > out2 >& out3
  101. $    cmp out1.ok out1.
  102. $    if $status then  rm out1.;
  103. $    cmp out2.ok out2.
  104. $    if $status then  rm out2.;
  105. $    cmp out3.ok out3.
  106. $    if $status then  rm out3.;
  107. $    set On
  108. $    return
  109. $
  110. $argarray:    echo "argarray"
  111. $    define/User TEST "test"            !this is useless...
  112. $    gawk -f argarray.awk ./argarray.in - >tmp.
  113. just a test
  114. $    cmp argarray.ok tmp.
  115. $    if $status then  rm tmp.;
  116. $    return
  117. $
  118. $fstabplus:    echo "fstabplus"
  119. $    gawk -f fstabplus.awk >tmp.
  120. 1        2
  121. $    cmp fstabplus.ok tmp.
  122. $    if $status then  rm tmp.;
  123. $    return
  124. $
  125. $fsrs:        echo "fsrs"
  126. $    gawk -f fsrs.awk fsrs.in >tmp.
  127. $    cmp fsrs.ok tmp.
  128. $    if $status then  rm tmp.;
  129. $    return
  130. $
  131. $igncfs:    echo "igncfs"
  132. $    gawk -f igncfs.awk igncfs.in >tmp.
  133. $    cmp igncfs.ok tmp.
  134. $    if $status then  rm tmp.;
  135. $    return
  136. $
  137. $longwrds:    echo "longwrds"
  138. $    gawk -f longwrds.awk manpage >tmp.too
  139. $    sort tmp.too tmp.
  140. $    cmp longwrds.ok tmp.
  141. $    if $status then  rm tmp.;,tmp.too;
  142. $    return
  143. $
  144. $fieldwdth:    echo "fieldwdth"
  145. $    gawk -v "FIELDWIDTHS=2 3 4" "{ print $2}" >tmp.
  146. 123456789
  147. $    cmp fieldwdth.ok tmp.
  148. $    if $status then  rm tmp.;
  149. $    return
  150. $
  151. $ignrcase:    echo "ignrcase"
  152. $    gawk -v "IGNORECASE=1" "{ sub(/y/, """"); print}" >tmp.
  153. xYz
  154. $    cmp ignrcase.ok tmp.
  155. $    if $status then  rm tmp.;
  156. $    return
  157. $
  158. $regtest:
  159. $  if f$search("regtest.com").eqs.""
  160. $  then echo "regtest:  not available"
  161. $  else echo "regtest"
  162. $    echo "Some of the output from regtest is very system specific, do not"
  163. $    echo "be distressed if your output differs from that distributed."
  164. $    echo "Manual inspection is called for."
  165. $    @regtest.com
  166. $ endif
  167. $    return
  168. $
  169. $posix: echo "posix"
  170. $    gawk -f posix.awk >tmp.
  171. 1:2,3 4
  172. $    cmp posix.ok tmp.
  173. $    if $status then  rm tmp.;
  174. $    return
  175. $
  176. $manyfiles:    echo "manyfiles"
  177. $    if f$search("[.junk]*.*").nes."" then  rm [.junk]*.*;*
  178. $    if f$parse("[.junk]").eqs."" then  create/Dir/Prot=(O:rwed) [.junk]
  179. $    gawk "BEGIN { for (i = 1; i <= 300; i++) print i, i}" >tmp.
  180. $    echo "This may take quite a while..."
  181. $    echo ""
  182. $    gawk -f manyfiles.awk tmp. tmp.
  183. $    define/User sys$error _NL:
  184. $    define/User sys$output tmp.too
  185. $    search/Match=Nor/Output=_NL:/Log [.junk]*.* ""
  186. $!/Log output: "%SEARCH-S-NOMATCH, <filename> - <#> records" plus 1 line summary
  187. $    gawk "$4!=2{++count}; END{if(NR!=301||count!=1){print ""Failed!""}}" tmp.too
  188. $    rm tmp.;,tmp.too;,[.junk]*.*;*,[]junk.dir;
  189. $    return
  190. $
  191. $compare:    echo "compare"
  192. $    gawk -f compare.awk 0 1 compare.in >tmp.
  193. $    cmp compare.ok tmp.
  194. $    if $status then  rm tmp.;
  195. $    return
  196. $
  197. $arrayref:    echo "arrayref"
  198. $    gawk -f arrayref.awk >tmp.
  199. $    cmp arrayref.ok tmp.
  200. $    if $status then  rm tmp.;
  201. $    return
  202. $
  203. $rs:        echo "rs"
  204. $    gawk -v "RS=" "{ print $1, $2}" rs.in >tmp.
  205. $    cmp rs.ok tmp.
  206. $    if $status then  rm tmp.;
  207. $    return
  208. $
  209. $fsbs:        echo "fsbs"
  210. $    gawk -v "FS=\" "{ print $1, $2 }" fsbs.in >tmp.
  211. $    cmp fsbs.ok tmp.
  212. $    if $status then  rm tmp.;
  213. $    return
  214. $
  215. $inftest:    echo "inftest"
  216. $     !!  echo "This test is very machine specific..."
  217. $    gawk -f inftest.awk >tmp.
  218. $     !!  cmp inftest.ok tmp.        !just care that gawk doesn't crash...
  219. $    if $status then  rm tmp.;
  220. $    return
  221. $
  222. $getline:    echo "getline"
  223. $    gawk -f getline.awk getline.awk getline.awk >tmp.
  224. $    cmp getline.ok tmp.
  225. $    if $status then  rm tmp.;
  226. $    return
  227. $
  228. $rand:        echo "rand"
  229. $    echo "The following line should just be 19 random numbers between 1 and 100"
  230. $    echo ""
  231. $    gawk -f rand.awk
  232. $    return
  233. $
  234. $negexp:    echo "negexp"
  235. $    gawk "BEGIN { a = -2; print 10^a }" >tmp.
  236. $    cmp negexp.ok tmp.
  237. $    if $status then  rm tmp.;
  238. $    return
  239. $
  240. $asgext:    echo "asgext"
  241. $    gawk -f asgext.awk asgext.in >tmp.
  242. $    cmp asgext.ok tmp.
  243. $    if $status then  rm tmp.;
  244. $    return
  245. $
  246. $anchgsub:    echo "anchgsub"
  247. $    gawk -f anchgsub.awk anchgsub.in >tmp.
  248. $    cmp anchgsub.ok tmp.
  249. $    if $status then  rm tmp.;
  250. $    return
  251. $
  252. $splitargv:    echo "splitargv"
  253. $    gawk -f splitargv.awk splitargv.in >tmp.
  254. $    cmp splitargv.ok tmp.
  255. $    if $status then  rm tmp.;
  256. $    return
  257. $
  258. $awkpath:    echo "awkpath"
  259. $    define/User AWK_LIBRARY [],[.lib]
  260. $    gawk -f awkpath.awk >tmp.
  261. $    cmp awkpath.ok tmp.
  262. $    if $status then  rm tmp.;
  263. $    return
  264. $
  265. $nfset:        echo "nfset"
  266. $    gawk -f nfset.awk nfset.in >tmp.
  267. $    cmp nfset.ok tmp.
  268. $    if $status then  rm tmp.;
  269. $    return
  270. $
  271. $reparse:    echo "reparse"
  272. $    gawk -f reparse.awk reparse.in >tmp.
  273. $    cmp reparse.ok tmp.
  274. $    if $status then  rm tmp.;
  275. $    return
  276. $
  277. $argtest:    echo "argtest"
  278. $    gawk -f argtest.awk -x -y abc >tmp.
  279. $    cmp argtest.ok tmp.
  280. $    if $status then  rm tmp.;
  281. $    return
  282. $
  283. $badargs:    echo "badargs"
  284. $    on error then continue
  285. $    gawk -f 2>&1 >tmp.too
  286. $!    search/Match=Nor tmp. "patchlevel" /Output=tmp.
  287. $    gawk "/patchlevel/{next}; {gsub(""\"""",""'""); print}" <tmp.too >tmp.
  288. $    cmp badargs.ok tmp.
  289. $    if $status then  rm tmp.;,tmp.too;
  290. $    return
  291. $
  292. $convfmt:    echo "convfmt"
  293. $    gawk -f convfmt.awk >tmp.
  294. $    cmp convfmt.ok tmp.
  295. $    if $status then  rm tmp.;
  296. $    return
  297. $
  298. $arrayparm:    echo "arrayparm"
  299. $    set noOn
  300. $    AWKPATH_srcdir
  301. $    gawk -f arrayparm.awk >tmp. 2>&1
  302. $    set On
  303. $    cmp arrayparm.ok tmp.
  304. $    if $status then  rm tmp.;
  305. $    return
  306. $
  307. $paramdup:    echo "paramdup"
  308. $    set noOn
  309. $    AWKPATH_srcdir
  310. $    gawk -f paramdup.awk >tmp. 2>&1
  311. $    set On
  312. $    cmp paramdup.ok tmp.
  313. $    if $status then  rm tmp.;
  314. $    return
  315. $
  316. $nonl:        echo "nonl"
  317. $    ! This one might fail, depending on which C run-time library is used.
  318. $    ! If VAXCRTL is used by the program that unpacks the distribution,
  319. $    ! then nonl.awk will actually end with a newline.  Even when that's
  320. $    ! not the case, if gawk itself uses VAXCRTL, an absent newline will
  321. $    ! be fabricated by the library when gawk reads the file.  DECC$SHR
  322. $    ! doesn't behave this way....
  323. $    AWKPATH_srcdir
  324. $    gawk --lint -f nonl.awk _NL: >tmp. 2>&1
  325. $    cmp nonl.ok tmp.
  326. $    if $status then  rm tmp.;
  327. $    return
  328. $
  329. $defref:    echo "defref"
  330. $    set noOn
  331. $    AWKPATH_srcdir
  332. $    gawk --lint -f defref.awk >tmp. 2>&1
  333. $    set On
  334. $    cmp defref.ok tmp.
  335. $    if $status then  rm tmp.;
  336. $    return
  337. $
  338. $nofmtch:    echo "nofmtch"
  339. $    AWKPATH_srcdir
  340. $    gawk --lint -f nofmtch.awk >tmp. 2>&1
  341. $    cmp nofmtch.ok tmp.
  342. $    if $status then  rm tmp.;
  343. $    return
  344. $
  345. $strftime:    echo "strftime"
  346. $    ! this test could fail on slow machines or on a second boundary,
  347. $    ! so if it does, double check the actual results
  348. $!!    date | gawk -- "{$3 = sprintf(""%02d"",$3+0); print >""strftime.ok""; print strftime() >""tmp.""}"
  349. $    ! note: original test is too Unix-specific, so substitute an easier one
  350. $    gawk -- "BEGIN {""show time"" | getline; print >""strftime.ok""; print strftime(""  %v %T"") >""tmp.""}"
  351. $    set noOn
  352. $    cmp strftime.ok tmp.
  353. $    if $status then  rm tmp.;,strftime.ok;*
  354. $    set On
  355. $    return
  356. $
  357. $litoct:    echo "litoct"
  358. $    gawk --traditional -f litoct.awk >tmp.
  359. ab
  360. $    cmp litoct.ok tmp.
  361. $    if $status then  rm tmp.;
  362. $    return
  363. $
  364. $gensub:    echo "gensub"
  365. $    gawk -f gensub.awk gensub.in >tmp.
  366. $    cmp gensub.ok tmp.
  367. $    if $status then  rm tmp.;
  368. $    return
  369. $
  370. $resplit:    echo "resplit"
  371. $    gawk -- "{ FS = "":""; $0 = $0; print $2 }" >tmp.
  372. a:b:c d:e:f
  373. $    cmp resplit.ok tmp.
  374. $    if $status then  rm tmp.;
  375. $    return
  376. $
  377. $rswhite:    echo "rswhite"
  378. $    gawk -f rswhite.awk rswhite.in >tmp.
  379. $    cmp rswhite.ok tmp.
  380. $    if $status then  rm tmp.;
  381. $    return
  382. $
  383. $prmarscl:    echo "prmarscl"
  384. $    set noOn
  385. $    AWKPATH_srcdir
  386. $    gawk -f prmarscl.awk >tmp. 2>&1
  387. $    set On
  388. $    cmp prmarscl.ok tmp.
  389. $    if $status then  rm tmp.;
  390. $    return
  391. $
  392. $sclforin:    echo "sclforin"
  393. $    set noOn
  394. $    AWKPATH_srcdir
  395. $    gawk -f sclforin.awk >tmp. 2>&1
  396. $    set On
  397. $    cmp sclforin.ok tmp.
  398. $    if $status then  rm tmp.;
  399. $    return
  400. $
  401. $sclifin:    echo "sclifin"
  402. $    set noOn
  403. $    AWKPATH_srcdir
  404. $    gawk -f sclifin.awk >tmp. 2>&1
  405. $    set On
  406. $    cmp sclifin.ok tmp.
  407. $    if $status then  rm tmp.;
  408. $    return
  409. $
  410. $intprec:    echo "intprec"
  411. $    gawk -f intprec.awk >tmp. 2>&1
  412. $    cmp intprec.ok tmp.
  413. $    if $status then  rm tmp.;
  414. $    return
  415. $
  416. $childin:    echo "childin:  currently fails for the VMS port, so skipped"
  417. $    return
  418. $! note: this `childin' test currently [gawk 3.0.3] fails for vms
  419. $childin:    echo "childin"
  420. $    echo "note: type ``hi<return><ctrl/Z>'",-
  421.          "' if testing appears to hang in `childin'"
  422. $!!    @echo hi | gawk "BEGIN { ""cat"" | getline; print; close(""cat"") }" >tmp.
  423. $    gawk "BEGIN { ""type sys$input:"" | getline; print; close(""type sys$input:"") }" >tmp.
  424. hi
  425. $    cmp childin.ok tmp.
  426. $    if $status then  rm tmp.;
  427. $    return
  428. $
  429. $noeffect:    echo "noeffect"
  430. $    AWKPATH_srcdir
  431. $    gawk --lint -f noeffect.awk >tmp. 2>&1
  432. $    cmp noeffect.ok tmp.
  433. $    if $status then  rm tmp.;
  434. $    return
  435. $
  436. $numsubstr:    echo "numsubstr"
  437. $    AWKPATH_srcdir
  438. $    gawk -f numsubstr.awk numsubstr.in >tmp.
  439. $    cmp numsubstr.ok tmp.
  440. $    if $status then  rm tmp.;
  441. $    return
  442. $
  443. $gnureops:    echo "gnureops"
  444. $    gawk -f gnureops.awk >tmp.
  445. $    cmp gnureops.ok tmp.
  446. $    if $status then  rm tmp.;
  447. $    return
  448. $
  449. $pcntplus:    echo "pcntplus"
  450. $    gawk -f pcntplus.awk >tmp.
  451. $    cmp pcntplus.ok tmp.
  452. $    if $status then  rm tmp.;
  453. $    return
  454. $
  455. $prmreuse:    echo "prmreuse"
  456. $    if f$search("prmreuse.ok").eqs."" then  create prmreuse.ok
  457. $    gawk -f prmreuse.awk >tmp.
  458. $    cmp prmreuse.ok tmp.
  459. $    if $status then  rm tmp.;
  460. $    return
  461. $
  462. $math:        echo "math"
  463. $    gawk -f math.awk >tmp.
  464. $    cmp math.ok tmp.
  465. $    if $status then  rm tmp.;
  466. $    return
  467. $
  468. $fflush:
  469. $    echo "fflush:  hopeless for VMS, so skipped"
  470. $    return
  471. $!!fflush:    echo "fflush"
  472. $    ! hopelessly Unix-specific
  473. $!!    @fflush.sh >tmp.
  474. $    cmp fflush.ok tmp.
  475. $    if $status then  rm tmp.;
  476. $    return
  477. $
  478. $fldchg:    echo "fldchg"
  479. $    gawk -f fldchg.awk fldchg.in >tmp.
  480. $    cmp fldchg.ok tmp.
  481. $    if $status then  rm tmp.;
  482. $    return
  483. $
  484. $fldchgnf:    echo "fldchgnf"
  485. $    gawk -f fldchgnf.awk fldchgnf.in >tmp.
  486. $    cmp fldchgnf.ok tmp.
  487. $    if $status then  rm tmp.;
  488. $    return
  489. $
  490. $reindops:    echo "reindops"
  491. $    gawk -f reindops.awk reindops.in >tmp.
  492. $    cmp reindops.ok tmp.
  493. $    if $status then  rm tmp.;
  494. $    return
  495. $
  496. $sprintfc:    echo "sprintfc"
  497. $    gawk -f sprintfc.awk sprintfc.in >tmp.
  498. $    cmp sprintfc.ok tmp.
  499. $    if $status then  rm tmp.;
  500. $    return
  501. $
  502. $getlnhd:
  503. $    echo "getlnhd:  uses Unix-specific command so won't work on VMS"
  504. $    return
  505. $!!getlnhd:    echo "getlnhd"
  506. $    gawk -f getlnhd.awk >tmp.
  507. $    cmp getlnhd.ok tmp.
  508. $    if $status then  rm tmp.;
  509. $    return
  510. $
  511. $backgsub:    echo "backgsub"
  512. $    gawk -f backgsub.awk backgsub.in >tmp.
  513. $    cmp backgsub.ok tmp.
  514. $    if $status then  rm tmp.;
  515. $    return
  516. $
  517. $tweakfld:    echo "tweakfld"
  518. $    gawk -f tweakfld.awk tweakfld.in >tmp.
  519. $    if f$search("errors.cleanup").nes."" then  rm errors.cleanup;*
  520. $    cmp tweakfld.ok tmp.
  521. $    if $status then  rm tmp.;
  522. $    return
  523. $
  524. $clsflnam:    echo "clsflnam"
  525. $    if f$search("clsflnam.ok").eqs."" then  create clsflnam.ok
  526. $    gawk -f clsflnam.awk clsflnam.in >tmp.
  527. $    cmp clsflnam.ok tmp.
  528. $    if $status then  rm tmp.;
  529. $    return
  530. $
  531. $mmap8k:    echo "mmap8k"
  532. $    gawk "{ print }" mmap8k.in >tmp.
  533. $    cmp mmap8k.in tmp.
  534. $    if $status then  rm tmp.;
  535. $    return
  536. $
  537. $fnarray:    echo "fnarray"
  538. $    set noOn
  539. $    AWKPATH_srcdir
  540. $    gawk -f fnarray.awk >tmp. 2>&1
  541. $    set On
  542. $    cmp fnarray.ok tmp.
  543. $    if $status then  rm tmp.;
  544. $    return
  545. $
  546. $dynlj:        echo "dynlj"
  547. $    gawk -f dynlj.awk >tmp.
  548. $    cmp dynlj.ok tmp.
  549. $    if $status then  rm tmp.;
  550. $    return
  551. $
  552. $substr:    echo "substr"
  553. $    gawk -f substr.awk >tmp.
  554. $    cmp substr.ok tmp.
  555. $    if $status then  rm tmp.;
  556. $    return
  557. $
  558. $eofsplit:    echo "eofsplit"
  559. $    if f$search("eofsplit.ok").eqs."" then  create eofsplit.ok
  560. $    gawk -f eofsplit.awk >tmp.
  561. $    cmp eofsplit.ok tmp.
  562. $    if $status then  rm tmp.;
  563. $    return
  564. $
  565. $prt1eval:    echo "prt1eval"
  566. $    gawk -f prt1eval.awk >tmp.
  567. $    cmp prt1eval.ok tmp.
  568. $    if $status then  rm tmp.;
  569. $    return
  570. $
  571. $splitwht:    echo "splitwht"
  572. $    gawk -f splitwht.awk >tmp.
  573. $    cmp splitwht.ok tmp.
  574. $    if $status then  rm tmp.;
  575. $    return
  576. $
  577. $back89:        echo "back89"
  578. $    gawk "/a\8b/" back89.in >tmp.
  579. $    cmp back89.ok tmp.
  580. $    if $status then  rm tmp.;
  581. $    return
  582. $
  583. $tradanch:    echo "tradanch"
  584. $    if f$search("tradanch.ok").eqs."" then  create tradanch.ok
  585. $    gawk --traditional -f tradanch.awk tradanch.in >tmp.
  586. $    cmp tradanch.ok tmp.
  587. $    if $status then  rm tmp.;
  588. $    return
  589. $
  590. $nlfldsep:    echo "nlfldsep"
  591. $    gawk -f nlfldsep.awk nlfldsep.in >tmp.
  592. $    cmp nlfldsep.ok tmp.
  593. $    if $status then  rm tmp.;
  594. $    return
  595. $
  596. $splitvar:    echo "splitvar"
  597. $    gawk -f splitvar.awk splitvar.in >tmp.
  598. $    cmp splitvar.ok tmp.
  599. $    if $status then  rm tmp.;
  600. $    return
  601. $
  602. $intest:    echo "intest"
  603. $    gawk -f intest.awk >tmp.
  604. $    cmp intest.ok tmp.
  605. $    if $status then  rm tmp.;
  606. $    return
  607. $
  608. $pid:        echo "pid"
  609. $    if f$search("pid.ok").eqs."" then  create pid.ok
  610. $    open/Write ftmp _pid.in
  611. $    write ftmp f$integer("%x" + f$getjpi("","PID"))
  612. $    write ftmp f$integer("%x" + f$getjpi("","OWNER"))
  613. $    close ftmp
  614. $    gawk -f pid.awk _pid.in >tmp.
  615. $    rm _pid.in;
  616. $    cmp pid.ok tmp.
  617. $    if $status then  rm tmp.;
  618. $    return
  619. $
  620. $strftlng:    echo "strftlng"
  621. $    define/User TZ "UTC"        !useless
  622. $    gawk -f strftlng.awk >tmp.
  623. $    cmp strftlng.ok tmp.
  624. $    if $status then  rm tmp.;
  625. $    return
  626. $
  627. $nfldstr:    echo "nfldstr"
  628. $    if f$search("nfldstr.ok").eqs."" then  create nfldstr.ok
  629. $    gawk "$1 == 0 { print ""bug"" }" >tmp.
  630.  
  631. $    cmp nfldstr.ok tmp.
  632. $    if $status then  rm tmp.;
  633. $    return
  634. $
  635. $nors:        echo "nors"
  636. $!! there's no straightforward way to supply non-terminated input on the fly
  637. $!!    @echo A B C D E | tr -d '\12' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@
  638. $!! so just read a line from sys$input instead
  639. $    gawk "{ print $NF }" - nors.in >tmp.
  640. A B C D E
  641. $    cmp nors.ok tmp.
  642. $    if $status then  rm tmp.;
  643. $    return
  644. $
  645. $fnarydel:    echo "fnarydel"
  646. $    gawk -f fnarydel.awk >tmp.
  647. $    cmp fnarydel.ok tmp.
  648. $    if $status then  rm tmp.;
  649. $    return
  650. $
  651. $reint:        echo "reint"
  652. $    gawk --re-interval -f reint.awk reint.in >tmp.
  653. $    cmp reint.ok tmp.
  654. $    if $status then  rm tmp.;
  655. $    return
  656. $
  657. $noparms:    echo "noparms"
  658. $    set noOn
  659. $    AWKPATH_srcdir
  660. $    gawk -f noparms.awk >tmp. 2>&1
  661. $    set On
  662. $    cmp noparms.ok tmp.
  663. $    if $status then  rm tmp.;
  664. $    return
  665. $
  666. $pipeio1:    echo "pipeio1"
  667. $    cat = "TYPE"    !close enough, as long as we avoid .LIS default suffix
  668. $    define/User test1 []test1.
  669. $    define/User test2 []test2.
  670. $    gawk -f pipeio1.awk >tmp.
  671. $    rm test1.;,test2.;
  672. $    cmp pipeio1.ok tmp.
  673. $    if $status then  rm tmp.;
  674. $    return
  675. $
  676. $pipeio2:
  677. $    echo "pipeio2:  uses Unix-specific command so won't work on VMS"
  678. $    return
  679. $!!pipeio2:    echo "pipeio2"
  680. $    cat = "gawk -- {print}"
  681. $    tr  = "??"    !unfortunately, no trivial substitution available...
  682. $    gawk -v "SRCDIR=." -f pipeio2.awk >tmp.
  683. $    cmp pipeio2.ok tmp.
  684. $    if $status then  rm tmp.;
  685. $    return
  686. $
  687. $funstack:    echo "funstack"
  688. $    gawk -f funstack.awk funstack.in >tmp.
  689. $    cmp funstack.ok tmp.
  690. $    if $status then  rm tmp.;
  691. $    return
  692. $
  693. $clobber:    echo "clobber"
  694. $    gawk -f clobber.awk >tmp.
  695. $    cmp clobber.ok seq.
  696. $    if $status then  rm seq.;*
  697. $    cmp clobber.ok tmp.
  698. $    if $status then  rm tmp.;
  699. $    return
  700. $
  701. $delarprm:    echo "delarprm"
  702. $    gawk -f delarprm.awk >tmp.
  703. $    cmp delarprm.ok tmp.
  704. $    if $status then  rm tmp.;
  705. $    return
  706. $
  707. $prdupval:    echo "prdupval"
  708. $    gawk -f prdupval.awk prdupval.in >tmp.
  709. $    cmp prdupval.ok tmp.
  710. $    if $status then  rm tmp.;
  711. $    return
  712. $
  713. $nondec:    echo "nondec"
  714. $ !    gawk -f nondec.awk >tmp.
  715. $ !    cmp nondec.ok tmp.
  716. $ !    if $status then  rm tmp.;
  717. $    return
  718. $
  719. $clean:
  720. $    if f$search("tmp.")     .nes."" then  rm tmp.;*
  721. $    if f$search("tmp.too")     .nes."" then  rm tmp.too;*
  722. $    if f$search("out%.")     .nes."" then  rm out%.;*
  723. $    if f$search("strftime.ok").nes."" then  rm strftime.ok;*
  724. $    if f$search("test%.")     .nes."" then  rm test%.;*
  725. $    if f$search("seq.")     .nes."" then  rm seq.;*
  726. $    if f$search("_pid.in")     .nes."" then  rm _pid.in;*
  727. $    if f$search("[.junk]*.*").nes."" then  rm [.junk]*.*;*
  728. $    if f$parse("[.junk]")     .nes."" then  rm []junk.dir;1
  729. $    return
  730. $
  731. $!NOTREACHED
  732. $ exit
  733.