[125619] trunk/base/src/macports1.0

jmr at macports.org jmr at macports.org
Mon Sep 22 16:28:41 PDT 2014


Revision: 125619
          https://trac.macports.org/changeset/125619
Author:   jmr at macports.org
Date:     2014-09-22 16:28:41 -0700 (Mon, 22 Sep 2014)
Log Message:
-----------
use eq/ne for string comparisons in macports1.0

Modified Paths:
--------------
    trunk/base/src/macports1.0/doctor.tcl
    trunk/base/src/macports1.0/macports.tcl
    trunk/base/src/macports1.0/macports_dlist.tcl
    trunk/base/src/macports1.0/tests/macports.test
    trunk/base/src/macports1.0/tests/macports_dlist.test
    trunk/base/src/macports1.0/tests/macports_util.test
    trunk/base/src/macports1.0/tests/test.tcl

Modified: trunk/base/src/macports1.0/doctor.tcl
===================================================================
--- trunk/base/src/macports1.0/doctor.tcl	2014-09-22 23:02:06 UTC (rev 125618)
+++ trunk/base/src/macports1.0/doctor.tcl	2014-09-22 23:28:41 UTC (rev 125619)
@@ -141,7 +141,7 @@
 
         set version ${macports::macosx_version}
 
-        if {$version == 10.9} {
+        if {$version eq "10.9"} {
 
             if {![file exists "/Library/Developer/CommandLineTools/"]} {
 
@@ -493,7 +493,7 @@
 
         set mac_version ${macports::macosx_version}
 
-        if {$mac_version == 10.6} {
+        if {$mac_version eq "10.6"} {
 
             if {[file exists /Applications/X11.app]} {
                 ui_error "it seems you have Mac OSX 10.6 installed, and are using X11 from \"X11.app\". This has been known to cause issues. \
@@ -705,7 +705,7 @@
 
         if {"$port_loc/bin" in $split && "$port_loc/sbin" in $split } {
 
-            if {[lindex $split 0] != "$port_loc/bin"} {
+            if {[lindex $split 0] ne "$port_loc/bin"} {
                 ui_warn "$port_loc/bin is not first in your PATH environmental variable.  This may or may not \
                          cause problems in the future."
             }
@@ -716,7 +716,7 @@
                      Would you like to add $port_loc/bin to your \$PATH variable now? \[Y/N\]"
             set input [gets stdin]
 
-            if {$input == "y" || $input == "Y"} {
+            if {$input eq "y" || $input eq "Y"} {
                 ui_msg "Attempting to add $port_loc/bin to $profile_path"
 
                 if {[file exists $profile_path] == 1} {
@@ -731,7 +731,7 @@
 
                 ui_msg "Added PATH properly. Please execute, 'source $profile_path' in a new terminal window."
 
-            } elseif {$input == "n" || $input == "N"} {    
+            } elseif {$input eq "n" || $input eq "N"} {    
                 ui_msg "Not fixing your \$PATH variable."
 
             } else {

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2014-09-22 23:02:06 UTC (rev 125618)
+++ trunk/base/src/macports1.0/macports.tcl	2014-09-22 23:28:41 UTC (rev 125619)
@@ -1878,8 +1878,8 @@
         set revision [lindex $i 2]
         set variants [lindex $i 3]
         array set portinfo [mportinfo $mport]
-        if {$name eq $portinfo(name) && $version == $portinfo(version)
-            && $revision == $portinfo(revision) && $variants == $portinfo(canonical_active_variants)} {
+        if {$name eq $portinfo(name) && $version eq $portinfo(version)
+            && $revision == $portinfo(revision) && $variants eq $portinfo(canonical_active_variants)} {
             return 1
         }
     }
@@ -3819,7 +3819,7 @@
         set version [lindex $i 1]
         set revision [lindex $i 2]
         set epoch [lindex $i 5]
-        if {$version_installed eq {} || ($epoch > $epoch_installed && $version != $version_installed) ||
+        if {$version_installed eq {} || ($epoch > $epoch_installed && $version ne $version_installed) ||
                 ($epoch >= $epoch_installed && [vercmp $version $version_installed] > 0)
                 || ($epoch >= $epoch_installed
                     && [vercmp $version $version_installed] == 0
@@ -3965,14 +3965,14 @@
         && ![info exists options(ports_upgrade_force)]} {
         if {$portname ne $newname} {
             ui_debug "ignoring versions, installing replacement port"
-        } elseif {$epoch_installed < $epoch_in_tree && $version_installed != $version_in_tree} {
+        } elseif {$epoch_installed < $epoch_in_tree && $version_installed ne $version_in_tree} {
             set build_override 1
             ui_debug "epoch override ... upgrading!"
         } elseif {[info exists options(ports_upgrade_enforce-variants)] && $options(ports_upgrade_enforce-variants) eq {yes}
-                  && [info exists portinfo(canonical_active_variants)] && $portinfo(canonical_active_variants) != $oldvariant} {
+                  && [info exists portinfo(canonical_active_variants)] && $portinfo(canonical_active_variants) ne $oldvariant} {
             ui_debug "variant override ... upgrading!"
         } elseif {$os_platform_installed ne {} && $os_major_installed ne {} && $os_platform_installed != 0
-                  && ([_mportkey $mport {{os.platform}}] != $os_platform_installed
+                  && ([_mportkey $mport {{os.platform}}] ne $os_platform_installed
                   || [_mportkey $mport {{os.major}}] != $os_major_installed)} {
             ui_debug "platform mismatch ... upgrading!"
             set build_override 1
@@ -3984,7 +3984,7 @@
             # in the first run of rev-upgrade, only activate possibly already existing files and check for missing dependencies
             # do nothing, just prevent will_install being set to no below
         } else {
-            if {[info exists portinfo(canonical_active_variants)] && $portinfo(canonical_active_variants) != $oldvariant} {
+            if {[info exists portinfo(canonical_active_variants)] && $portinfo(canonical_active_variants) ne $oldvariant} {
                 if {[llength $variationslist] > 0} {
                     ui_warn "Skipping upgrade since $portname ${version_installed}_$revision_installed >= $portname ${version_in_tree}_${revision_in_tree}, even though installed variants \"$oldvariant\" do not match \"$portinfo(canonical_active_variants)\". Use 'upgrade --enforce-variants' to switch to the requested variants."
                 } else {
@@ -4113,8 +4113,8 @@
         if {!$force_cur} {
             unset options(ports_force)
         }
-        if {$anyactive && $version_in_tree == $version_active && $revision_in_tree == $revision_active
-            && $portinfo(canonical_active_variants) == $variant_active && $portname eq $newname} {
+        if {$anyactive && $version_in_tree eq $version_active && $revision_in_tree == $revision_active
+            && $portinfo(canonical_active_variants) eq $variant_active && $portname eq $newname} {
             set anyactive no
         }
     }
@@ -4194,7 +4194,7 @@
             set version [lindex $i 1]
             set revision [lindex $i 2]
             set variant [lindex $i 3]
-            if {$version == $version_in_tree && $revision == $revision_in_tree && $variant == $portinfo(canonical_active_variants) && $portname eq $newname} {
+            if {$version eq $version_in_tree && $revision == $revision_in_tree && $variant eq $portinfo(canonical_active_variants) && $portname eq $newname} {
                 continue
             }
             set epoch [lindex $i 5]

Modified: trunk/base/src/macports1.0/macports_dlist.tcl
===================================================================
--- trunk/base/src/macports1.0/macports_dlist.tcl	2014-09-22 23:02:06 UTC (rev 125618)
+++ trunk/base/src/macports1.0/macports_dlist.tcl	2014-09-22 23:28:41 UTC (rev 125619)
@@ -307,7 +307,7 @@
 	while {1} {
 		set ditem [$selector $dlist statusdict]
 
-		if {$ditem == {}} {
+		if {$ditem eq {}} {
 			if {[llength $dlist] > 0} {
 				ui_debug "dlist_eval: all entries in dependency list have unsatisfied dependencies; can't process"
 			}
@@ -320,7 +320,7 @@
 				return $dlist
 			}
 			# No news is good news at this point.
-			if {$result == {}} { set result 0 }
+			if {$result eq {}} { set result 0 }
 			
 			foreach token [ditem_key $ditem provides] {
 				set statusdict($token) [expr {$result == 0}]
@@ -387,7 +387,7 @@
 proc ditem_append {ditem key args} {
 	variable $ditem
 	set x [lindex [array get $ditem $key] 1]
-	if {$x != {}} {
+	if {$x ne {}} {
 		lappend x {*}$args
 	} else {
 		set x $args
@@ -399,7 +399,7 @@
 proc ditem_append_unique {ditem key args} {
 	variable $ditem
 	set x [lindex [array get $ditem $key] 1]
-	if {$x != {}} {
+	if {$x ne {}} {
 		lappend x {*}$args
 		set x [lsort -unique $x]
 	} else {

Modified: trunk/base/src/macports1.0/tests/macports.test
===================================================================
--- trunk/base/src/macports1.0/tests/macports.test	2014-09-22 23:02:06 UTC (rev 125618)
+++ trunk/base/src/macports1.0/tests/macports.test	2014-09-22 23:28:41 UTC (rev 125619)
@@ -50,7 +50,7 @@
     if {[catch {mportclose $mport}] != 0} {
        return "FAIL: cannot run mportclose"
     }
-    if {[ditem_key $mport workername] != ""} {
+    if {[ditem_key $mport workername] ne ""} {
        return "FAIL: port not closed"
     }
     return "Mport close successful."
@@ -112,7 +112,7 @@
     if {[macports::init_logging $mport] != 0} {
        return "FAIL: incorrect channels"
     }
-    if {$macports::channels(any) != "stdout debuglog"} {
+    if {$macports::channels(any) ne "stdout debuglog"} {
        return "FAIL: incorrect channels(any)"
     }
     if {(![info exists ui_options(ports_debug)] && $macports::channels(debug) ne "debuglog") || 
@@ -218,7 +218,7 @@
     }
 } -body {
     macports::pop_log
-    if {$::debuglog != $::logstack} {
+    if {$::debuglog ne $::logstack} {
 	return "FAIL: cannot pop log"
     }
     return "Pop log successful."
@@ -236,7 +236,7 @@
     Set phase unit test.
 } -body {
     set res [set_phase test]
-    if {$macports::current_phase != "test"} {
+    if {$macports::current_phase ne "test"} {
 	return "FAIL: phase not set"
     }
     return "Set phase successful."
@@ -258,7 +258,7 @@
     close $fd2
     set fd2 [open $pwd/message r]
     set line [read $fd2]
-    if {$line != "prefixargs\n"} {
+    if {$line ne "prefixargs\n"} {
 	return "FAIL: wrong message"
     }
     close $fd2
@@ -270,7 +270,7 @@
     close $fd2
     set fd2 [open $pwd/log r]
     set line [read $fd2]
-    if {$line != "prefixarg"} {
+    if {$line ne "prefixarg"} {
 	return "FAIL: wrong message"
     }
     close $fd2
@@ -354,10 +354,10 @@
 test findBinary {
     Find binary unit test.
 } -body {
-    if {[macports::findBinary pwd ls] != "/bin/pwd"} {
+    if {[macports::findBinary pwd ls] ne "/bin/pwd"} {
        return "FAIL: wrong binary"
     }
-    if {[macports::findBinary pwd /bin/ls] != "/bin/ls"} {
+    if {[macports::findBinary pwd /bin/ls] ne "/bin/ls"} {
        return "FAIL: wrong binary"
     }
     return "Find binary successful."
@@ -370,7 +370,7 @@
     if {[catch {macports::binaryInPath zz}] != 1} {
        return "FAIL: invalid binary found"
     }
-    if {[macports::binaryInPath ls] != "/bin/ls"} {
+    if {[macports::binaryInPath ls] ne "/bin/ls"} {
        return "FAIL: wrong binary found"
     }
     return "Binary in path successful."
@@ -381,7 +381,7 @@
     Get option unit test.
 } -body {
     set macports::test macports
-    if {[macports::getoption test] != "macports"} {
+    if {[macports::getoption test] ne "macports"} {
 	return "FAIL: cannot get option"
     }
     return "Get option successful."
@@ -395,7 +395,7 @@
 } -setup {
     unset macports::xcodeversion
 } -body {
-    if {[macports::setxcodeinfo a b c] != ""} {
+    if {[macports::setxcodeinfo a b c] ne ""} {
        return "FAIL: xcode binary not found"
     }
     if {![info exists macports::xcodeversion]} {
@@ -412,7 +412,7 @@
 } -body {
     unset macports::developer_dir
 
-    if {[macports::set_developer_dir a b c] != ""} {
+    if {[macports::set_developer_dir a b c] ne ""} {
        return "FAIL: cannot set dev dir"
     }
     if {![info exists macports::developer_dir]} {
@@ -500,7 +500,7 @@
     close [open $macports::portdbpath/pingtimes w+]
 
 } -body {
-    if {[mportshutdown] != ""} {
+    if {[mportshutdown] ne ""} {
        return "FAIL: errors occured"
     }
 
@@ -508,7 +508,7 @@
     append res "host1 \{test " $time "\}"
     set fd [open $macports::portdbpath/pingtimes r]
 
-    if {[gets $fd] != $res} {
+    if {[gets $fd] ne $res} {
        return "FAIL: wrong value saved"
     }
     close $fd
@@ -526,7 +526,7 @@
 } -body {
     set target $pwd/target
 
-    if {[macports::copy_xcode_plist $target] != ""} {
+    if {[macports::copy_xcode_plist $target] ne ""} {
        return "FAIL: cannot copy xcode plist"
     }
     if {![file exists $target/Library/Preferences/com.apple.dt.Xcode.plist]} {
@@ -555,10 +555,10 @@
 test get_tar_flags {
     Get tar flags unit test.
 } -body {
-    if {[macports::get_tar_flags .tbz2] != "-j"} {
+    if {[macports::get_tar_flags .tbz2] ne "-j"} {
 	return "FAIL: wrong flaga (-j)"
     }
-    if {[macports::get_tar_flags .tgz] != "-z"} {
+    if {[macports::get_tar_flags .tgz] ne "-z"} {
 	return "FAIL: wrong flaga (-z)"
     }
     return "Get tar flags successful."
@@ -570,7 +570,7 @@
 } -body {
     set url http://packages.macports.org/db_select/db_select-0.1_2.darwin_13.noarch.tbz2
     set res [macports::fetch_port $url]
-    if {$res != "${pwd}/portdbpath/portdirs/db_select-0.1_2"} {
+    if {$res ne "${pwd}/portdbpath/portdirs/db_select-0.1_2"} {
 	return "FAIL: cannot fetch port"
     }
     return "Fetch port successful."
@@ -582,7 +582,7 @@
 test getprotocol {
     Get protocol unit test.
 } -body {
-    if {[macports::getprotocol http://www.macports.org] != "http"} {
+    if {[macports::getprotocol http://www.macports.org] ne "http"} {
        return "FAIL: wrong protocol"
     }
     return "Get protocol successful."
@@ -596,12 +596,12 @@
 } -body {
     set url http://packages.macports.org/db_select/db_select-0.1_2.darwin_13.noarch.tbz2
     set res [macports::getportdir $url]
-    if {$res != "${pwd}/portdbpath/portdirs/db_select-0.1_2"} {
+    if {$res ne "${pwd}/portdbpath/portdirs/db_select-0.1_2"} {
 	return "FAIL: invalid port directory"
     }
 
     set url file://${pwd}/local_file
-    if {[macports::getportdir $url] != "${pwd}/local_file"} {
+    if {[macports::getportdir $url] ne "${pwd}/local_file"} {
 	return "FAIL: invalid local port directory"
     }
     return "Get port dir successful."
@@ -619,13 +619,13 @@
     set default_path $pwd/portdbpath/sources/rsync.macports.org/release/tarballs/ports/_resources
     set fallback_path $pwd/portdbpath/sources/packages.macports.org/db_select/db_select-0.1_2.darwin_13.noarch.tbz2/_resources
 
-    if {[macports::getportresourcepath $url "" yes] != $default_path} {
+    if {[macports::getportresourcepath $url "" yes] ne $default_path} {
        return "FAIL: wrong resource path"
     }
-    if {[macports::getportresourcepath $url "" no] != $fallback_path} {
+    if {[macports::getportresourcepath $url "" no] ne $fallback_path} {
        return "FAIL: wrong fallback path"
     }
-    if {[macports::getportresourcepath $url "test" no] != "${fallback_path}/test"} {
+    if {[macports::getportresourcepath $url "test" no] ne "${fallback_path}/test"} {
        return "FAIL: wrong fallback path with subdir"
     }
 
@@ -638,14 +638,14 @@
 } -body {
     set path test/path
     set macports::sources_default file://$pwd
-    if {[macports::getdefaultportresourcepath $path] != "${pwd}/_resources/${path}"} {
+    if {[macports::getdefaultportresourcepath $path] ne "${pwd}/_resources/${path}"} {
        return "FAIL: wrong file res path"
     }
 
     set macports::sources_default http://$pwd
     set default_source_url [lindex ${macports::sources_default} 0]
     set right_path [macports::getsourcepath $default_source_url]/_resources/test/path
-    if {[macports::getdefaultportresourcepath $path] != $right_path} {
+    if {[macports::getdefaultportresourcepath $path] ne $right_path} {
        return "FAIL: wrong http res path"
     }
     return "Default res path successful."
@@ -678,7 +678,7 @@
     set res ""
 } -body {
     mporttraverse test_proc $pwd/porttree
-    if {$res != "1.01.0"} {
+    if {$res ne "1.01.0"} {
        return "FAIL: porttree not traversed"
     }
     return "Mport traverse successful."
@@ -825,16 +825,16 @@
     puts $fd "a\nb"
     close $fd
 } -body {
-    if {[mportselect list group] != {file1 file2}} {
+    if {[mportselect list group] ne {file1 file2}} {
        return "FAIL: files not listed"
     }
-    if {[mportselect set group file1] != ""} {
+    if {[mportselect set group file1] ne ""} {
        reutrn "FAIL: cannot set links"
     }
     if {![file exists $macports::prefix/a]} {
        return "FAIL: link not created"
     }
-    if {[mportselect show group] != "file1"} {
+    if {[mportselect show group] ne "file1"} {
        return "FAIL: file not selected"
     }
     return "Mport select successful."
@@ -849,11 +849,11 @@
 } -body {
     global env
     set env(TMPDIR) temporal
-    if {[macports::gettmpdir] != "temporal"} {
+    if {[macports::gettmpdir] ne "temporal"} {
        return "FAIL: set temp dir not detected"
     }
     unset env(TMPDIR)
-    if {[macports::gettmpdir] != "/tmp"} {
+    if {[macports::gettmpdir] ne "/tmp"} {
        return "FAIL: default value not set"
     }
     return "Get tmp dir successful."
@@ -914,11 +914,11 @@
     Revupgrade handle special paths unit test.
 } -body {
     set res [macports::revupgrade_handle_special_paths fname test_path]
-    if {$res != "test_path"} {
+    if {$res ne "test_path"} {
        return "FAIL: wrong path"
     }
     set res [macports::revupgrade_handle_special_paths fname @loader_path/test_load]
-    if {$res != "./test_load"} {
+    if {$res ne "./test_load"} {
        return "FAIL: wrong load path"
     }
     return "Revupgrade handle special path successful."
@@ -937,7 +937,7 @@
     set macports::host_preferred(macports_pref) [list pref $time]
 
 } -body {
-    if {[macports::get_pingtime macports.org] != "MacPorts"} {
+    if {[macports::get_pingtime macports.org] ne "MacPorts"} {
        return "FAIL: wrong ping time"
     }
     if {[macports::get_pingtime macports_blacklist] != -1} {
@@ -976,15 +976,15 @@
 } -body {
     set res [macports::get_archive_sites_conf_values]
     puts $res
-    if {[lindex [split $res " "] 1] != "macports.org:nosubdir"} {
+    if {[lindex [split $res " "] 1] ne "macports.org:nosubdir"} {
        return "FAIL: name not set"
     }
-    if {[lindex [split $res " "] 3] != "tgz"} {
+    if {[lindex [split $res " "] 3] ne "tgz"} {
        return "FAIL: wrong type set"
     }
 
     set macports::archive_sites_conf_values {a b c}
-    if {[macports::get_archive_sites_conf_values] != {a b c}} {
+    if {[macports::get_archive_sites_conf_values] ne {a b c}} {
        return "FAIL: wrong  result for bad conf file"
     }
     return "Get archive sites conf values successful."

Modified: trunk/base/src/macports1.0/tests/macports_dlist.test
===================================================================
--- trunk/base/src/macports1.0/tests/macports_dlist.test	2014-09-22 23:02:06 UTC (rev 125618)
+++ trunk/base/src/macports1.0/tests/macports_dlist.test	2014-09-22 23:28:41 UTC (rev 125619)
@@ -26,10 +26,10 @@
     set crit2 { provides fondu2 }
 
 } -body {
-    if {[dlist_match_multi $mport $crit] != $mport} {
+    if {[dlist_match_multi $mport $crit] ne $mport} {
        return "FAIL: correct dlist not matched"
     }
-    if {[dlist_match_multi $mport $crit2] != ""} {
+    if {[dlist_match_multi $mport $crit2] ne ""} {
        return "FAIL: incorrect dlist matched"
     }
     return "dlist match successful."
@@ -43,10 +43,10 @@
 } -setup {
     set mport [mportopen file://.]
 } -body {
-    if {[dlist_search $mport provides gcc_select] != $mport} {
+    if {[dlist_search $mport provides gcc_select] ne $mport} {
        return "FAIL: matching item not found"
     }
-    if {[dlist_search $mport provides fondu2] != ""} {
+    if {[dlist_search $mport provides fondu2] ne ""} {
        return "FAIL: wrong item detected"
     }
     return "dlist successful."
@@ -62,10 +62,10 @@
     set dlist [list]
     lappend dlist $mport
 } -body {
-    if {[dlist_delete dlist $mport] != ""} {
+    if {[dlist_delete dlist $mport] ne ""} {
        return "FAIL: cannot run dlist_delete"
     }
-    if {$dlist != ""} {
+    if {$dlist ne ""} {
        return "FAIL: port not removed from list"
     }
     return "Dlist delete successful."
@@ -126,7 +126,7 @@
     set mport [mportopen file://.]
     set result {fondu2}
 } -body {
-    if {[dlist_append_dependents $mport provides $result] != {fondu2 provides}} {
+    if {[dlist_append_dependents $mport provides $result] ne {fondu2 provides}} {
        return "FAIL: wrong depends"
     }
     return "Append depends successful."
@@ -141,7 +141,7 @@
     set mport [mportopen file://.]
     set dict {gcc_select}
 } -body {
-    if {[dlist_get_next $mport $dict] != $mport} {
+    if {[dlist_get_next $mport $dict] ne $mport} {
        return "FAIL: wrong dlist"
     }
     return "dlist get next successful."
@@ -163,7 +163,7 @@
     }
     proc handler {arg} {}
 } -body {
-    if {[dlist_eval $mport cond handler] != ""} {
+    if {[dlist_eval $mport cond handler] ne ""} {
        return "FAIL: wrong value returned"
     }
     return "dlist eval successful."
@@ -204,7 +204,7 @@
     set res [macports_dlist::ditem_create]
     macports_dlist::ditem_key $res macports test
 } -body {
-    if {[array get macports_dlist::$res macports] != "macports test"} {
+    if {[array get macports_dlist::$res macports] ne "macports test"} {
 	return "FAIL ditem key not set"
     }
     return "Ditem key successful."
@@ -220,7 +220,7 @@
     macports_dlist::ditem_key $res macports test
     macports_dlist::ditem_append $res macports test2
 } -body {
-    if {[array get macports_dlist::$res macports] != "macports {test test2}"} {
+    if {[array get macports_dlist::$res macports] ne "macports {test test2}"} {
 	return "FAIL: ditem key not appended"
     }
     return "Ditem key append successful."
@@ -236,7 +236,7 @@
     macports_dlist::ditem_key $res macports test
     macports_dlist::ditem_append_unique $res macports test
 } -body {
-    if {[array get macports_dlist::$res macports] != "macports test"} {
+    if {[array get macports_dlist::$res macports] ne "macports test"} {
 	return "FAIL: ditem key not unique"
     }
     return "Ditem append unique successful."

Modified: trunk/base/src/macports1.0/tests/macports_util.test
===================================================================
--- trunk/base/src/macports1.0/tests/macports_util.test	2014-09-22 23:02:06 UTC (rev 125618)
+++ trunk/base/src/macports1.0/tests/macports_util.test	2014-09-22 23:28:41 UTC (rev 125619)
@@ -23,7 +23,7 @@
     if {[test_proc 1] != 7} {
        return "FAIL: no wrap around method"
     }
-    if {[test_proc arg] != "arg"} {
+    if {[test_proc arg] ne "arg"} {
        return "FAIL: no wrap around method"
     }
     return "Method wrap successful."
@@ -46,7 +46,7 @@
     if {[ldindex list] != {0 2 3}} {
        return "FAIL: not all elements poped"
     }
-    if {$list != ""} {
+    if {$list ne ""} {
        return "FAIL: list not emptied"
     }
     return "ldindex successful."
@@ -96,7 +96,7 @@
     if {$list != {1 2}} {
        return "FAIL: wrong list remaining"
     }
-    if {[lshift list1] != ""} {
+    if {[lshift list1] ne ""} {
        return "FAIL: empty list not detected"
     }
     return "lshift successful."

Modified: trunk/base/src/macports1.0/tests/test.tcl
===================================================================
--- trunk/base/src/macports1.0/tests/test.tcl	2014-09-22 23:02:06 UTC (rev 125618)
+++ trunk/base/src/macports1.0/tests/test.tcl	2014-09-22 23:28:41 UTC (rev 125619)
@@ -83,7 +83,7 @@
         set result [exec -ignorestderr $tcl $test {*}$arguments]
         set lastline [lindex [split $result "\n"] end]
 
-        if {[lrange [split $lastline "\t"] 1 1] != "Total"} {
+        if {[lrange [split $lastline "\t"] 1 1] ne "Total"} {
             set lastline [lindex [split $result "\n"] end-2]
             set errmsg [lindex [split $result "\n"] end]
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140922/c004eb96/attachment-0001.html>


More information about the macports-changes mailing list