+2009-03-25 Tom Tromey <tromey@redhat.com>
+
+ * gdb.base/charset.exp (valid_target_charset): New proc.
+ Use it to skip tests on invalid charsets.
+
2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb.base/completion.exp: Add a test for directory completion.
return [expr {[info exists charsets($charset)] && $charsets($charset)}]
}
+proc valid_target_charset {charset} {
+ global charsets
+ return [info exists charsets($charset)]
+}
+
send_gdb "set host-charset\n"
gdb_expect {
-re "Requires an argument. Valid arguments are (\[^ \t\n\r,.\]*)" {
# Now try setting every possible target character set,
# given that host charset.
foreach target_charset $charset_subset {
+ if {![valid_target_charset $target_charset]} {
+ continue
+ }
set testname "try `set target-charset $target_charset'"
send_gdb "set target-charset $target_charset\n"
gdb_expect {
gdb_test "set host-charset ASCII" ""
foreach target_charset $charset_subset {
+ if {![valid_target_charset $target_charset]} {
+ continue
+ }
+
if {$target_charset == "UCS-4" || $target_charset == "UCS-2"} {
set param target-wide-charset
set L L