Revision: 107505 https://trac.macports.org/changeset/107505 Author: marius@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]