diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-09-04 11:04:30 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-09-04 11:04:30 +0100 |
commit | 354c724e8ab74f150e14800acc80d505949161f5 (patch) | |
tree | 42fd4401ebe97f5a765397d0ff33ce50b50ad349 /os2/OS2/OS2-REXX/t/rx_emxrv.t | |
parent | 46c3340ed6f3bbae3f80607438da0310e52a687a (diff) | |
download | perl-354c724e8ab74f150e14800acc80d505949161f5.tar.gz |
OS/2 hadn't been updated to cope with the ext/ restructuring.
I don't have OS/2, so I can't test this, but the code in Configure will assume
flat directories, because ext/File-Glob is present, and hence not search
recursively and not find the OS/2 extensions if they are copied into ext/OS2/*
I believe that without this change OS/2 will not have been building since the
change to flattened ext. This change may not be sufficient to get OS/2
building again, but it is in the right direction.
Diffstat (limited to 'os2/OS2/OS2-REXX/t/rx_emxrv.t')
-rw-r--r-- | os2/OS2/OS2-REXX/t/rx_emxrv.t | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/os2/OS2/OS2-REXX/t/rx_emxrv.t b/os2/OS2/OS2-REXX/t/rx_emxrv.t new file mode 100644 index 0000000000..5df8c32785 --- /dev/null +++ b/os2/OS2/OS2-REXX/t/rx_emxrv.t @@ -0,0 +1,61 @@ +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; + } +} + +print "1..20\n"; + +require OS2::DLL; +print "ok 1\n"; +$emx_dll = OS2::DLL->load('emx'); +print "ok 2\n"; +$emx_version = $emx_dll->emx_revision(); +print "ok 3\n"; +$emx_version >= 40 or print "not "; # We cannot work with old EMXs +print "ok 4\n"; + +$reason = ''; +$emx_version >= 99 and $reason = ' # skipped: version of EMX 100 or more'; # Be safe +print "ok 5$reason\n"; + +$emx_fullname = OS2::DLLname 0x202, $emx_dll->{Handle}; # Handle ==> fullname +print "ok 6\n"; +$emx_dll1 = OS2::DLL->module($emx_fullname); +print "ok 7\n"; +$emx_dll->{Handle} == $emx_dll1->{Handle} or print "not "; +print "ok 8\n"; + +$emx_version1 = $emx_dll1->emx_revision(); +print "ok 9\n"; +$emx_version1 eq $emx_version or print "not "; +print "ok 10\n"; + +$emx_revision = $emx_dll->wrapper_REXX('emx_revision'); +print "ok 11\n"; +$emx_version2 = $emx_revision->(); +print "ok 12\n"; +$emx_version2 eq $emx_version or print "not "; +print "ok 13\n"; + +$emx_revision1 = $emx_dll1->wrapper_REXX('#128'); +print "ok 14\n"; +$emx_version3 = $emx_revision1->(); +print "ok 15\n"; +$emx_version3 eq $emx_version or print "not "; +print "ok 16\n"; + +($emx_fullname1 = $emx_fullname) =~ s,/,\\,g; +$emx_dll2 = OS2::DLL->new($emx_fullname1); +print "ok 17\n"; +$emx_dll->{Handle} == $emx_dll2->{Handle} or print "not "; +print "ok 18\n"; + +$emx_version4 = $emx_dll2->emx_revision(); +print "ok 19\n"; +$emx_version4 eq $emx_version or print "not "; +print "ok 20\n"; |