diff options
author | Tom de Vries <tdevries@suse.de> | 2023-08-29 17:27:19 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-08-29 17:27:19 +0200 |
commit | ee12f46f45cd2dd6a7638d1bdc6534301a9c55ba (patch) | |
tree | a59eb7b37184950b2b22d4d661ba1c9f85c4ae81 /gdb/testsuite/lib/gdb.exp | |
parent | 90de8f9c808fe5ee01618689c5adea06e41ef8d6 (diff) | |
download | binutils-ee12f46f45cd2dd6a7638d1bdc6534301a9c55ba.zip binutils-ee12f46f45cd2dd6a7638d1bdc6534301a9c55ba.tar.gz binutils-ee12f46f45cd2dd6a7638d1bdc6534301a9c55ba.tar.bz2 |
[gdb/testsuite] Fix false negative in have_host_locale
In test-case gdb.tui/pr30056.exp we check for:
...
require {have_host_locale C.UTF-8}
...
The "C.UTF-8" is normalized by have_host_locale to "c.utf8", before trying to
find it in the list returned by host_locales.
On my development platform, "locale -a" lists C.utf8, which is normalized to
"c.utf8" by host_locales, so there's a match and have_host_locale returns true.
On another platform however, "locale -a" lists C.UTF-8, which is normalized to
"c.utf-8" by host_locales, so there's no match and have_host_locale returns false.
Fix this by also dropping the dash in host_locales.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/lib/gdb.exp')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index bcf536e..1b91794 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -9936,6 +9936,8 @@ gdb_caching_proc host_locales { } { # Normalize items to lower-case. set l [lmap v $l { string tolower $v }] + # Normalize items to without dash. + set l [lmap v $l { string map { "-" "" } $v }] return $l } |