Add tests for new alias default-args related commands and arguments.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / style.exp
index 0457c3dc4ad0a61f0382720cbf07ef49aa34a01b..bfd26144fa4e66d53b3dde96efcdd5aa32e6525e 100644 (file)
@@ -34,11 +34,18 @@ save_vars { env(TERM) } {
        return -1
     }
 
+    set readnow [readnow]
+
     if {![runto_main]} {
        fail "style tests failed"
        return
     }
 
+    # Check that the source highlighter has not stripped away the leading
+    # newlines.
+    set main_line [gdb_get_line_number "break here"]
+    gdb_test "list $main_line,$main_line" "return.*some_called_function.*"
+
     gdb_test_no_output "set style enabled on"
 
     set main_expr [style main function]
@@ -79,14 +86,22 @@ save_vars { env(TERM) } {
     }
 
     if {$test_macros} {
+       set macro_line [gdb_get_line_number "\#define SOME_MACRO"]
        gdb_test "info macro SOME_MACRO" \
-           "Defined at $base_file_expr:16\r\n#define SOME_MACRO 23"
+           "Defined at $base_file_expr:$macro_line\r\n#define SOME_MACRO 23"
     }
 
     set func [style some_called_function function]
     # Somewhere should see the call to the function.
     gdb_test "disassemble main" "[style $hex address].*$func.*"
 
+    set ifield [style int_field variable]
+    set sfield [style string_field variable]
+    set efield [style e_field variable]
+    set evalue [style VALUE_TWO variable]
+    gdb_test "print struct_value" \
+       "\{$ifield = 23,.*$sfield = .*,.*$efield = $evalue.*"
+
     gdb_exit
     gdb_spawn
 
@@ -105,7 +120,7 @@ save_vars { env(TERM) } {
        [multi_line \
             "List of classes of commands:" \
             "" \
-            "${aliases_expr} -- Aliases of other commands\." \
+            "${aliases_expr} -- User-defined aliases of other commands\." \
             "${breakpoints_expr} -- Making program stop at certain points\." \
             ".*" \
            ] \
@@ -117,18 +132,27 @@ save_vars { env(TERM) } {
     gdb_test "apropos -v cut for 'thre" \
        [multi_line \
             "" \
-            "${taas_expr} --.*" \
+            "${taas_expr}" \
+            "Apply a command to all .*" \
             "Usage:.*" \
             "short${cut_for_thre_expr}ad apply.*" \
             "" \
-            "${tfaas_expr} --.*" \
+            "${tfaas_expr}" \
+            "Apply a command to all .*" \
             "Usage:.*" \
             "short${cut_for_thre_expr}ad apply.*" \
            ]
 
     set quoted [string_to_regexp $binfile]
+    set pass_re "Reading symbols from [style $quoted file]\.\.\."
+    if { $readnow } {
+       set pass_re \
+           [multi_line \
+                $pass_re \
+                "Expanding full symbols from [style $quoted file]\.\.\."]
+    }
     gdb_test "file $binfile" \
-       "Reading symbols from [style $quoted file]..." \
+       $pass_re \
        "filename is styled when loading symbol file"
 
     gdb_test "pwd" "Working directory [style .*? file].*"
This page took 0.027155 seconds and 4 git commands to generate.