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