5a1271c8 |
1 | #INTERFACE CAF |
2 | # Basic attributes |
3 | # Std documents |
4 | # |
5 | # Testing support of std format: reading standard attribute ExtStringList |
6 | # |
7 | # Testing command: Open, GetExtStringList. |
8 | # |
9 | |
10 | puts "caf001-W8" |
11 | set QA_DUP 0 |
12 | |
13 | # Add an attribute to a data framework |
14 | set aSetAttr1 {aaaaaaaaaaaa1 bbbbbbb2 ccccccccc3} |
15 | set aLabel 0:1 |
16 | set aFile [locate_data_file caf001_extstrList.std] |
17 | #Open a document |
18 | Open ${aFile} D |
19 | |
20 | # Get a value of the attribute |
21 | set IsGood 1 |
22 | set aMessage1 "Add TDataStd_ExtStringList attribute: Error" |
23 | set aGetAttr1 [GetExtStringList D ${aLabel}] |
24 | set aLenRead [llength ${aGetAttr1}] |
25 | set aLenSet [llength ${aSetAttr1}] |
26 | |
27 | if { ${aLenRead} != ${aLenSet} } { |
28 | set IsGood 0 |
29 | puts "aLenRead=${aLenRead}" |
30 | puts ${aMessage1} |
31 | } |
32 | |
33 | if { ${IsGood} == 0} return |
34 | |
35 | for {set i 0} {$i < $aLenRead} {incr i} { |
36 | set aGetAttr11 [lindex ${aGetAttr1} $i] |
37 | set aGetAttr21 [lindex ${aSetAttr1} $i] |
38 | if { ${aGetAttr11} != ${aGetAttr21} } { |
39 | set IsGood 0;puts "i=${i}" |
40 | puts "aGetAttr11=${aGetAttr11}" |
41 | puts "aGetAttr21=${aGetAttr21}" |
42 | break |
43 | } |
44 | } |
45 | |
46 | if { ${IsGood} == 0} { |
47 | puts ${aMessage1} |
48 | } else { |
49 | puts "Add TDataStd_ExtStringList attribute: OK" |
50 | } |