diff --git a/gdb/testsuite/gdb.base/wchar.exp b/gdb/testsuite/gdb.base/wchar.exp index 1a5a2d4..171385b 100644 --- a/gdb/testsuite/gdb.base/wchar.exp +++ b/gdb/testsuite/gdb.base/wchar.exp @@ -24,6 +24,19 @@ if ![runto "wchar.c:$bp_location" ] then { return -1 } +# This test requires wide character support in GDB. +# Setting the charset may fail if GDB was configured without +# ICONV support. +gdb_test_multiple "set target-wide-charset UTF-32" "" { + -re "Undefined item.*$gdb_prompt " { + unsupported "Unknown charset UTF-32" + return -1 + } + -re ".*$gdb_prompt " { + pass "set target-wide-charset UTF-32" + } +} + gdb_test "print narrow" "= 97 L'a'" gdb_test "print single" "= 48879 L'\\\\xbeef'"