[107505] branches/gsoc13-tests/tests/test/library.tcl

marius at macports.org marius at macports.org
Mon Jul 1 11:31:21 PDT 2013


Revision: 107505
          https://trac.macports.org/changeset/107505
Author:   marius at macports.org
Date:     2013-07-01 11:31:21 -0700 (Mon, 01 Jul 2013)
Log Message:
-----------
Use file split to parse path and added debug options.

Modified Paths:
--------------
    branches/gsoc13-tests/tests/test/library.tcl

Modified: branches/gsoc13-tests/tests/test/library.tcl
===================================================================
--- branches/gsoc13-tests/tests/test/library.tcl	2013-07-01 18:05:35 UTC (rev 107504)
+++ branches/gsoc13-tests/tests/test/library.tcl	2013-07-01 18:31:21 UTC (rev 107505)
@@ -1,5 +1,7 @@
 set autoconf [file dirname $argv0]/../../../Mk/macports.autoconf.mk
 
+eval ::tcltest::configure $::argv
+
 # Set of procs used for testing.
 
 # Sets $bindir variable from macports.autoconf.mk
@@ -16,9 +18,7 @@
         exit 1
     }
 
-    set aux [expr [string last "/" $pwd [string length $pwd]]]
-    set aux2 [expr [string last "/" $pwd $aux-1]]
-    set cpwd [string range $pwd 0 $aux2]
+    set cpwd [file join {*}[lrange [file split $pwd] 0 end-2]]/
 
     set line [get_line $autoconf "prefix*"]
     set prefix [lrange [split $line " "] 1 1]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130701/82642428/attachment-0001.html>


More information about the macports-changes mailing list