gdb/testsuite: Make test names unique in gdb.linespec tests
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.linespec / ls-errs.exp
index ee8bb087f071f80a1ce9f0a7523e63581a549f3b..0743d89bfafbb5688b303bac5013293d61d90f32 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2012-2017 Free Software Foundation, Inc.
+# Copyright 2012-2019 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -92,7 +92,8 @@ proc do_test {lang} {
 
        gdb_test "break $linespec" [string_to_regexp \
                                    [eval format \$error_messages($msg_id) \
-                                    $args]]
+                                    $args]] \
+           "'break $linespec'"
     }
 
     # Some commonly used whitespace tests around ':'.
@@ -175,7 +176,7 @@ proc do_test {lang} {
     # Test that option lexing stops at whitespace boundaries, except
     # when lexing function names, where we want to handle setting
     # breakpoints on e.g., "int template_function<int>()".
-    test_break "-source this file has spaces.c -line 3" invalid_file "this"
+    test_break "-source this file has spaces.c -line 3" source_incomplete
     test_break "-function ret_type tmpl_function" \
        invalid_function "ret_type tmpl_function"
     test_break "-source $srcfile -function ret_type tmpl_function" \
@@ -231,13 +232,10 @@ proc do_test {lang} {
 
     foreach x $spaces {
        test_break "main${x}there" invalid_label "there" "main"
-       if {[test_compiler_info {clang-*-*}]} {
-           setup_xfail clang/14500 *-*-*
-       }
        test_break "main:here${x}" unexpected "end of input"
     }
 
-    foreach x {"3" "+100" "-100" "foo"} {
+    foreach_with_prefix x {"3" "+100" "-100" "foo"} {
        test_break "main 3" invalid_function "main 3"
        test_break "-function \"main $x\"" invalid_function "main $x"
        if {$x == "foo"} {
@@ -267,6 +265,7 @@ proc do_test {lang} {
 
     # Explicit linespec-specific tests
     test_break "-source $srcfile" source_incomplete
+    test_break "-source $srcfile main" source_incomplete
 }
 
 foreach_with_prefix lang {"C" "C++"} {
This page took 0.024279 seconds and 4 git commands to generate.