aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/args.exp8
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5229ff2..9ad4f2d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2008-10-30 Andreas Schwab <schwab@suse.de>
+
+ * gdb.base/args.exp: Add tests for newlines.
+
2008-10-30 Joel Brobecker <brobecker@adacore.com>
gdb.base/foll-exec.exp: Update the expected output of a couple
diff --git a/gdb/testsuite/gdb.base/args.exp b/gdb/testsuite/gdb.base/args.exp
index 544fca7..372bfe1 100644
--- a/gdb/testsuite/gdb.base/args.exp
+++ b/gdb/testsuite/gdb.base/args.exp
@@ -96,4 +96,12 @@ args_test "one empty (with single quotes)" {{1} {''} {3}}
set GDBFLAGS "-nx --args $binfile 1 '' '' 3"
args_test "two empty (with single quotes)" {{1} {''} {''} {3}}
+# try with arguments containing literal newlines.
+
+set GDBFLAGS "-nx --args $binfile 1 {\n} 3"
+args_test "one newline" {{1} {\\n} {3}}
+
+set GDBFLAGS "-nx --args $binfile 1 {\n} {\n} 3"
+args_test "two newlines" {{1} {\\n} {\\n} {3}}
+
set GDBFLAGS $old_gdbflags