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/) {
13 $| = 1; # Otherwise data from REXX may come first
23 @res = REXX_call(\&do_me);
25 @res == 1 ? print "ok 3\n" : print "not ok 3\n";
26 $res[0] eq "OK" ? print "ok 4\n" : print "not ok 4\n# `$res[0]'\n";
30 @res = REXX_call(\&do_me);
32 @res == 1 ? print "ok 7\n" : print "not ok 7\n";
33 $res[0] eq "OK" ? print "ok 8\n" : print "not ok 8\n# `$res[0]'\n";
35 REXX_call { print "ok 9\n" };
36 REXX_eval 'say "ok 10"';
38 REXX_eval 'say "ok 11"';
39 print "ok 12\n" if REXX_eval("return 2 + 3") eq 5;
40 REXX_eval_with 'say myfunc()', myfunc => sub {"ok 13"};