aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/args.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/args.exp')
-rw-r--r--gdb/testsuite/gdb.base/args.exp8
1 files changed, 8 insertions, 0 deletions
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