0024927: Getting rid of "Persistent" functionality -- Tests
[occt.git] / tests / caf / tree / B3
CommitLineData
40093367 1#INTERFACE CAF
2# Tree construction attributes
3#
4# Testing attribute: TDataStd_Directory
5#
6# Testing command: NewDirectory
7#
8
9puts "caf005-B3"
10
11# Add an attribute to a data framework
12set aLabel1 0:2
13NewDirectory D ${aLabel1}
14set aName1 Label1
15SetName D ${aLabel1} ${aName1}
16
17# Close/Open the transaction
18NewCommand D
19
20# Save the document
e837410d 21set aFile ${imagedir}/caf001-B3.cbf
40093367 22file delete ${aFile}
23SaveAs D ${aFile}
24if { ![file exists ${aFile}] } {
25 puts "There is not ${aFile} file; SaveAs command: Error"
26 return
27}
28#catch {exec chmod 777 ${aFile}}
29
30# Restore the document
31Close D
32Open ${aFile} DD
33
34# Get a value of the attribute
35set IsDone [catch {set aGetName1 [GetName DD ${aLabel1}]} aResult]
36if { ${IsDone} != 0 ||
37 ${aName1}!=${aGetName1} } {
38 puts "aName1=${aName1} aGetName1=${aGetName1}"
39 puts ${aResult}
40 puts "Get a value of TDataStd_Directory attribute from restoring document: Error"
41 return
42}
43puts "Get a value of TDataStd_Directory attribute from restoring document: OK"