aboutsummaryrefslogtreecommitdiff
path: root/lib/dg.exp
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2018-12-12 12:57:00 +1100
committerBen Elliston <bje@gnu.org>2018-12-12 12:57:00 +1100
commit874edd44fc41aff555b8cc39d91b6576095135df (patch)
tree9c4f48d766c74c88e275aa234eb24115ae6185d8 /lib/dg.exp
parentb0b842d77c6fc8b9f6c9f19baa93fb20330f5301 (diff)
downloaddejagnu-874edd44fc41aff555b8cc39d91b6576095135df.zip
dejagnu-874edd44fc41aff555b8cc39d91b6576095135df.tar.gz
dejagnu-874edd44fc41aff555b8cc39d91b6576095135df.tar.bz2
* config/gdb-comm.exp, config/gdb_stub.exp, config/vxworks.exp,
lib/dg.exp, lib/ftp.exp, lib/kermit.exp, lib/rlogin.exp, lib/telnet.exp, runtest.exp, testsuite/lib/libsup.exp: Simplify some regular expressions in constant strings by placing them inside braces instead of quotes. This allows one level of backslash quoting to be removed.
Diffstat (limited to 'lib/dg.exp')
-rw-r--r--lib/dg.exp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dg.exp b/lib/dg.exp
index 68c63a3..8ad8fd9 100644
--- a/lib/dg.exp
+++ b/lib/dg.exp
@@ -568,7 +568,7 @@ proc dg-runtest { testcases options default-extra-options } {
#
proc dg-trim-dirname { dir_name file_name } {
set special_character "\[\?\+\-\.\(\)\$\|\]"
- regsub -all -- $special_character $dir_name "\\\\&" dir_name
+ regsub -all -- $special_character $dir_name {\\&} dir_name
regsub "^$dir_name/?" $file_name "" file_name
return $file_name
}
@@ -843,7 +843,7 @@ proc dg-test { args } {
# It would be a bit cumbersome though.
if {${dg-final-code} ne ""} {
- regsub -all "\\\\(\[{}\])" ${dg-final-code} "\\1" dg-final-code
+ regsub -all {\\([{}])} ${dg-final-code} {\1} dg-final-code
# Note that the use of `args' here makes this a varargs proc.
proc dg-final-proc { args } ${dg-final-code}
verbose "Running dg-final tests." 3