From a24950c4be7972da53f1eefbe5e942e83b00a3f6 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Sun, 9 Dec 2018 16:42:08 +1100 Subject: [PATCH] * testsuite/lib/libsup.exp: Remove unnecessary quotes around variable expansions. * testsuite/lib/util-defs.exp: Likewise. --- ChangeLog | 6 ++++++ testsuite/lib/libsup.exp | 12 ++++++------ testsuite/lib/util-defs.exp | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1216339..bcaa088 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-12-09 Ben Elliston + + * testsuite/lib/libsup.exp: Remove unnecessary quotes around + variable expansions. + * testsuite/lib/util-defs.exp: Likewise. + 2018-12-09 Ben Elliston * baseboards/androideabi.exp: Remove unnecessary quotes and braces diff --git a/testsuite/lib/libsup.exp b/testsuite/lib/libsup.exp index 5691bfd..88ecbcb 100644 --- a/testsuite/lib/libsup.exp +++ b/testsuite/lib/libsup.exp @@ -87,7 +87,7 @@ proc start_expect { } { # catch wait # Start expect runing - spawn "$EXPECT" + spawn $EXPECT expect { -re "expect.*> " { verbose "Started the child expect shell" 2 @@ -169,11 +169,11 @@ proc exp_test { cmd pattern msg } { warning "$msg, 0 was returned" exp_continue } - "$pattern" { - pass "$msg" + $pattern { + pass $msg } timeout { - fail "$msg" + fail $msg } } } @@ -200,10 +200,10 @@ proc config_test { cmd true false msg } { exp_continue } -re "\r\n1\r\n" { - $true "$msg" + $true $msg } -re "\r\n0\r\n" { - $false "$msg" + $false $msg } timeout { perror "$msg (timed out)" diff --git a/testsuite/lib/util-defs.exp b/testsuite/lib/util-defs.exp index fd89648..d03c1fd 100644 --- a/testsuite/lib/util-defs.exp +++ b/testsuite/lib/util-defs.exp @@ -61,7 +61,7 @@ proc util_test { args } { verbose "Output is \"$comp_output\"" 2 verbose "Pattern is \"$pattern\"" 2 - if [regexp "$pattern" $comp_output] { + if [regexp $pattern $comp_output] { verbose "Pattern matches." 2 return 0 }