This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
[perl5.git] / os2 / OS2 / REXX / t / rx_emxrv.t
CommitLineData
ed344e4f
IZ
1BEGIN {
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/) {
6 print "1..0\n";
7 exit 0;
8 }
9}
10
18729d3e 11print "1..20\n";
ed344e4f
IZ
12
13require OS2::DLL;
14print "ok 1\n";
15$emx_dll = OS2::DLL->load('emx');
16print "ok 2\n";
17$emx_version = $emx_dll->emx_revision();
18print "ok 3\n";
19$emx_version >= 40 or print "not "; # We cannot work with old EMXs
20print "ok 4\n";
21
22$reason = '';
23$emx_version >= 99 and $reason = ' # skipped: version of EMX 100 or more'; # Be safe
24print "ok 5$reason\n";
18729d3e
JH
25
26$emx_fullname = OS2::DLLname 0x202, $emx_dll->{Handle}; # Handle ==> fullname
27print "ok 6\n";
28$emx_dll1 = OS2::DLL->module($emx_fullname);
29print "ok 7\n";
30$emx_dll->{Handle} == $emx_dll1->{Handle} or print "not ";
31print "ok 8\n";
32
33$emx_version1 = $emx_dll1->emx_revision();
34print "ok 9\n";
35$emx_version1 eq $emx_version or print "not ";
36print "ok 10\n";
37
38$emx_revision = $emx_dll->wrapper_REXX('emx_revision');
39print "ok 11\n";
40$emx_version2 = $emx_revision->();
41print "ok 12\n";
42$emx_version2 eq $emx_version or print "not ";
43print "ok 13\n";
44
45$emx_revision1 = $emx_dll1->wrapper_REXX('#128');
46print "ok 14\n";
47$emx_version3 = $emx_revision1->();
48print "ok 15\n";
49$emx_version3 eq $emx_version or print "not ";
50print "ok 16\n";
51
52($emx_fullname1 = $emx_fullname) =~ s,/,\\,g;
53$emx_dll2 = OS2::DLL->new($emx_fullname1);
54print "ok 17\n";
55$emx_dll->{Handle} == $emx_dll2->{Handle} or print "not ";
56print "ok 18\n";
57
58$emx_version4 = $emx_dll2->emx_revision();
59print "ok 19\n";
60$emx_version4 eq $emx_version or print "not ";
61print "ok 20\n";