summaryrefslogtreecommitdiffstats
path: root/tkimg/tests/xpm.test
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-10-27 20:28:26 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-10-27 20:28:26 (GMT)
commitb184baa1234c2143e488d1796ae98afab118b891 (patch)
tree686b0a47b272296205c7fa2bc789f62a03d20df6 /tkimg/tests/xpm.test
parentf7560d0a451a793441216d76eb4d9475aab61740 (diff)
parent5aad878400425d3af44433a47c13824385689e1d (diff)
downloadblt-b184baa1234c2143e488d1796ae98afab118b891.zip
blt-b184baa1234c2143e488d1796ae98afab118b891.tar.gz
blt-b184baa1234c2143e488d1796ae98afab118b891.tar.bz2
Merge commit '5aad878400425d3af44433a47c13824385689e1d' as 'tkimg'
Diffstat (limited to 'tkimg/tests/xpm.test')
-rw-r--r--tkimg/tests/xpm.test49
1 files changed, 49 insertions, 0 deletions
diff --git a/tkimg/tests/xpm.test b/tkimg/tests/xpm.test
new file mode 100644
index 0000000..38230d2
--- /dev/null
+++ b/tkimg/tests/xpm.test
@@ -0,0 +1,49 @@
+# This file is a Tcl script to test out GIF reading and writing.
+# It is organized in the standard fashion for Tcl tests.
+#
+
+if {[string compare test [info procs test]] == 1} {
+ source defs
+}
+
+catch {image delete i}
+
+set xpmdata \
+{/* XPM */
+static char * InlineData[] = {
+"16 12 3 1",
+" s None c None",
+". c #000000",
+"# c #f0ff80",
+" .... ",
+" .####. ",
+" .######. ",
+"............. ",
+".###########. ",
+".###########. ",
+".###########. ",
+".###########. ",
+".###########. ",
+".###########. ",
+".###########. ",
+"............. "};}
+
+test xpm-1.1 {} {
+ image create photo i -file 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