This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/testsuite] mi-language.exp: Check "langauge-option" in -list-features output.


Hello,

Re: Add "language-option" to -list-features
    http://www.sourceware.org/ml/gdb-patches/2013-11/msg00458.html

I don't know what I hadn't thought of this before... Basically, I added
a new entry in -list-features, but never bothered to test it - mostly
because there wasn't already a test for it (IIRC!), and because the
chances of regression are most likely very small. But it seems logical
to test that entry as part of the testcase that tests the actual feature
being advertised. Done thusly:

gdb/testsuite/ChangeLog:

        * mi-language.exp: Add "-list-features" test verifying that
        its output contains "language-option".

Tested on x86_64-linux.  Checked in.

PS: I recently added an entry for "ada-exceptions". But I am hoping
    to be able actually remove it, after having added the new mechanisms
    allowing a FE to check for new commands.
    Ref: http://www.sourceware.org/ml/gdb-patches/2013-11/msg00311.html

---
 gdb/testsuite/ChangeLog              | 5 +++++
 gdb/testsuite/gdb.mi/mi-language.exp | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3aa68e3..bcaf8bb 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-18  Joel Brobecker  <brobecker@adacore.com>
+
+	* mi-language.exp: Add "-list-features" test verifying that
+	its output contains "language-option".
+
 2013-11-16  Joel Brobecker  <brobecker@adacore.com>
 
 	* info_exc/const.ads (Aint_Global_GDB_E): Renames Aint_Global_E.
diff --git a/gdb/testsuite/gdb.mi/mi-language.exp b/gdb/testsuite/gdb.mi/mi-language.exp
index 550beec..0b77b01 100644
--- a/gdb/testsuite/gdb.mi/mi-language.exp
+++ b/gdb/testsuite/gdb.mi/mi-language.exp
@@ -21,6 +21,12 @@ if [mi_gdb_start] {
     continue
 }
 
+# First, verify that the debugger correctly advertises support
+# for the --language option.
+mi_gdb_test "-list-features" \
+            "\\^done,features=\\\[.*\"language-option\".*\\\]" \
+            "-list-features should include \"language-option\""
+
 mi_gdb_test "set lang ada" \
             ".*=cmd-param-changed,param=\"language\",value=\"ada\".*" \
             "set lang ada"
-- 
1.8.1.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]