diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-01-03 21:52:18 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-01-03 21:52:18 (GMT) |
commit | 4302a869f0212a3e4878e66a7260b434f6584476 (patch) | |
tree | e6976e66edf648406e32b092395121e045301692 /tkimg/xpm/tests/xpm.test | |
parent | a780057cc1b51dd3a557549c3cf2431f09136c0d (diff) | |
parent | 60d692811c12788ed4468d5ff680633304e8f641 (diff) | |
download | blt-4302a869f0212a3e4878e66a7260b434f6584476.zip blt-4302a869f0212a3e4878e66a7260b434f6584476.tar.gz blt-4302a869f0212a3e4878e66a7260b434f6584476.tar.bz2 |
Merge commit '60d692811c12788ed4468d5ff680633304e8f641' as 'tkimg'
Diffstat (limited to 'tkimg/xpm/tests/xpm.test')
-rwxr-xr-x | tkimg/xpm/tests/xpm.test | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tkimg/xpm/tests/xpm.test b/tkimg/xpm/tests/xpm.test new file mode 100755 index 0000000..2b7f6a8 --- /dev/null +++ b/tkimg/xpm/tests/xpm.test @@ -0,0 +1,46 @@ +# This file is a Tcl script to test out GIF reading and writing.
+# It is organized in the standard fashion for Tcl tests.
+#
+
+puts "img::xpm [package require img::xpm]"
+
+set xpmdata \
+{/* XPM */
+static char * InlineData[] = {
+"16 12 3 1",
+" s None c None",
+". c #000000",
+"# c #f0ff80",
+" .... ",
+" .####. ",
+" .######. ",
+"............. ",
+".###########. ",
+".###########. ",
+".###########. ",
+".###########. ",
+".###########. ",
+".###########. ",
+".###########. ",
+"............. "};}
+
+test xpm-1.1 {} {
+ catch {image delete i}
+ image create photo i -file [file join $tcltest::testsDirectory folder.xpm]
+ i data -format xpm
+} $xpmdata
+test xpm-1.2 {} {
+ catch {image delete i}
+ image create photo i -data $xpmdata
+ set data [i data -format xpm]
+} $xpmdata
+test xpm-1.3 {} {
+ i blank
+ i put $data
+ set data [i data -format xpm]
+} $xpmdata
+test xpm-1.4 {} {
+ i blank
+ i put $data -format xpm
+ set data [i data -format xpm]
+} $xpmdata
|