1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/caf/bug170_3
kgv 30fa5f6713 0032705: Test - name clashes within temporary files within bugs/caf/bug23766_X
Several test cases writing temporary files have been corrected.
2021-12-02 21:14:57 +03:00

34 lines
877 B
Plaintext
Executable File

puts "========================"
puts "OCC170"
puts "(case 3)"
puts "========================"
set docName ${casename}
set newDocName ${casename}_2
set str1 "~!@#$%^&*():;'{}\|?/.>,<~!@#$%^&*():;'{}\|?/.>,<#$%#$%$%^&*():;'{}\|$%^&*(@#$%^&*():;'{}\|¦/"
NewDocument $docName XmlOcaf
Label $docName 0:2
SetComment $docName 0:2 $str1
file delete ${imagedir}/${docName}.xml
file delete ${imagedir}/${newDocName}.xml
if [ catch {SaveAs $docName ${imagedir}/${docName}.xml} ] {
puts "Error : (SaveAs)"
} else {
puts "OK : (SaveAs)"
}
file copy ${imagedir}/${docName}.xml ${imagedir}/${newDocName}.xml
Open ${imagedir}/${newDocName}.xml $newDocName
# Retrieve string from document and compare it with initial value
set str2 [GetComment $newDocName 0:2]
if {$str1 == $str2} {puts "OCC170 OK"} else {
puts "str1=${str1}"
puts "str2=${str2}"
puts "OCC170 Error"
}