Fossil SCM
add test-case
Commit
ab047fc478320a5c2ca33c9a2a9567ba802860c9
Parent
7f64b350326494a…
1 file changed
+25
+25
| --- a/test/longpath.test | ||
| +++ b/test/longpath.test | ||
| @@ -0,0 +1,25 @@ | ||
| 1 | +# | |
| 2 | +# Tests using a repo path >512 chars. | |
| 3 | +# | |
| 4 | +# 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 240] | |
| 15 | +set longpath [pwd]/$x/$x | |
| 16 | +file mkdir [pwd]/$x | |
| 17 | +file mkdir $longpath | |
| 18 | + | |
| 19 | +test longpath-test.1 { | |
| 20 | + ![regexp CANTOPEN [fossil new $longpath/$x.fossil]] | |
| 21 | +} | |
| 22 | + | |
| 23 | +catch {file delete $longpath/$x.[pwd]/$x/$x.fossil} | |
| 24 | +catch {file delete [pwd]/$x} | |
| 25 | + |
| --- a/test/longpath.test | |
| +++ b/test/longpath.test | |
| @@ -0,0 +1,25 @@ | |
| --- a/test/longpath.test | |
| +++ b/test/longpath.test | |
| @@ -0,0 +1,25 @@ | |
| 1 | # |
| 2 | # Tests using a repo path >512 chars. |
| 3 | # |
| 4 | # 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 240] |
| 15 | set longpath [pwd]/$x/$x |
| 16 | file mkdir [pwd]/$x |
| 17 | file mkdir $longpath |
| 18 | |
| 19 | test longpath-test.1 { |
| 20 | ![regexp CANTOPEN [fossil new $longpath/$x.fossil]] |
| 21 | } |
| 22 | |
| 23 | catch {file delete $longpath/$x.[pwd]/$x/$x.fossil} |
| 24 | catch {file delete [pwd]/$x} |
| 25 |