1# This file is a Tcl script to test out GIF reading and writing.
2# It is organized in the standard fashion for Tcl tests.
3#
4
5puts "img::xpm [package require img::xpm]"
6
7set xpmdata \
8{/* XPM */
9static char * InlineData[] = {
10"16 12 3 1",
11"  s None c None",
12". c #000000",
13"# c #f0ff80",
14"   ....         ",
15"  .####.        ",
16" .######.       ",
17".............   ",
18".###########.   ",
19".###########.   ",
20".###########.   ",
21".###########.   ",
22".###########.   ",
23".###########.   ",
24".###########.   ",
25".............   "};}
26
27test xpm-1.1 {} {
28    catch {image delete i}
29    image create photo i -file [file join $tcltest::testsDirectory folder.xpm]
30    i data -format xpm
31} $xpmdata
32test xpm-1.2 {} {
33    catch {image delete i}
34    image create photo i -data $xpmdata
35    set data [i data -format xpm]
36} $xpmdata
37test xpm-1.3 {} {
38    i blank
39    i put $data
40    set data [i data -format xpm]
41} $xpmdata
42test xpm-1.4 {} {
43    i blank
44    i put $data -format xpm
45    set data [i data -format xpm]
46} $xpmdata
47