File: rx_objcall.t

package info (click to toggle)
perl 5.8.4-8sarge6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 58,128 kB
  • ctags: 31,422
  • sloc: perl: 224,262; ansic: 155,398; sh: 32,253; pascal: 7,747; lisp: 6,121; makefile: 2,341; cpp: 2,035; yacc: 1,019; java: 23
file content (38 lines) | stat: -rw-r--r-- 767 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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;

#
# DLL
#
$rxu = load OS2::REXX "rxu" 
  or print "1..0 # skipped: cannot find RXU.DLL\n" and exit;
print "1..5\n", "ok 1\n";

#
# function
#
@pid = $rxu->RxProcId();
@pid == 1 ? print "ok 2\n" : print "not ok 2\n";
@res = split " ", $pid[0];
print "ok 3\n" if $res[0] == $$;
@pid = $rxu->RxProcId();
@res = split " ", $pid[0];
print "ok 4\n" if $res[0] == $$;
print "# @pid\n";

eval { $rxu->nixda(); };
my $err = $@;
if ($err) {
  $err =~ s/\n/\n#\t/g;
  print "# \$\@ = '$err'\n";
}
print "ok 5\n" if $@ =~ /^Can't find symbol `nixda\'/;