diff options
author | Tom Tromey <tromey@redhat.com> | 2009-03-25 19:25:49 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2009-03-25 19:25:49 +0000 |
commit | a8df5de46d31194dfe6d67299ecaae8b33943b10 (patch) | |
tree | cc2484309c9047cc564d025aa972019a132a8b8b | |
parent | 6c02c64c314901def80916029614912ca975e57b (diff) | |
download | gdb-a8df5de46d31194dfe6d67299ecaae8b33943b10.zip gdb-a8df5de46d31194dfe6d67299ecaae8b33943b10.tar.gz gdb-a8df5de46d31194dfe6d67299ecaae8b33943b10.tar.bz2 |
* gdb.base/charset.exp (valid_target_charset): New proc.
Use it to skip tests on invalid charsets.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/charset.exp | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 7f7f6f6..6d94121 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/gdb/testsuite/gdb.base/charset.exp b/gdb/testsuite/gdb.base/charset.exp index a6368c9..1ce275d 100644 --- a/gdb/testsuite/gdb.base/charset.exp +++ b/gdb/testsuite/gdb.base/charset.exp @@ -131,6 +131,11 @@ proc valid_host_charset {charset} { 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,.\]*)" { @@ -238,6 +243,9 @@ foreach host_charset $charset_subset { # 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 { @@ -376,6 +384,10 @@ if {$wchar_size == 2} { 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 |