[3/4] GDB/MI: add test for command -inferior-tty-show

Message ID 1444045617-14526-4-git-send-email-crosa@redhat.com
State New, archived
Headers

Commit Message

Cleber Rosa Oct. 5, 2015, 11:46 a.m. UTC
  Simple test that gives arguments to a command that should take none.

gdb/testsuite/ChangeLog:
    2015-10-05  Cleber Rosa  <crosa@redhat.com>

    * gdb.mi/mi-basics.exp: Added test for inferior-tty-show with
    arguments when it should take none.
---
 gdb/testsuite/gdb.mi/mi-basics.exp | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Pedro Alves Oct. 21, 2015, 10:39 a.m. UTC | #1
On 10/05/2015 12:46 PM, Cleber Rosa wrote:
> Simple test that gives arguments to a command that should take none.
> 
> gdb/testsuite/ChangeLog:
>     2015-10-05  Cleber Rosa  <crosa@redhat.com>
> 
>     * gdb.mi/mi-basics.exp: Added test for inferior-tty-show with
>     arguments when it should take none.

This is OK.  I see the same test on patch #4 though?

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp
index 0cc24ac..476dbdc 100644
--- a/gdb/testsuite/gdb.mi/mi-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi-basics.exp
@@ -258,6 +258,10 @@  proc test_setshow_inferior_tty {} {
     mi_gdb_test "307-inferior-tty-show" \
 		"307\\\^done,inferior_tty_terminal=\"$mi_inferior_tty_name\"" \
 		"verify tty is correct"
+
+    mi_gdb_test "308-inferior-tty-show should-take-no-args" \
+		"308\\\^error,msg=\"-inferior-tty-show: Usage: No args\"" \
+		"make sure show takes no arguments"
 }
 
 if { [test_mi_interpreter_selection]