aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2011-05-13 18:31:01 +0000
committerDoug Evans <dje@google.com>2011-05-13 18:31:01 +0000
commit05272e115a3b5fa8feebffcaf3c73d41650ec559 (patch)
tree96b967de892b08a70b151d3631bee0932910dbbd /gdb
parent2a6163793f685ef88ce57aa90fd9da291e64e1b7 (diff)
downloadgdb-05272e115a3b5fa8feebffcaf3c73d41650ec559.zip
gdb-05272e115a3b5fa8feebffcaf3c73d41650ec559.tar.gz
gdb-05272e115a3b5fa8feebffcaf3c73d41650ec559.tar.bz2
* gdb.base/charset.exp: If UTF-16 is not available, skip char16_t, String16 tests.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/charset.exp16
2 files changed, 16 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index df921b1..1704199 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-13 Doug Evans <dje@google.com>
+
+ * gdb.base/charset.exp: If UTF-16 is not available, skip char16_t, String16 tests.
+
2011-05-13 Tom Tromey <tromey@redhat.com>
* lib/gdb.exp (is_x86_like_target): New proc.
diff --git a/gdb/testsuite/gdb.base/charset.exp b/gdb/testsuite/gdb.base/charset.exp
index 4e4cf09..ad0fec9 100644
--- a/gdb/testsuite/gdb.base/charset.exp
+++ b/gdb/testsuite/gdb.base/charset.exp
@@ -546,6 +546,12 @@ if {$wchar_ok} {
}
set ucs2_ok [expr {[get_sizeof char16_t 99] == 2}]
+
+if ![valid_host_charset "UTF-16"] {
+ verbose -log "Disabling UTF-16 tests."
+ set ucs2_ok 0
+}
+
if {$ucs2_ok} {
test_wide_or_unicode u UTF-16
}
@@ -606,11 +612,13 @@ proc string_display { var_name set_prefix x_size x_type} {
gdb_test "x /2${x_size}s ${var_name}" ".* ${x_type}\"Test String\"\[\r\n\]+.* ${x_type}\"with zeroes\"" "Display String ${var_name} with x/${x_size}s"
}
-string_display String16 u h u
-if {$wchar_size == 2} {
- string_display String16 L h u
+if {$ucs2_ok} {
+ string_display String16 u h u
+ if {$wchar_size == 2} {
+ string_display String16 L h u
+ }
}
-
+
string_display String32 U w U
if {$wchar_size == 4} {
string_display String32 L w U