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 OS2::REXX::_set("X" => sqrt(2)) and print "ok 1\n";
17 $x = OS2::REXX::_fetch("X") and print "ok 2\n";
18 if (abs($x - sqrt(2)) < 5e-15) {
20 } else { print "not ok 3\n# sqrt(2) = @{[sqrt(2)]} != `$x'\n" }
21 OS2::REXX::_set("Y" => sqrt(3)) and print "ok 4\n";
24 while (($name, $value) = OS2::REXX::_next("")) {
26 if ($i <= 2 and $name eq "Y" ) {
27 if ($value eq sqrt(3)) {
30 print "not ok $n\n# `$name' => `$value'\n" ;
32 } elsif ($i <= 2 and $name eq "X") {
33 print "ok $n\n" if $value eq sqrt(2);
34 } else { print "not ok 7\n# name `$name', value `$value'\n" }
36 print "ok 7\n" if $i == 2;
37 OS2::REXX::_drop("X") and print "ok 8\n";
38 $x = OS2::REXX::_fetch("X") or print "ok 9\n";