0027146: Create command checkplatform
[occt.git] / tests / bugs / caf / bug23071
CommitLineData
3bea4c16 1puts "================"
2puts "OCC23071"
3puts "================"
4puts ""
5###################################################################################################
6# Comparison of file extension is case sensitive
7###################################################################################################
8
9set BugNumber OCC23071
10
e837410d 11set FileName $imagedir/${test_image}.CBF
12set FileName2 $imagedir/${test_image}.cbf
13set FileName3 ${FileName}.cbf
3bea4c16 14
15set status 0
16
17file delete ${FileName}
18if [file exists ${FileName}] {
19 puts "There is temporary ${FileName} file"
20 set status 1
21}
22file delete ${FileName2}
23if [file exists ${FileName2}] {
24 puts "There is temporary ${FileName2} file"
25 set status 1
26}
27file delete ${FileName3}
28if [file exists ${FileName3}] {
29 puts "There is temporary ${FileName3} file"
30 set status 1
31}
32
e837410d 33catch { NewDocument D BinOcaf }
3bea4c16 34
35if [catch {SaveAs D ${FileName} }] {
36 puts "Faulty ${BugNumber} ; SaveAs command: Error"
37 set status 1
38} else {
39
40# if [file exists ${WorkDirectory}/${FileName}] {
41# puts "There is ${FileName} file"
42# } else {
43# puts "There is not ${FileName} file"
44# }
45
46 if [file exists ${FileName2}] {
47 puts "There is ${FileName2} file"
48 } else {
49 puts "There is not ${FileName2} file"
50 #
51
863f782a 52 if { [checkplatform -windows] } {
3bea4c16 53 puts "OS = Windows NT"
54 set status 1
55 }
56 #
57 }
58
59 if [file exists ${FileName3}] {
60 puts "There is ${FileName3} file"
61 } else {
62 puts "There is not ${FileName3} file"
63 #
863f782a 64 if { [checkplatform -windows] } {
3bea4c16 65 puts "OS = Windows NT"
66 } else {
67 puts "OS = Unix"
68 set status 1
69 }
70 }
71
72}
73
74# Resume
75puts ""
76if { ${status} == 0 } {
77 puts "OK ${BugNumber}"
78} else {
79 puts "Faulty ${BugNumber}"
80}
81
82