[41638] trunk/base/src/pextlib1.0/tests/unsetenv.tcl

blb at macports.org blb at macports.org
Fri Nov 7 13:06:17 PST 2008


Revision: 41638
          http://trac.macports.org/changeset/41638
Author:   blb at macports.org
Date:     2008-11-07 13:06:17 -0800 (Fri, 07 Nov 2008)
Log Message:
-----------
pextlib1.0/tests/unsetenv.tcl - add test for verifying 'unsetenv *' does
empty out the environment; use 'error' instead of 'exit' so the cause for
a failure is shown

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/tests/unsetenv.tcl

Modified: trunk/base/src/pextlib1.0/tests/unsetenv.tcl
===================================================================
--- trunk/base/src/pextlib1.0/tests/unsetenv.tcl	2008-11-07 21:00:43 UTC (rev 41637)
+++ trunk/base/src/pextlib1.0/tests/unsetenv.tcl	2008-11-07 21:06:17 UTC (rev 41638)
@@ -9,9 +9,14 @@
 
     array unset env *
     puts [array get env]
-
+    if {[array size env] > 0} {
+        puts "note: your TclUnsetEnv is broken... (need to use unsetenv too)"
+    }
     unsetenv *
     puts [array get env]
+    if {[array size env] > 0} {
+        error "env not empty as expected"
+    }
 
 
     set env(CC) "gcc"
@@ -22,7 +27,7 @@
     }
     unsetenv CC
     if {[info exists env(CC)]} {
-        exit 1
+        error "CC still set in env"
     }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081107/636dc7c9/attachment.html>


More information about the macports-changes mailing list