* lib/compat.exp (compat-execute): Do not use regsub unsafely.
From-SVN: r99747
This commit is contained in:
parent
3b523c85c1
commit
5595de0fa4
@ -1,3 +1,7 @@
|
||||
2005-05-15 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* lib/compat.exp (compat-execute): Do not use regsub unsafely.
|
||||
|
||||
2005-05-15 Jerry DeLisle <jvdelisle@verizon.net>
|
||||
|
||||
PR fortran/17432
|
||||
|
@ -279,8 +279,17 @@ proc compat-execute { src1 sid use_alt } {
|
||||
regsub "sid" "sid_y_alt.o" $sid obj3_alt
|
||||
|
||||
# Get the base name of this test, for use in messages.
|
||||
regsub "^$srcdir/?" $src1 "" testcase
|
||||
regsub "^$tmpdir/?" $testcase "tmpdir-" testcase
|
||||
set testcase "$src1"
|
||||
# Remove the $srcdir and $tmpdir prefixes from $src1. (It would
|
||||
# be possible to use "regsub" here, if we were careful to escape
|
||||
# all regular expression characters in $srcdir and $tmpdir, but
|
||||
# that would be more complicated that this approach.)
|
||||
if {[string first "$srcdir/" "$src1"] == 0} {
|
||||
set testcase [string range "$src1" [string length "$srcdir/"] end]
|
||||
}
|
||||
if {[string first "$tmpdir/" "$src1"] == 0} {
|
||||
set testcase [string range "$src1" [string length "$tmpdir/"] end]
|
||||
}
|
||||
regsub "_main.*" $testcase "" testcase
|
||||
# Set up the base name of executable files so they'll be unique.
|
||||
regsub -all "\[./\]" $testcase "-" execbase
|
||||
|
Loading…
Reference in New Issue
Block a user