libjava.exp (test_libjava_from_javac): Use regsub not string map.
authorMark Wielaard <mark@klomp.org>
Sat, 15 Feb 2003 16:39:28 +0000 (16:39 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Sat, 15 Feb 2003 16:39:28 +0000 (16:39 +0000)
       * lib/libjava.exp (test_libjava_from_javac): Use regsub not string map.
       * libjava.mauve/mauve.exp (mauve_compute_uses): Likewise.
       (test_mauve): Likewise.

From-SVN: r62937

libjava/testsuite/ChangeLog
libjava/testsuite/lib/libjava.exp
libjava/testsuite/libjava.mauve/mauve.exp

index 9a2e9b38b5a1519cc25e805783078da9f97adab3..1fc2cff44cf1493c26916860f98aa960eb3e0ed4 100644 (file)
@@ -1,3 +1,9 @@
+2003-02-15  Mark Wielaard  <mark@klomp.org>
+
+       * lib/libjava.exp (test_libjava_from_javac): Use regsub not string map.
+       * libjava.mauve/mauve.exp (mauve_compute_uses): Likewise.
+       (test_mauve): Likewise.
+
 2003-02-14  Mark Wielaard  <mark@klomp.org>
 
        * lib/libjava.exp (test_libjava_from_javac): Don't create .o files
index d9aa178d654b94ca501e687fca5a448824d0cd5c..6be5ec676629d36ba95d3359566469258955a251 100644 (file)
@@ -788,7 +788,7 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
        foreach c_file $class_files {
            set executable [file rootname [file tail $c_file]].o
            # Don't write files which contain $ chars.
-           set executable [string map {$ ^} $executable]
+           regsub -all "\\$" $executable "\^" executable
            set x [libjava_prune_warnings \
                     [libjava_tcompile '$c_file' "$executable" $type $args]]
            lappend removeList $executable
index 5eefd5d3e4ea410c05c69b0306d2dfe6b7f56490..cdc7e21f2dd0f0e8056835ba5bb331f85b278100 100644 (file)
@@ -49,7 +49,8 @@ proc mauve_compute_uses {aName} {
       # Now add all inner classes
       foreach inner [glob -nocomplain [file rootname $file]$*.class] {
        # Prevent excessive escaping by replacing $ with a ^ in the .o name
-       set inner [string map {$ ^} [file rootname $inner]].o
+       set inner [file rootname $inner].o
+       regsub -all "\\$" $inner "\^" inner
        lappend uses($item) $inner
       }
     }
@@ -186,7 +187,8 @@ proc test_mauve {} {
       if {! [file exists $obj]} then {
        verbose "compiling $obj for test of $class"
        # The .class file does contain a $, but we can quote it between "'"s.
-       set srcfile [string map {^ $} [file rootname $obj]].class
+       set srcfile [file rootname $obj].class
+       regsub -all "\\^" $srcfile "\$" srcfile
        set x [libjava_prune_warnings \
                 [libjava_tcompile '[pwd]/$srcfile' $obj object $compile_args]]
        if {$x != ""} then {