public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 01/10] Test issuing a command split in multiple lines with continuation chars
Date: Thu, 18 Feb 2016 17:40:00 -0000	[thread overview]
Message-ID: <1455817236-13642-2-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1455817236-13642-1-git-send-email-palves@redhat.com>

I happened to break this locally and the testsuite didn't notice it.
Add some tests.

gdb/ChangeLog:
2016-02-18  Pedro Alves  <palves@redhat.com>

	* gdb.base/command-line-input.exp: New file.
---
 gdb/testsuite/gdb.base/command-line-input.exp | 36 +++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 gdb/testsuite/gdb.base/command-line-input.exp

diff --git a/gdb/testsuite/gdb.base/command-line-input.exp b/gdb/testsuite/gdb.base/command-line-input.exp
new file mode 100644
index 0000000..0a9d44b
--- /dev/null
+++ b/gdb/testsuite/gdb.base/command-line-input.exp
@@ -0,0 +1,36 @@
+# Copyright (C) 2014-2016 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Command line input testing.
+
+# Test issuing a command split in multiple lines with continuation
+# characters.
+
+gdb_exit
+gdb_start
+
+set test "print 1\\\\n + 2"
+gdb_test_multiple "print 1\\\n + 2" $test {
+    -re "^print 1\\\\\r\n \\+ 2\r\n\\\$$decimal = 3\r\n$gdb_prompt $" {
+	pass $test
+    }
+}
+
+set test "print 1\\\\n2"
+gdb_test_multiple "print 1\\\n2" $test {
+    -re "^print 1\\\\\r\n2\r\n\\\$$decimal = 12\r\n$gdb_prompt $" {
+	pass $test
+    }
+}
-- 
1.9.3

  parent reply	other threads:[~2016-02-18 17:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 17:40 [PATCH 00/10] Command line input handling TLC Pedro Alves
2016-02-18 17:40 ` [PATCH 08/10] Use struct buffer in gdb_readline_callback_no_editing Pedro Alves
2016-02-18 22:18   ` Sergio Durigan Junior
2016-02-18 17:40 ` [PATCH 06/10] gdb_readline -> gdb_readline_no_editing Pedro Alves
2016-02-18 22:00   ` Sergio Durigan Junior
2016-02-18 17:40 ` [PATCH 09/10] Simplify saved_command_line handling Pedro Alves
2016-02-18 17:40 ` [PATCH 03/10] gdb_readline2 -> gdb_readline_callback_no_editing Pedro Alves
2016-02-18 21:59   ` Sergio Durigan Junior
2016-03-09 18:39     ` Pedro Alves
2016-02-18 17:40 ` [PATCH 07/10] Use struct buffer in gdb_readline_no_editing Pedro Alves
2016-02-18 22:16   ` Sergio Durigan Junior
2016-03-09 18:40     ` Pedro Alves
2016-02-19 15:25   ` Simon Marchi
2016-02-22 14:06   ` Yao Qi
2016-02-18 17:40 ` Pedro Alves [this message]
2016-02-18 21:53   ` [PATCH 01/10] Test issuing a command split in multiple lines with continuation chars Sergio Durigan Junior
2016-02-24 12:40   ` Luis Machado
2016-03-09 18:38     ` Pedro Alves
2016-02-18 17:40 ` [PATCH 02/10] Garbage collect window_hook Pedro Alves
2016-02-18 21:55   ` Sergio Durigan Junior
2016-02-18 17:46 ` [PATCH 05/10] Update prompt_for_continue comments Pedro Alves
2016-02-22 14:02   ` Yao Qi
2016-03-09 18:39     ` Pedro Alves
2016-02-18 17:49 ` [PATCH 04/10] Eliminate async_annotation_suffix Pedro Alves
2016-02-18 17:49 ` [PATCH 10/10] Command line input handling TLC Pedro Alves
2016-02-19 16:01   ` Simon Marchi
2016-03-09 18:41     ` Pedro Alves
2016-02-24 12:41   ` Luis Machado
2016-02-18 22:57 ` [PATCH 00/10] " Sergio Durigan Junior
2016-02-19 16:04   ` Simon Marchi
2016-02-23  8:51 ` Yao Qi
2016-03-09 18:43 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455817236-13642-2-git-send-email-palves@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).