Fossil SCM

Disable "longpath" testcase for non-unix platforms. Make sure temporary directories created by the testcase are cleaned up.

jan.nijtmans 2014-07-07 09:59 longpath
Commit 46dc6537f84823860e9c48cc4ec513250852388e
1 file changed +6 -4
--- test/longpath.test
+++ test/longpath.test
@@ -1,10 +1,14 @@
11
#
22
# Tests using a repo path >512 chars.
33
#
44
# This test should pass on any platform.
55
#
6
+
7
+if {$::tcl_platform(platform)!="unix"} {
8
+ exit
9
+}
610
711
# Fossil will write data on $HOME, running 'fossil new' here.
812
# We need not to clutter the $HOME of the test caller.
913
#
1014
set env(HOME) [pwd]
@@ -11,16 +15,14 @@
1115
1216
# Create the repo
1317
#
1418
set x [string repeat x 240]
1519
set longpath [pwd]/$x/$x
16
-file mkdir [pwd]/$x
1720
file mkdir $longpath
1821
1922
test longpath-test.1 {
2023
![regexp CANTOPEN [fossil new $longpath/$x.fossil]]
2124
}
2225
2326
catch {file delete $longpath/$x.fossil}
24
-catch {file delete [pwd]/$x/$x.fossil}
25
-catch {file delete [pwd]/$x}
26
-
27
+catch {file delete $longpath}
28
+catch {file delete [file dirname $longpath]}
2729
--- test/longpath.test
+++ test/longpath.test
@@ -1,10 +1,14 @@
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,16 +15,14 @@
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.fossil}
24 catch {file delete [pwd]/$x/$x.fossil}
25 catch {file delete [pwd]/$x}
26
27
--- test/longpath.test
+++ test/longpath.test
@@ -1,10 +1,14 @@
1 #
2 # Tests using a repo path >512 chars.
3 #
4 # This test should pass on any platform.
5 #
6
7 if {$::tcl_platform(platform)!="unix"} {
8 exit
9 }
10
11 # Fossil will write data on $HOME, running 'fossil new' here.
12 # We need not to clutter the $HOME of the test caller.
13 #
14 set env(HOME) [pwd]
@@ -11,16 +15,14 @@
15
16 # Create the repo
17 #
18 set x [string repeat x 240]
19 set longpath [pwd]/$x/$x
 
20 file mkdir $longpath
21
22 test longpath-test.1 {
23 ![regexp CANTOPEN [fossil new $longpath/$x.fossil]]
24 }
25
26 catch {file delete $longpath/$x.fossil}
27 catch {file delete $longpath}
28 catch {file delete [file dirname $longpath]}
 
29

Keyboard Shortcuts

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