diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-05-25 10:31:21 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-05-25 10:31:21 +0000 |
commit | ae77835f9b08444f73b593d4cdc0758132dbbf00 (patch) | |
tree | 5f626cfecad7636b4da1329b5602c41f2cf53d23 /os2/OS2/REXX/t/rx_cmprt.t | |
parent | c750a3ec3b866067ab46dbcc9083205d823047c3 (diff) | |
parent | ec4e49dc1523dcdb6bec56a66be410eab95cfa61 (diff) | |
download | perl-ae77835f9b08444f73b593d4cdc0758132dbbf00.tar.gz |
First stab at 5.003 -> 5.004 integration.
p4raw-id: //depot/perl@18
Diffstat (limited to 'os2/OS2/REXX/t/rx_cmprt.t')
-rw-r--r-- | os2/OS2/REXX/t/rx_cmprt.t | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/os2/OS2/REXX/t/rx_cmprt.t b/os2/OS2/REXX/t/rx_cmprt.t new file mode 100644 index 0000000000..f2113e3aa3 --- /dev/null +++ b/os2/OS2/REXX/t/rx_cmprt.t @@ -0,0 +1,40 @@ +BEGIN { + chdir 't' if -d 't/lib'; + @INC = '../lib' if -d 'lib'; + require Config; import Config; + if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) { + print "1..0\n"; + exit 0; + } +} + +use OS2::REXX; + +$| = 1; # Otherwise data from REXX may come first + +print "1..13\n"; + +$n = 1; +sub do_me { + print "ok $n\n"; + "OK"; +} + +@res = REXX_call(\&do_me); +print "ok 2\n"; +@res == 1 ? print "ok 3\n" : print "not ok 3\n"; +$res[0] eq "OK" ? print "ok 4\n" : print "not ok 4\n# `$res[0]'\n"; + +# Try again +$n = 5; +@res = REXX_call(\&do_me); +print "ok 6\n"; +@res == 1 ? print "ok 7\n" : print "not ok 7\n"; +$res[0] eq "OK" ? print "ok 8\n" : print "not ok 8\n# `$res[0]'\n"; + +REXX_call { print "ok 9\n" }; +REXX_eval 'say "ok 10"'; +# Try again +REXX_eval 'say "ok 11"'; +print "ok 12\n" if REXX_eval("return 2 + 3") eq 5; +REXX_eval_with 'say myfunc()', myfunc => sub {"ok 13"}; |