This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Make gdb.base/call-strs.exp use gdb_test_stdio
- From: Pedro Alves <palves at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 29 Jul 2015 11:31:33 -0000
- Subject: [binutils-gdb] Make gdb.base/call-strs.exp use gdb_test_stdio
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=452397af30f68f6d4ed05fa6d9fc30ca70cbe7f9
commit 452397af30f68f6d4ed05fa6d9fc30ca70cbe7f9
Author: Pedro Alves <palves@redhat.com>
Date: Wed Jul 29 11:09:38 2015 +0100
Make gdb.base/call-strs.exp use gdb_test_stdio
gdb/testsuite/ChangeLog:
2015-07-29 Pedro Alves <palves@redhat.com>
* gdb.base/call-strs.exp: Use gdb_test_stdio instead of gdb_test.
Diff:
---
gdb/testsuite/ChangeLog | 4 +++
gdb/testsuite/gdb.base/call-strs.exp | 50 +++++++++++++++++++++---------------
2 files changed, 34 insertions(+), 20 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index f735fb5..417b4f8 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2015-07-29 Pedro Alves <palves@redhat.com>
+ * gdb.base/call-strs.exp: Use gdb_test_stdio instead of gdb_test.
+
+2015-07-29 Pedro Alves <palves@redhat.com>
+
* gdb.base/sizeof.exp (check_sizeof, check_valueof): Use
gdb_test_stdio.
diff --git a/gdb/testsuite/gdb.base/call-strs.exp b/gdb/testsuite/gdb.base/call-strs.exp
index 5aab943..e11296f 100644
--- a/gdb/testsuite/gdb.base/call-strs.exp
+++ b/gdb/testsuite/gdb.base/call-strs.exp
@@ -77,62 +77,72 @@ gdb_test "print s" \
#print str_func1(s)
if ![gdb_skip_stdio_test "print str_func1(s)"] {
- gdb_test "print str_func1(s)" \
- "first string arg is: test string.*\"test string\".*"
+ gdb_test_stdio "print str_func1(s)" \
+ "first string arg is: test string" \
+ "\"test string\".*"
}
#print str_func1("test string")
if ![gdb_skip_stdio_test "print str_func1(teststring)"] {
- gdb_test "print str_func1(\"test string\")" \
- "first string arg is: test string.*\"test string\".*"
+ gdb_test_stdio "print str_func1(\"test string\")" \
+ "first string arg is: test string" \
+ "\"test string\".*"
}
#call str_func1(s)
if ![gdb_skip_stdio_test "call str_func1(s)"] {
- gdb_test "call str_func1(s)" \
- "first string arg is: test string.*\"test string\".*"
+ gdb_test_stdio "call str_func1(s)" \
+ "first string arg is: test string" \
+ "\"test string\".*"
}
#call str_func1("test string")
if ![gdb_skip_stdio_test "call str_func1 (...)"] {
- gdb_test "call str_func1(\"test string\")" \
- "first string arg is: test string.*\"test string\".*"
+ gdb_test_stdio "call str_func1(\"test string\")" \
+ "first string arg is: test string" \
+ "\"test string\".*"
}
#print str_func1(buf)
if ![gdb_skip_stdio_test "print str_func1(buf)"] {
- gdb_test "print str_func1(buf)" \
- "first string arg is: test string.*\"test string\".*"
+ gdb_test_stdio "print str_func1(buf)" \
+ "first string arg is: test string" \
+ "\"test string\".*"
}
#call str_func1(buf)
if ![gdb_skip_stdio_test "call str_func1(buf)"] {
- gdb_test "call str_func1(buf)" \
- "first string arg is: test string.*\"test string\".*"
+ gdb_test_stdio "call str_func1(buf)" \
+ "first string arg is: test string" \
+ "\"test string\".*"
}
#print str_func("a","b","c","d","e","f","g")
if ![gdb_skip_stdio_test "print str_func(a,b,c,d,e,f,g)"] {
- gdb_test "print str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \
- "first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+.*= \"abcdefg\".*"
+ gdb_test_stdio "print str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \
+ "first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+" \
+ "= \"abcdefg\".*"
}
#call str_func("a","b","c","d","e","f","g")
if ![gdb_skip_stdio_test "call str_func(a,b,c,d,e,f,g)"] {
- gdb_test "call str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \
- "first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+.*= \"abcdefg\".*"
+ gdb_test_stdio "call str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" \
+ "first string arg is: a\[ \t\r\n\]+second string arg is: b\[ \t\r\n\]+third string arg is: c\[ \t\r\n\]+fourth string arg is: d\[ \t\r\n\]+fifth string arg is: e\[ \t\r\n\]+sixth string arg is: f\[ \t\r\n\]+seventh string arg is: g\[ \t\r\n\]+" \
+ "= \"abcdefg\".*"
}
#print str_func(s,s,s,s,s,s,s)
if ![gdb_skip_stdio_test "print str_func(s,s,s,s,s,s,s,s)"] {
- gdb_test "print str_func(s,s,s,s,s,s,s)" \
- "first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+.*\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*"
+ gdb_test_stdio "print str_func(s,s,s,s,s,s,s)" \
+ "first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+" \
+ "\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*"
}
#call str_func(s,s,s,s,s,s,s)
if ![gdb_skip_stdio_test "call str_func(s,s,s,s,s,s,s,s)"] {
- gdb_test "call str_func(s,s,s,s,s,s,s)" \
- "first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+.*\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*"
+ gdb_test_stdio "call str_func(s,s,s,s,s,s,s)" \
+ "first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+" \
+ "\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*"
}
gdb_exit