Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Denis PILAT <denis.pilat@st.com>
To: gdb-patches <gdb-patches@sourceware.org>
Subject: [RFA] gdb.mi/mi2-basics.exp re-aligned with mi-basics.exp
Date: Wed, 15 Oct 2008 11:22:00 -0000	[thread overview]
Message-ID: <48F5D247.4060500@st.com> (raw)

Is there any reason why we do not test -inferior-tty commands on 
gdb.mi/mi2-basics.exp ?
If no I propose to activate these tests, like in mi-basics.exp.

I'll take this opportunity to fix a typo on my previous commit where I wrote
gdb.mi/mb-ctor.exp in the place of gdb.cp/mb-ctor.exp. (that was to fix 
a typo ;)


-- 
Denis

2008-10-15  Denis Pilat  <denis.pilat@st.com>

	* gdb.mi/mi2-basics.exp: Activate -inferior-tty tests like 
	in mi2-basics.exp.
	(test_setshow_inferior_tty): new function.



Index: gdb.mi/mi2-basics.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-basics.exp,v
retrieving revision 1.12
diff -u -p -r1.12 mi2-basics.exp
--- gdb.mi/mi2-basics.exp       6 Aug 2008 12:52:08 -0000       1.12
+++ gdb.mi/mi2-basics.exp       15 Oct 2008 11:11:49 -0000
@@ -30,7 +30,7 @@ load_lib mi-support.exp
 set MIFLAGS "-i=mi2"

 gdb_exit
-if [mi_gdb_start] {
+if [mi_gdb_start separate-inferior-tty] {
     continue
 }

@@ -174,8 +174,8 @@ proc test_dir_specification {} {
 proc test_cwd_specification {} {
     global mi_gdb_prompt
     global objdir
-    global subdir
     global escapedobjdir
+    global subdir

     # Change the working directory, then print the current working directory
     # Tests:
@@ -238,12 +238,51 @@ proc test_path_specification {} {

 }

+proc test_setshow_inferior_tty {} {
+    global mi_gdb_prompt
+    global mi_inferior_tty_name
+
+    # Test that the commands,
+    #   -inferior-tty-set
+    #   -inferior-tty-show
+    # are setting/getting the same data in GDB.
+
+    mi_gdb_test "301-inferior-tty-show" \
+               "301\\\^done,inferior_tty_terminal=\"$mi_inferior_tty_name\"" \
+               "initial tty is mi_inferior_tty_name"
+
+    mi_gdb_test "302-inferior-tty-set /dev/pts/1" \
+               "302\\\^done" \
+               "set tty to /dev/pts/1"
+
+    mi_gdb_test "303-inferior-tty-show" \
+               "303\\\^done,inferior_tty_terminal=\"/dev/pts/1\"" \
+               "tty was set correctly"
+
+    mi_gdb_test "304-inferior-tty-set" \
+               "304\\\^done" \
+               "set tty to the empty string"
+
+    mi_gdb_test "305-inferior-tty-show" \
+               "305\\\^done" \
+               "make sure tty is empty"
+
+    mi_gdb_test "306-inferior-tty-set $mi_inferior_tty_name" \
+               "306\\\^done" \
+               "set tty to mi_inferior_tty_name (the way it was)"
+
+    mi_gdb_test "307-inferior-tty-show" \
+               "307\\\^done,inferior_tty_terminal=\"$mi_inferior_tty_name\"" \
+               "verify tty is correct"
+}
+
 if [test_mi_interpreter_selection] {
   test_exec_and_symbol_mi_operatons
   test_breakpoints_deletion
   test_dir_specification
   test_cwd_specification
   test_path_specification
+  test_setshow_inferior_tty
 }

 mi_gdb_exit



             reply	other threads:[~2008-10-15 11:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15 11:22 Denis PILAT [this message]
2008-10-15 11:57 ` Daniel Jacobowitz
2008-10-15 13:07   ` Denis PILAT

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=48F5D247.4060500@st.com \
    --to=denis.pilat@st.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