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