diff options
author | vincentdarley <vincentdarley> | 2004-12-20 10:34:19 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2004-12-20 10:34:19 (GMT) |
commit | 305b4b22eef2f33fc2f65c97556123af3efdde37 (patch) | |
tree | f51e7f5db8a417f505089b9d7c91bafc34386c83 /tests/filebox.test | |
parent | ad8a25f00a1b5b9df12360a878f56a50d20c712e (diff) | |
download | tk-305b4b22eef2f33fc2f65c97556123af3efdde37.zip tk-305b4b22eef2f33fc2f65c97556123af3efdde37.tar.gz tk-305b4b22eef2f33fc2f65c97556123af3efdde37.tar.bz2 |
Corrected handling of MacOS filetypes in tk_*file dialogs
Diffstat (limited to 'tests/filebox.test')
-rw-r--r-- | tests/filebox.test | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/filebox.test b/tests/filebox.test index f42af62..432323d 100644 --- a/tests/filebox.test +++ b/tests/filebox.test @@ -6,13 +6,27 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: filebox.test,v 1.17 2004/12/08 03:02:53 dgp Exp $ +# RCS: @(#) $Id: filebox.test,v 1.18 2004/12/20 10:34:20 vincentdarley Exp $ # package require tcltest 2.1 eval tcltest::configure $argv tcltest::loadTestedCommands +test fileDialog-0.1 {GetFileName: file types: MakeFilter() fails} { + # MacOS type that is too long + + set res [list [catch {tk_getSaveFile -filetypes {{"foo" .foo {\0\0\0\0\0}}}} msg] $msg] + regsub -all "\0" $res {\\0} +} {1 {bad Macintosh file type "\0\0\0\0\0"}} +test fileDialog-0.2 {GetFileName: file types: MakeFilter() fails} { + # MacOS type that is too short, but looks ok in utf (4 bytes). + + set x [catch {tk_getSaveFile -filetypes {{"foo" .foo {\0\0}}}} msg] + regsub -all "\0" $msg {\\0} msg + list $x $msg +} {1 {bad Macintosh file type "\0\0"}} + set tk_strictMotif_old $tk_strictMotif #---------------------------------------------------------------------- |