summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-01-05 05:43:33 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-01-05 05:43:33 +0000
commit902173a3f9be2337628b9b0cc2629acc55276ccc (patch)
tree385fc5f28d5a0b5a83982358538b3324e6d3536c /t
parent22fae026e9f4859841088a1c5609be12b0b1d4f3 (diff)
downloadperl-902173a3f9be2337628b9b0cc2629acc55276ccc.tar.gz
[win32] Support case-tolerant %ENV
- underlying system calls see the case-as-supplied by user - added tests to verify addition/deletion/enumeration case-tolerance - hv.c touched, but changes are fully conditional on -DENV_IS_CASELESS, which is default on win32 now p4raw-id: //depot/win32/perl@393
Diffstat (limited to 't')
-rwxr-xr-xt/op/magic.t27
1 files changed, 22 insertions, 5 deletions
diff --git a/t/op/magic.t b/t/op/magic.t
index 80361ba0b7..ace49b546d 100755
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -24,7 +24,7 @@ $Is_VMS = $^O eq 'VMS';
$Is_Dos = $^O eq 'dos';
$PERL = ($Is_MSWin32 ? '.\perl' : './perl');
-print "1..30\n";
+print "1..34\n";
eval '$ENV{"FOO"} = "hi there";'; # check that ENV is inited inside eval
if ($Is_MSWin32) { ok 1, `cmd /x /c set FOO` eq "FOO=hi there\n"; }
@@ -37,8 +37,8 @@ ok 2, $!, $!;
close FOO; # just mention it, squelch used-only-once
if ($Is_MSWin32 || $Is_Dos) {
- ok 3,1;
- ok 4,1;
+ ok "3 # skipped",1;
+ ok "4 # skipped",1;
}
else {
# the next tests are embedded inside system simply because sh spits out
@@ -165,8 +165,8 @@ ok 27, $^O;
ok 28, $^T > 850000000, $^T;
if ($Is_VMS || $Is_Dos) {
- ok 29, 1;
- ok 30, 1;
+ ok "29 # skipped", 1;
+ ok "30 # skipped", 1;
}
else {
$PATH = $ENV{PATH};
@@ -182,3 +182,20 @@ else {
: (`echo \$NoNeSuCh` eq "foo\n") );
}
+# test case-insignificance of %ENV (these tests must be enabled only
+# when perl is compiled with -DENV_IS_CASELESS)
+if ($Is_MSWin32) {
+ %ENV = ();
+ $ENV{'Foo'} = 'bar';
+ $ENV{'fOo'} = 'baz';
+ ok 31, (scalar(keys(%ENV)) == 1);
+ ok 32, exists($ENV{'FOo'});
+ ok 33, (delete($ENV{'foO'}) eq 'baz');
+ ok 34, (scalar(keys(%ENV)) == 0);
+}
+else {
+ ok "31 # skipped",1;
+ ok "32 # skipped",1;
+ ok "33 # skipped",1;
+ ok "34 # skipped",1;
+}