diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a4e4e3ea4c..c6385cd8aa 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-06-17 Yao Qi + + * gdb.base/wchar.exp: Set $cent to \u00A2 if "host-charset" is + CP1252. + 2014-06-17 Luis Machado * gdb.mi/mi-var-rtti.cc (type_update_when_use_rtti_test): diff --git a/gdb/testsuite/gdb.base/wchar.exp b/gdb/testsuite/gdb.base/wchar.exp index 42904789f0..651bd88398 100644 --- a/gdb/testsuite/gdb.base/wchar.exp +++ b/gdb/testsuite/gdb.base/wchar.exp @@ -37,6 +37,20 @@ gdb_test "print simple\[2\]" "= 99 L'c'" gdb_test "print difficile\[2\]" "= 65261 L'\\\\xfeed'" set cent "\\\\242" + +set test "show host-charset" +gdb_test_multiple $test $test { + -re "CP1252\".*\r\n$gdb_prompt $" { + # With Windows code page 1252 (Latin 1), the cent + # is printable. + set cent "\u00A2" + pass $test + } + -re "$gdb_prompt $" { + pass $test + } +} + gdb_test "print repeat" "= L\"A\", '$cent' , \"B.*" global hex