Fossil SCM

add test-case

jan.nijtmans 2014-07-06 07:08 longpath
Commit ab047fc478320a5c2ca33c9a2a9567ba802860c9
1 file changed +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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button