1BEGIN { 2 chdir 't' if -d 't/lib'; 3 @INC = '../lib' if -d 'lib'; 4 require Config; import Config; 5 if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) { 6 print "1..0\n"; 7 exit 0; 8 } 9} 10 11use OS2::REXX; 12$rx = load OS2::REXX "RXU" # from RXU1a.ZIP 13 or print "1..0 # skipped: cannot find RXU.DLL\n" and exit; 14 15print "1..7\n", "ok 1\n"; 16 17$rx->prefix("Rx"); # implicit function prefix 18print "ok 2\n"; 19 20REXX_call { 21 tie @pib, OS2::REXX, "IB.P"; # bind array to REXX stem variable 22 print "ok 3\n"; 23 tie %tib, OS2::REXX, "IB.T."; # bind associative array to REXX stem var 24 print "ok 4\n"; 25 26 $rx->GetInfoBlocks("IB."); # call REXX function 27 print "ok 5\n"; 28 defined $pib[6] ? print "ok 6\n" : print "not ok 6\n# pib\n"; 29 defined $tib{7} && $tib{7} =~ /^\d+$/ ? print "ok 7\n" 30 : print "not ok 7\n# tib\n"; 31 print "# Process status is ", unpack("I", $pib[6]), 32 ", thread ordinal is $tib{7}\n"; 33}; 34