# New Ticket Created by Lars Balker Rasmussen
# Please include the string: [perl #23025]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23025 >
There's no reason to test for the presence of setenv/unsetenv in libc
- these functions are emulated if not present.
However, now the 4th test fails on Solaris (and most likely other OS's
witout setenv/unsetenv). This is because the test relies on a key
disappearing from %ENV when it's been unsetenv'ed - this doesn't
happen when using putenv("key=") as the current unsetenv emulation.
I'm not sure what's the best portable way to handle this is.
--
Lars Balker Rasmussen Consult::Perl
-- attachment 1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/61195/45197/c6c199/env.patch
Index: t/pmc/env.t
===================================================================
RCS file: /cvs/public/parrot/t/pmc/env.t,v
retrieving revision 1.3
diff -u -a -r1.3 env.t
--- t/pmc/env.t 14 Jul 2003 10:32:36 -0000 1.3
+++ t/pmc/env.t 17 Jul 2003 18:17:35 -0000
@@ -3,8 +3,7 @@
use Parrot::Test tests => 4;
use Test::More;
use Parrot::Config;
-SKIP: {
- skip("no setenv", 3) unless $PConfig{"setenv"};
+
$ENV{"PARROT_TMP"} = "riding a ponie";
output_like(<<'CODE', <<OUT, "getenv");
new P0, .Env
@@ -24,7 +23,6 @@
CODE
/hello polly/i
OUT
-}
output_is(<<'CODE', <<OUT, "envs are all the same");
new P0, .Env
@@ -42,9 +40,6 @@
ok
OUT
-
-SKIP: {
- skip("no unsetenv", 1) unless $PConfig{"unsetenv"};
output_is(<<'CODE', <<OUT, "exists/delete");
new P0, .Env
set P0["PARROT_TMP"], "hello polly"
@@ -64,4 +59,3 @@
ok 1
ok 2
OUT
-}