Adjusting testing cases for current state of OCCT
[occt.git] / tests / caf / bugs / A6
CommitLineData
40093367 1#INTERFACE CAF
2puts "================"
3puts "OCC1228"
4puts "================"
5puts ""
6
7# Basic attributes
8#
9# Testing attribute: TDataStd_Comment
10#
11# Testing command: SetComment
12# Testing command: GetComment
13#
14
15# ANALOG: puts "caf001-F3"
16
17# Create a new document and set UndoLimit
18NewDocument Doc BinOcaf
19UndoLimit Doc 100
20
21# Open a transaction
22NewCommand Doc
23
24# Add an attribute to a data framework
25set aSetAttr1 "New Attribute"
26set aLabel 0:2
27Label Doc ${aLabel}
28SetComment Doc ${aLabel} ${aSetAttr1}
29
30# Close/Open the transaction
31NewCommand Doc
32
33# Save the document
8418c617 34set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
40093367 35file delete ${aFile}
36catch {SaveAs Doc ${aFile}}
37if { ![file exists ${aFile}] } {
38 puts "There is not ${aFile} file; SaveAs command: Error"
39}
40#catch {exec chmod 777 ${aFile}}
41
42# Restore the document
43Close Doc
44catch {Open ${aFile} DDoc}
45
46# Get a value of the attribute
47set aGetAttr3 ""
48set IsDone [catch {set aGetAttr3 [GetComment DDoc ${aLabel}]} aResult]
49if { ${IsDone} != 0 ||
50 ${aSetAttr1}!=${aGetAttr3} } {
51 puts ${aResult}
52 puts "aSetAttr1=${aSetAttr1} aGetAttr3=${aGetAttr3}"
53 puts "Get a value of TDataStd_Comment attribute from restoring document: Error"
54 puts "OCC1228: ERROR (case 2)"
55} else {
56 puts "Get a value of TDataStd_Comment attribute from restoring document: OK"
57 puts "OCC1228: OK"
58}