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/) {
16 load OS2::REXX "ydbautil"
17 or print "1..0 # skipped: cannot find YDBAUTIL.DLL\n" and exit;
27 tie $s, OS2::REXX, "TEST";
30 print "ok 3\n" if $s eq 1;
31 print "not ok 3\n# `$s'\n" unless $s eq 1;
38 tie %all, OS2::REXX, ""; # all REXX vars
52 my ($test, @arr) = @_;
54 foreach $key (sort keys %all) { push @rx, $key, $all{$key} }
55 if ("@rx" eq "@arr") {print "ok $test\n"}
56 else { print "not ok $test\n# expect `@arr', got `@rx'\n" }
60 tie %h, OS2::REXX, "TEST.";
65 check(7, "TEST.one", 1);
68 check(8, "TEST.one", 1, "TEST.two", 2);
71 check(9, "TEST.one", "", "TEST.two", 2);
72 print "ok 10\n" if exists $h{"one"};
73 print "ok 11\n" if exists $h{"two"};
76 check(12, "TEST.two", 2);
77 print "ok 13\n" if not exists $h{"one"};
78 print "ok 14\n" if exists $h{"two"};
80 OS2::REXX::dropall("TEST.");
83 print "ok 17\n" if not exists $h{"one"};
84 print "ok 18\n" if not exists $h{"two"};