0027146: Create command checkplatform
[occt.git] / tests / bugs / fclasses / bug309
... / ...
CommitLineData
1puts "TODO ?OCC24296 ALL: OCC309: Error 2"
2
3puts "================"
4puts "OCC309"
5puts "================"
6puts ""
7
8pload QAcommands
9
10set result [OCC309]
11
12set ll [llength ${result}]
13if { ${ll} != 2 } {
14 puts "result = ${result}"
15 puts "length = ${ll}"
16 puts "OCC309: Error 0"
17} else {
18 set result1 [lindex ${result} 0]
19 set result2 [lindex ${result} 1]
20 set CurrentDirectory [pwd]
21 set UpTrek "[file join [file dirname [file dirname ${CurrentDirectory}]] [file tail ${CurrentDirectory}]]"
22 if { [checkplatform -windows] } {
23 set res1 [ string range $result1 3 [expr [string length $result1] -2 ] ]
24 set res2 [ string range $result2 3 [expr [string length $result2] -2 ] ]
25 set CurrentDirectory [ string range $CurrentDirectory 2 [expr [string length $CurrentDirectory] -1 ]]
26 set UpTrek [ string range $UpTrek 2 [expr [string length $UpTrek] -1 ]]
27 } else {
28 set res1 [ string range $result1 1 [expr [string length $result1] -3 ] ]
29 set res2 [ string range $result2 1 [expr [string length $result2] -3 ] ]
30 }
31 if {[string compare ${res1} "${CurrentDirectory}"] == 0} {
32 puts "OCC309: OK 1"
33 } else {
34 puts "result1 = ${result1}"
35 puts "res1 = ${res1}"
36 puts "CurrentDirectory = ${CurrentDirectory}"
37 puts "OCC309: Error 1"
38 }
39 if {[string compare ${res2} "${UpTrek}"] == 0} {
40 puts "OCC309: OK 2"
41 } else {
42 puts "result2 = ${result2}"
43 puts "res2 = ${res2}"
44 puts "UpTrek = ${UpTrek}"
45 puts "OCC309: Error 2"
46 }
47}
48