[PATCH] test: adjust 'cd' regexpr to match an optional canonically pathname

Sanimir Agovic sanimir.agovic@intel.com
Mon Sep 9 13:30:00 GMT 2013


New regexpr now correctly deals with trailing canonical pathname.

Before only the following output was matched:
(gdb) cd
Working directory /users/foo

In addition it now matches an optional trailing canonical patchname:
(gdb) cd
Working directory /users/foo
 (canonically /nfs/users/foo).

Triggered by `realpath .` != `pwd`

2013-09-09  Sanimir Agovic  <sanimir.agovic@intel.com>

testsuite/
	* gdb.base/default.exp: Adjust regexpr to match optional
	canonical pathname.

---
 gdb/testsuite/gdb.base/default.exp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index e5194f7..a5f0a95 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -83,7 +83,7 @@ gdb_test "call" "The history is empty..*" "call"
 gdb_test "catch" "Catch requires an event name..*" "catch"
 
 #test cd
-gdb_test "cd" "Working directory \[^\r\n\]*\\."
+gdb_test "cd" "Working directory \[^\r\n\]*\(\r\n \\(canonically \[^\r\n\]*\\)\)?\\."
 
 #test clear
 gdb_test "clear" "No source file specified..*" "clear"
-- 
1.7.1.1



More information about the Gdb-patches mailing list