From: Andrew Burgess Date: Tue, 26 Nov 2013 16:28:33 +0000 (+0000) Subject: Tighten regexp in gdb.base/setshow.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d24a9f159c4b62ea5a64f619bd2090bbc98d8abd;p=binutils-gdb.git Tighten regexp in gdb.base/setshow.exp https://sourceware.org/ml/gdb-patches/2013-11/msg00817.html gdb/testsuite/ChangeLog * gdb.base/setshow.exp: Add $gdb_prompt to the patterns in gdb_test_multiple. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9438f482a53..618d67258e7 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-11-26 Andrew Burgess + + * gdb.base/setshow.exp: Add $gdb_prompt to the patterns in + gdb_test_multiple. + 2013-11-26 Tom Tromey * gdb.dwarf2/dw2-unspecified-ret-addr.S: Remove. diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp index d9e71d37fdf..305356b74ac 100644 --- a/gdb/testsuite/gdb.base/setshow.exp +++ b/gdb/testsuite/gdb.base/setshow.exp @@ -169,7 +169,7 @@ gdb_test "show history expansion on" "History expansion on command input is on.* set HOME "" set test "show environment HOME" gdb_test_multiple $test $test { - -re "\nHOME = (.*).\n.*" { + -re "\nHOME = (\[^\r\n\]*)\[\r\n\]+$gdb_prompt $" { set HOME $expect_out(1,string) pass $test } @@ -185,7 +185,7 @@ gdb_test "show history filename" \ set PWD "" set test "show working directory" gdb_test_multiple "pwd" $test { - -re "\nWorking directory (.*)..\n.*" { + -re "\nWorking directory (\[^\r\n\]*)\\.\[\r\n\]+$gdb_prompt $" { set PWD $expect_out(1,string) pass $test }