1*b39c5158SmillertBEGIN { 2*b39c5158Smillert chdir 't' if -d 't/lib'; 3*b39c5158Smillert @INC = '../lib' if -d 'lib'; 4*b39c5158Smillert require Config; import Config; 5*b39c5158Smillert if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) { 6*b39c5158Smillert print "1..0\n"; 7*b39c5158Smillert exit 0; 8*b39c5158Smillert } 9*b39c5158Smillert} 10*b39c5158Smillert 11*b39c5158Smillertuse OS2::REXX; 12*b39c5158Smillert 13*b39c5158Smillert# 14*b39c5158Smillert# DLL 15*b39c5158Smillert# 16*b39c5158Smillert$rxu = load OS2::REXX "rxu" 17*b39c5158Smillert or print "1..0 # skipped: cannot find RXU.DLL\n" and exit; 18*b39c5158Smillertprint "1..5\n", "ok 1\n"; 19*b39c5158Smillert 20*b39c5158Smillert# 21*b39c5158Smillert# function 22*b39c5158Smillert# 23*b39c5158Smillert@pid = $rxu->RxProcId(); 24*b39c5158Smillert@pid == 1 ? print "ok 2\n" : print "not ok 2\n"; 25*b39c5158Smillert@res = split " ", $pid[0]; 26*b39c5158Smillertprint "ok 3\n" if $res[0] == $$; 27*b39c5158Smillert@pid = $rxu->RxProcId(); 28*b39c5158Smillert@res = split " ", $pid[0]; 29*b39c5158Smillertprint "ok 4\n" if $res[0] == $$; 30*b39c5158Smillertprint "# @pid\n"; 31*b39c5158Smillert 32*b39c5158Smillerteval { $rxu->nixda(); }; 33*b39c5158Smillertmy $err = $@; 34*b39c5158Smillertif ($err) { 35*b39c5158Smillert $err =~ s/\n/\n#\t/g; 36*b39c5158Smillert print "# \$\@ = '$err'\n"; 37*b39c5158Smillert} 38*b39c5158Smillertprint "ok 5\n" if $@ =~ /^Can't find symbol `nixda\'/; 39