[116447] trunk/base/src/pextlib1.0/tests

cal at macports.org cal at macports.org
Sat Jan 25 08:49:02 PST 2014


Revision: 116447
          https://trac.macports.org/changeset/116447
Author:   cal at macports.org
Date:     2014-01-25 08:49:02 -0800 (Sat, 25 Jan 2014)
Log Message:
-----------
pextlib1.0: Tcl cleanup, from a patch by Gustaf Neumann
 - removed numeric comparisons where not necessary
 - quotes match expressions

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/tests/filemap.tcl
    trunk/base/src/pextlib1.0/tests/fs-traverse.tcl

Modified: trunk/base/src/pextlib1.0/tests/filemap.tcl
===================================================================
--- trunk/base/src/pextlib1.0/tests/filemap.tcl	2014-01-25 16:48:01 UTC (rev 116446)
+++ trunk/base/src/pextlib1.0/tests/filemap.tcl	2014-01-25 16:49:02 UTC (rev 116447)
@@ -18,8 +18,8 @@
 		puts {![filemap exists testmap "/foo/bar"]}
 		exit 1
 	}
-	if {[filemap get testmap "/foo/bar"] != "foobar"} {
-		puts {[filemap get testmap "/foo/bar"] != "foobar"}
+	if {[filemap get testmap "/foo/bar"] ne "foobar"} {
+		puts {[filemap get testmap "/foo/bar"] ne "foobar"}
 		exit 1
 	}
 	filemap unset testmap "/foo/bar"
@@ -116,8 +116,8 @@
 		puts [filemap get testmap2 "/foobar"]
 		exit 1
 	}
-	if {[filemap get testmap2 "/bar/bar-3"] != "somevalue"} {
-		puts {[filemap get testmap2 "/bar/bar-3"] != "somevalue"}
+	if {[filemap get testmap2 "/bar/bar-3"] ne "somevalue"} {
+		puts {[filemap get testmap2 "/bar/bar-3"] ne "somevalue"}
 		puts [filemap get testmap2 "/bar/bar-3"]
 		exit 1
 	}

Modified: trunk/base/src/pextlib1.0/tests/fs-traverse.tcl
===================================================================
--- trunk/base/src/pextlib1.0/tests/fs-traverse.tcl	2014-01-25 16:48:01 UTC (rev 116446)
+++ trunk/base/src/pextlib1.0/tests/fs-traverse.tcl	2014-01-25 16:49:02 UTC (rev 116447)
@@ -85,7 +85,7 @@
         # Test skipping parts of the tree
         set output [list]
         fs-traverse file $root {
-            if {[string match */a $file]} {
+            if {[string match "*/a" $file]} {
                 continue
             }
             lappend output $file
@@ -161,7 +161,7 @@
         # Test to make sure deleting files during traversal works as expected
         set output [list]
         fs-traverse file $root {
-            if {[string match */a $file]} {
+            if {[string match "*/a" $file]} {
                 # use /bin/rm because on 10.3 file delete doesn't work on directories properly
                 exec /bin/rm -rf $file
                 continue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140125/fa95b03b/attachment.html>


More information about the macports-changes mailing list