1c9cffdb |
1 | pload DCAF |
2 | |
3 | set BugNumber OCC24164 |
4 | if { [info exists imagedir] == 0 } { |
5 | set imagedir . |
6 | } |
7 | |
8 | #1 open new document |
e837410d |
9 | NewDocument D BinOcaf |
1c9cffdb |
10 | UndoLimit D 10 0 0 |
11 | |
12 | #2 define set of labels |
13 | NewCommand D |
14 | set Lab1 [Label D 0:1:1] |
15 | set Lab2 [Label D 0:1:2] |
16 | set Lab3 [Label D 0:1:3] |
17 | set Lab4 [Label D 0:1:4] |
18 | set Lab5 [Label D 0:1:5] |
19 | set Lab6 [Label D 0:1:6] |
20 | |
21 | #3 set references |
22 | SetRefArray D $Lab1 1 2 $Lab2 $Lab1 |
23 | SetRefArray D $Lab2 1 2 $Lab3 $Lab4 |
24 | SetRefArray D $Lab3 1 1 $Lab1 |
25 | |
26 | #4 set additional references |
27 | NewCommand D |
28 | SetRefArray D $Lab4 1 2 $Lab5 $Lab1 |
29 | SetRefArray D $Lab5 1 1 $Lab6 |
30 | SetRefArray D $Lab6 1 2 $Lab3 $Lab4 |
31 | |
32 | NewCommand D |
33 | |
34 | #5 check references |
35 | GetRefArray D $Lab1 |
36 | GetRefArray D $Lab2 |
37 | GetRefArray D $Lab3 |
38 | GetRefArray D $Lab4 |
39 | GetRefArray D $Lab5 |
40 | GetRefArray D $Lab6 |
41 | |
42 | #6 save the document |
e837410d |
43 | SaveAs D ${imagedir}/testDoc2.cbf |
1c9cffdb |
44 | |
45 | #7 close the document |
46 | set catch_status 0 |
47 | if { [catch {Close D} catch_result] } { |
48 | set catch_status 1 |
49 | } |
50 | if { ${catch_status} != 0 } { |
51 | puts "Faulty ${BugNumber}" |
52 | } else { |
53 | puts "OK ${BugNumber}" |
54 | } |
55 | |
56 | #8 reopen just saved document with the same name |
e837410d |
57 | Open ${imagedir}/testDoc2.cbf D |
1c9cffdb |
58 | |
59 | #9 close the document |
60 | if { [catch {Close D} catch_result] } { |
61 | set catch_status 1 |
62 | } |
63 | |
64 | if { ${catch_status} != 0 } { |
65 | puts "Faulty ${BugNumber}" |
66 | } else { |
67 | puts "OK ${BugNumber}" |
68 | } |
69 | |