0027146: Create command checkplatform
[occt.git] / tests / bugs / fclasses / bug23852
CommitLineData
802ea1e6 1puts "============"
2puts "OCC23852"
3puts "============"
4puts ""
5#######################################################################
6# OSD_Path interprets unc paths incorrectly
7#######################################################################
8
9pload DCAF
10
11set BugNumber OCC23852
12
863f782a 13if { [checkplatform -windows] } {
802ea1e6 14
15 # Windows, #1
16 set OSD_Path "\\\\Server\\Shared\\Folder\\File.Extension"
17 puts "OSD_Path = ${OSD_Path}"
18
19 set Log [OSDPath ${OSD_Path}]
20 #
21 if { [regexp "Trek +: +\\|\\|Server\\|Shared\\|Folder" ${Log}] != 1 } {
22 puts "${BugNumber}, Trek, #1: Error"
23 }
24 #
25 if { [regexp "Name +: +File" ${Log}] != 1 } {
26 puts "${BugNumber}, Name, #1: Error"
27 }
28 #
29 if { [regexp "Extension +: +.Extension" ${Log}] != 1 } {
30 puts "${BugNumber}, Extension, #1: Error"
31 }
32
33 # Windows, #2
34 set OSD_Path "//Server/Shared/Folder/File.Extension"
35 puts "OSD_Path = ${OSD_Path}"
36
37 set Log [OSDPath ${OSD_Path}]
38 #
39 if { [regexp "Trek +: +||Server|Shared|Folder" ${Log}] != 1 } {
40 puts "${BugNumber}, Trek, #2: Error"
41 }
42 #
43 if { [regexp "Name +: +File" ${Log}] != 1 } {
44 puts "${BugNumber}, Name, #2: Error"
45 }
46 #
47 if { [regexp "Extension +: +.Extension" ${Log}] != 1 } {
48 puts "${BugNumber}, Extension, #2: Error"
49 }
50
863f782a 51} else {
802ea1e6 52 # Linux
53 set OSD_Path "//Server/Shared/Folder/File.Extension"
54 puts "OSD_Path = ${OSD_Path}"
55
56 set Log [OSDPath ${OSD_Path}]
57 #
58 if { [regexp "Trek +: +||Server|Shared|Folder" ${Log}] != 1 } {
59 puts "${BugNumber}, Trek: Error"
60 }
61 #
62 if { [regexp "Name +: +File" ${Log}] != 1 } {
63 puts "${BugNumber}, Name: Error"
64 }
65 #
66 if { [regexp "Extension +: +.Extension" ${Log}] != 1 } {
67 puts "${BugNumber}, Extension: Error"
68 }
69}