1 | package require RapptureLibrary |
---|
2 | |
---|
3 | Rappture::library "rplib_test.xml" |
---|
4 | |
---|
5 | puts [library0 get input.(max).current] |
---|
6 | puts [library0 get input.(max)] |
---|
7 | |
---|
8 | library0 put -append yes -id 1 input.(max).current "9" |
---|
9 | |
---|
10 | puts [library0 xml] |
---|
11 | |
---|
12 | set outp "\nTESTING ELEMENT" |
---|
13 | append outp "\nelement -as path input.(max): " |
---|
14 | append outp [library0 element -as path input.(max)] |
---|
15 | append outp "\nelement -as component input.(max): " |
---|
16 | append outp [library0 element -as component input.(max)] |
---|
17 | append outp "\nelement -as type input.(max): " |
---|
18 | append outp [library0 element -as type input.(max)] |
---|
19 | append outp "\nelement -as id input.(max): " |
---|
20 | append outp [library0 element -as id input.(max)] |
---|
21 | append outp "\nelement -as object input.(max): " |
---|
22 | append outp [library0 element -as object input.(max)] |
---|
23 | puts $outp |
---|
24 | |
---|
25 | set outp "\nTESTING PARENT" |
---|
26 | append outp "\nparent -as path input.(max).current: " |
---|
27 | append outp [library0 parent -as path input.(max).current] |
---|
28 | append outp "\nparent -as component input.(max).current: " |
---|
29 | append outp [library0 parent -as component input.(max).current] |
---|
30 | append outp "\nparent -as type input.(max).current: " |
---|
31 | append outp [library0 parent -as type input.(max).current] |
---|
32 | append outp "\nparent -as id input.(max).current: " |
---|
33 | append outp [library0 parent -as id input.(max).current] |
---|
34 | append outp "\nparent -as object input.(max).current: " |
---|
35 | append outp [library0 parent -as object input.(max).current] |
---|
36 | |
---|
37 | append outp "\nparent input.(max): " |
---|
38 | append outp [library0 parent input.(max)] |
---|
39 | append outp "\nparent input: " |
---|
40 | append outp [library0 parent input] |
---|
41 | append outp "\nparent current: " |
---|
42 | append outp [library0 parent current] |
---|
43 | puts $outp |
---|
44 | |
---|
45 | set outp "\nTESTING CHILDREN" |
---|
46 | append outp "\nchildren input: " |
---|
47 | append outp [library0 children input] |
---|
48 | append outp "\nchildren -as path input: " |
---|
49 | append outp [library0 children -as path input] |
---|
50 | append outp "\nchildren -as id -type number input: " |
---|
51 | append outp [library0 children -as id -type number input] |
---|
52 | append outp "\nchildren -as object input: " |
---|
53 | append outp [library0 children -as object input] |
---|
54 | puts $outp |
---|
55 | |
---|
56 | puts "Copying min and max" |
---|
57 | library0 copy input.test from input.(min) |
---|
58 | library0 copy input.test from input.(max) |
---|
59 | puts [library0 xml] |
---|
60 | |
---|
61 | puts "Removing min and max" |
---|
62 | library0 remove input.test.(min) |
---|
63 | library0 remove input.test.(max) |
---|
64 | puts [library0 xml] |
---|
65 | |
---|
66 | puts "Removing library0" |
---|
67 | library0 remove |
---|
68 | |
---|
69 | puts "Printing XML" |
---|
70 | puts [library0 xml] |
---|
71 | |
---|
72 | puts "opening new library" |
---|
73 | set libObj1 [Rappture::library "rplib_test.xml"] |
---|
74 | set libObj2 [Rappture::library "rplib_test.xml"] |
---|
75 | puts "libObj1 = " |
---|
76 | puts $libObj1 |
---|
77 | |
---|
78 | puts "COPYING BETWEEN LIBS" |
---|
79 | $libObj1 copy "input.test" from libObj2 "input.(max)" |
---|
80 | puts [$libObj1 xml] |
---|
81 | |
---|
82 | #puts [$libObj xml] |
---|
83 | puts "isvalid test1: " |
---|
84 | # puts [Rappture::library isvalid $libObj1] |
---|
85 | puts "isvalid test2: " |
---|
86 | # puts [Rappture::library isvalid library0] |
---|