0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / tests / bugs / caf / bug29217
1 puts "============"
2 puts "OCC29217"
3 puts "Storage of Ocaf documents in BIN file format in old document version"
4 puts "============"
5 puts ""
6
7 NewDocument D BinOcaf
8 SetExtStringArray D 0:1 0 1 3 Hello hallo Bonjour
9 set FileV7 ${imagedir}/bug29217_doc7.cbf
10 set FileV10 ${imagedir}/bug29217_doc10.cbf
11 SetNode D 0:1
12 AISSet D 0:1 NS
13
14 SaveAs D ${FileV10}
15
16 SetStorageFormatVersion D 7
17 SaveAs D ${FileV7}
18
19 Close D
20
21 puts "Testing for BIN file format in new version document"
22
23 Open ${FileV10} D10
24
25 set info [Attributes D10 0:1]
26 if { [regexp "TDataStd_ExtStringArray" ${info}] != 1 } {
27     puts "Error : there is not TDataStd_ExtStringArray attribute in new version document"
28 } else {
29     puts "OK : there is TDataStd_ExtStringArray attribute in new version document"
30 }
31 if { [regexp "TDataStd_TreeNode" ${info}] != 1 } {
32     puts "Error : there is not TDataStd_TreeNode attribute in new version document"
33 } else {
34     puts "OK : there is TDataStd_TreeNode attribute in new version document"
35 }
36 if { [regexp "TDataXtd_Presentation" ${info}] != 1 } {
37     puts "Error : there is not TDataXtd_Presentation attribute in new version document"
38 } else {
39     puts "OK : there is TDataXtd_Presentation attribute in new version document"
40 }
41 set info [GetExtStringArray D10 0:1]
42 if { [regexp "Hello" ${info}] != 1 } {
43     puts "Error : there is not \"Hello\" word in TDataStd_ExtStringArray attribute in new version document"
44 } else {
45     puts "OK : there is \"Hello\" word in TDataStd_ExtStringArray attribute in new version document"
46 }
47 if { [regexp "hallo" ${info}] != 1 } {
48     puts "Error : there is not \"hallo\" word in TDataStd_ExtStringArray attribute in new version document"
49 } else {
50     puts "OK : there is \"hallo\" word in TDataStd_ExtStringArray attribute in new version document"
51 }
52 if { [regexp "Bonjour" ${info}] != 1 } {
53     puts "Error : there is not \"Bonjour\" word in TDataStd_ExtStringArray attribute in new version document"
54 } else {
55     puts "OK : there is \"Bonjour\" word in TDataStd_ExtStringArray attribute in new version document"
56 }
57
58 puts "\nTesting for BIN file format in old version document"
59 Open ${FileV7} D7
60
61 set info [Attributes D7 0:1]
62 if { [regexp "TDataStd_ExtStringArray" ${info}] != 1 } {
63     puts "Error : there is not TDataStd_ExtStringArray attribute in old version document"
64 } else {
65     puts "OK : there is TDataStd_ExtStringArray attribute in old version document"
66 }
67 if { [regexp "TDataStd_TreeNode" ${info}] != 1 } {
68     puts "Error : there is not TDataStd_TreeNode attribute in old version document"
69 } else {
70     puts "OK : there is TDataStd_TreeNode attribute in old version document"
71 }
72 if { [regexp "TDataXtd_Presentation" ${info}] != 1 } {
73     puts "Error : there is not TDataXtd_Presentation attribute in old version document"
74 } else {
75     puts "OK : there is TDataXtd_Presentation attribute in old version document"
76 }
77 set info [GetExtStringArray D7 0:1]
78 if { [regexp "Hello" ${info}] != 1 } {
79     puts "Error : there is not \"Hello\" word in TDataStd_ExtStringArray attribute in old version document"
80 } else {
81     puts "OK : there is \"Hello\" word in TDataStd_ExtStringArray attribute in old version document"
82 }
83 if { [regexp "hallo" ${info}] != 1 } {
84     puts "Error : there is not \"hallo\" word in TDataStd_ExtStringArray attribute in old version document"
85 } else {
86     puts "OK : there is \"hallo\" word in TDataStd_ExtStringArray attribute in old version document"
87 }
88 if { [regexp "Bonjour" ${info}] != 1 } {
89     puts "Error : there is not \"Bonjour\" word in TDataStd_ExtStringArray attribute in old version document"
90 } else {
91     puts "OK : there is \"Bonjour\" word in TDataStd_ExtStringArray attribute in old version document"
92 }