Add skip_ada_tests to more Ada testcases
[binutils-gdb.git] / gdb / testsuite / gdb.ada / complete.exp
index 35bfb98b2c42dce6b0e2913114fad7916528fa9b..7fbbb8530f6916ff7370cece34d5d46c5fb45d52 100644 (file)
@@ -15,6 +15,8 @@
 
 load_lib "ada.exp"
 
+if { [skip_ada_tests] } { return -1 }
+
 standard_ada_testfile foo
 
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
@@ -31,9 +33,13 @@ set eol "\[\r\n\]*"
 # A convenience function that verifies that the "complete EXPR" command
 # returns the EXPECTED_OUTPUT.
 
-proc test_gdb_complete { expr expected_output } {
+proc test_gdb_complete { expr expected_output {msg ""} } {
+    set cmd "complete p $expr"
+    if {$msg == ""} {
+       set msg $cmd
+    }
     gdb_test "complete p $expr" \
-             "$expected_output"
+             "$expected_output" $msg
 }
 
 # A convenience function that verifies that the "complete EXPR" command
@@ -60,7 +66,8 @@ test_gdb_no_completion "inner.insi"
 
 # An incomplete nested package name, were lies a single symbol:
 test_gdb_complete "pck.inne" \
-                  "p pck.inner.inside_variable"
+                  "p pck.inner.inside_variable" \
+                  "complete nested package name"
 
 # A fully qualified symbol name, mangled...
 test_gdb_complete "pck__inner__ins" \
@@ -118,7 +125,8 @@ test_gdb_complete "pck.my" \
 
 # A fully qualified package name
 test_gdb_complete "pck.inne" \
-                  "p pck.inner.inside_variable"
+    "p pck.inner.inside_variable" \
+    "complete fully qualified package name"
 
 # A fully qualified package name, with a dot at the end
 test_gdb_complete "pck.inner." \