[v3,1/4] Add testcases to default.exp

Message ID 1447142188-20759-2-git-send-email-feij.fnst@cn.fujitsu.com
State New, archived
Headers

Commit Message

Fei Jie Nov. 10, 2015, 7:56 a.m. UTC
  add testcases about info:
    *info extensions
    *info handle
    *info scope
    *info win
    add testcases about set width:
    *set width -1

gdb/testsuite/ChangeLog:

    * gdb.base/default.exp: Add new testcases.
---
 gdb/testsuite/gdb.base/default.exp | 10 ++++++++++
 1 file changed, 10 insertions(+)
  

Comments

Joel Brobecker Dec. 6, 2015, 1:51 p.m. UTC | #1
>     add testcases about info:
>     *info extensions
>     *info handle
>     *info scope
>     *info win
>     add testcases about set width:
>     *set width -1

Just a couple of minor nits:

  1. "testcases" -> "tests"; the .exp file (Eg. default.exp) is
     a testcase, while a call to gdb_test executed a test. The testcase
     is a collection of tests usually logically related.

  2. We follow the GNU Coding Standards.
     https://sourceware.org/gdb/wiki/Internals%20Coding-Standards

     Above, sentences should start with a capital letter and end
     with a period (or a colon, as is more appropriate in your case).
     Therefore, start at the start of the line (no identation), and
     write "Add" instead of "add".

> gdb/testsuite/ChangeLog:
> 
>     * gdb.base/default.exp: Add new testcases.

Same as above, "testcases" -> "tests".

>  gdb/testsuite/gdb.base/default.exp | 10 ++++++++++
>  1 file changed, 10 insertions(+)

The changes themselves look good to me.

IIRC, I sent you the form to get started on copyright assignement,
so we'll need those to get through before we can accept your
contribution.

Thank you,
  

Patch

diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 4395c98..279dbb9 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -280,6 +280,8 @@  gdb_test "info copying"
 #
 #test info display
 gdb_test "info display" "There are no auto-display expressions now." "info display"
+#test info extensions
+gdb_test "info extensions" "Filename extensions and the languages they represent.*" "info extensions"
 #test info frame "f" abbreviation
 gdb_test "info f" "No stack.*|No selected frame.*" "info frame \"f\" abbreviation"
 #test info frame
@@ -290,6 +292,8 @@  gdb_test_no_output "info files" "info files"
 gdb_test "info float" "The program has no registers now." "info float"
 #test info functions
 gdb_test "info functions" "All defined functions:" "info functions"
+#test info handle
+gdb_test "info handle" "Signal\\s+Stop\\s+Print\\s+Pass to program\\s+Description.*" "info handle"
 #test info locals
 gdb_test "info locals" "No frame selected." "info locals"
 #test info program
@@ -298,6 +302,8 @@  gdb_test "info program" "The program being debugged is not being run." "info pro
 gdb_test "info registers" "The program has no registers now." "info registers"
 #test info stack "s" abbreviation
 gdb_test "info s" "No stack." "info stack \"s\" abbreviation"
+#test info scope
+gdb_test "info scope" "requires an argument \\(function, line or \\*addr\\) to define a scope" "info scope"
 #test info stack
 gdb_test "info stack" "No stack." "info stack"
 #test info set
@@ -353,6 +359,8 @@  gdb_test "info vector" "The program has no registers now." "info vector"
 gdb_test "info warranty" "15. *Disclaimer of Warranty.*" "info warranty"
 #test info watchpoints
 gdb_test "info watchpoints" "No watchpoints." "info watchpoints"
+#test info win
+gdb_test_no_output "info win" "info win"
 #test inspect
 gdb_test "inspect" "The history is empty." "inspect"
 #test jump
@@ -549,6 +557,8 @@  gdb_test "set variable" "Argument required .expression to compute.*" "set variab
 gdb_test_no_output "set verbose" "set verbose"
 #test set width
 gdb_test "set width" "Argument required .integer to set it to.*" "set width"
+#test set width -1
+gdb_test "set width -1" "integer -1 out of range"
 #test set write
 # This is only supported on targets which use exec.o.
 gdb_test_no_output "set write" "set write"