Fossil

Artifact [b1ff2af5ed]
Login

Artifact [b1ff2af5ed]

Artifact b1ff2af5ed12878bfe9bb62dbf70dbe417f2c5c1:


#
# Tests for 'win32-longpath' VFS, using a repo path >260 chars.
#
# Actually, this test should pass on any platform.
#

# Fossil will write data on $HOME, running 'fossil new' here.
# We need not to clutter the $HOME of the test caller.
#
set env(HOME) [pwd]

# Create the repo
#
set x [string repeat x 132]
set longpath [pwd]/$x
file mkdir $longpath
catch {
  # Use "cygpath" for converting it to win32 path. If not
  # in Msys or Cygwin shell, nothing needs to be done.
  set longpath [exec cygpath -w $longpath]
}

test win32-longpath-test.1 {
  ![regexp CANTOPEN [fossil new $longpath/$x.fossil]]
}

# Try to remove the file/dir various ways, different
# Shells/Tcl versions expect it differently.
catch {file delete \\\\?\\$longpath\\$x.fossil}
catch {file delete $longpath/$x.fossil}
catch {file delete [pwd]/$x/$x.fossil}
catch {file delete [pwd]/$x}