|
1
|
# |
|
2
|
# Tests for 'win32-longpath' VFS, using a repo path >260 chars. |
|
3
|
# |
|
4
|
# Actually, this test should pass on any platform. |
|
5
|
# |
|
6
|
|
|
7
|
# Fossil will write data on $HOME, running 'fossil new' here. |
|
8
|
# We need not to clutter the $HOME of the test caller. |
|
9
|
# |
|
10
|
set env(HOME) [pwd] |
|
11
|
|
|
12
|
# Create the repo |
|
13
|
# |
|
14
|
set x [string repeat x 132] |
|
15
|
set longpath [pwd]/$x |
|
16
|
file mkdir $longpath |
|
17
|
catch { |
|
18
|
# Use "cygpath" for converting it to win32 path. If not |
|
19
|
# in Msys or Cygwin shell, nothing needs to be done. |
|
20
|
set longpath [exec cygpath -w $longpath] |
|
21
|
} |
|
22
|
|
|
23
|
test win32-longpath-test.1 { |
|
24
|
![regexp CANTOPEN [fossil new $longpath/$x.fossil]] |
|
25
|
} |
|
26
|
|
|
27
|
# Try to remove the file/dir various ways, different |
|
28
|
# Shells/Tcl versions expect it differently. |
|
29
|
catch {file delete \\\\?\\$longpath\\$x.fossil} |
|
30
|
catch {file delete $longpath/$x.fossil} |
|
31
|
catch {file delete [pwd]/$x/$x.fossil} |
|
32
|
catch {file delete [pwd]/$x} |
|
33
|
|