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" or die "1..0\n# load\n";
26 tie $s, OS2::REXX, "TEST";
29 print "ok 3\n" if $s eq 1;
30 print "not ok 3\n# `$s'\n" unless $s eq 1;
37 tie %all, OS2::REXX, ""; # all REXX vars
51 my ($test, @arr) = @_;
53 foreach $key (sort keys %all) { push @rx, $key, $all{$key} }
54 if ("@rx" eq "@arr") {print "ok $test\n"}
55 else { print "not ok $test\n# expect `@arr', got `@rx'\n" }
59 tie %h, OS2::REXX, "TEST.";
64 check(7, "TEST.one", 1);
67 check(8, "TEST.one", 1, "TEST.two", 2);
70 check(9, "TEST.one", "", "TEST.two", 2);
71 print "ok 10\n" if exists $h{"one"};
72 print "ok 11\n" if exists $h{"two"};
75 check(12, "TEST.two", 2);
76 print "ok 13\n" if not exists $h{"one"};
77 print "ok 14\n" if exists $h{"two"};
79 OS2::REXX::dropall("TEST.");
82 print "ok 17\n" if not exists $h{"one"};
83 print "ok 18\n" if not exists $h{"two"};