aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.c++/templates.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.c++/templates.exp')
-rw-r--r--gdb/testsuite/gdb.c++/templates.exp20
1 files changed, 17 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.c++/templates.exp b/gdb/testsuite/gdb.c++/templates.exp
index 54990ec..a7763a2 100644
--- a/gdb/testsuite/gdb.c++/templates.exp
+++ b/gdb/testsuite/gdb.c++/templates.exp
@@ -296,11 +296,25 @@ gdb_expect {
# print a function from Foo<volatile char *>
+# This test is sensitive to whitespace matching, so we'll do it twice,
+# varying the spacing, because of PR gdb/33.
+
send_gdb "print Foo<volatile char *>::foo\n"
gdb_expect {
- -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char \\*> \\*, int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }
- -re "$gdb_prompt $" { fail "print Foo<volatile char *>::foo" }
- timeout { fail "(timeout) print Foo<volatile char *>::foo" }
+ -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*, int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }
+ -re "No symbol \"Foo<volatile char \\*>\" in current context.\r\n$gdb_prompt $"
+ { kfail "gdb/33" "print Foo<volatile char *>::foo" }
+ -re "$gdb_prompt $" { fail "print Foo<volatile char *>::foo" }
+ timeout { fail "(timeout) print Foo<volatile char *>::foo" }
+}
+
+send_gdb "print Foo<volatile char*>::foo\n"
+gdb_expect {
+ -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*, int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char*>::foo" }
+ -re "No symbol \"Foo<volatile char\\*>\" in current context.\r\n$gdb_prompt $"
+ { kfail "gdb/33" "print Foo<volatile char*>::foo" }
+ -re "$gdb_prompt $" { fail "print Foo<volatile char*>::foo" }
+ timeout { fail "(timeout) print Foo<volatile char*>::foo" }
}
# Template Bar<T, int>