1 #
-*- coding
: utf
-8 -*- */
3 # This testcase is part of GDB
, the GNU debugger.
5 # Copyright
2017-2019 Free Software Foundation
, Inc.
7 # This
program is free software
; you can redistribute it and
/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation
; either version
3 of the License
, or
10 #
(at your option
) any later version.
12 # This
program is distributed in the hope that it will be useful
,
13 # but WITHOUT
ANY WARRANTY
; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License
for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this
program.
If not
, see
<http
://www.gnu.org
/licenses
/>.
20 # Test GDB
's support for UTF-8 C/C++ identifiers.
22 load_lib completion-support.exp
26 # Enable basic use of UTF-8. LC_ALL gets reset for each testfile.
29 if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile]] } {
34 fail "couldn't run to done
"
39 gdb_test
"print g_s.num_€" " = 1000"
40 gdb_test
"print num_€" " = 2000"
42 # Test linespecs
/breakpoints.
43 gdb_test
"break função2" "Breakpoint $decimal at .*$srcfile.*"
45 set test
"info breakpoints"
46 gdb_test_multiple $test $test
{
47 -re
"in função2 at .*$srcfile.*$gdb_prompt $" {
53 "Breakpoint $decimal, função2 \\(\\) at .*$srcfile.*"
55 # Unload symbols from shared libraries to avoid
random symbol and file
56 # names getting in the way of completion.
57 gdb_test_no_output
"nosharedlibrary"
59 # Tests below are about tab
-completion
, which doesn
't work if readline
60 # library isn't used. Check it first.
62 if { ![readline_is_used
] } {
63 untested
"no tab completion support without readline"
67 # Test linespec completion.
69 # A unique completion.
70 test_gdb_complete_unique
"break my_fun" "break my_função"
72 # A multiple
-matches completion
:
74 # kfailed because gdb
/readline display the completion match list like
75 # this
, with no separating space
:
77 #
(gdb
) break função
[TAB
]
81 setup_kfail
"gdb/23211" "*-*-*"
82 test_gdb_complete_multiple
"break " "fun" "ção" {"função1" "função2"}
84 # Test expression completion.
85 test_gdb_complete_unique
"print g_s.num" "print g_s.num_€"