Fossil SCM

Fix .test file problems where a missing file incorrectly causes failures.

danshearer 2026-11-20 12:10 UTC test-suite-new
Commit d7931d72bbaa5554384205c9e4273bc5943b22890ed36ec8daf1880ddf78de25
2 files changed +1 -1 +1 -1
--- test/revert.test
+++ test/revert.test
@@ -24,11 +24,10 @@
2424
# 'fossil addremove -n', as well as by verifying the existence of files
2525
# on the file system. 'fossil undo' is called after each test
2626
#
2727
proc revert-test {testid revertArgs expectedRevertOutput args} {
2828
global RESULT
29
- set passed 1
3029
3130
set args [dict merge {
3231
-changes {} -addremove {} -exists {} -notexists {}
3332
} $args]
3433
@@ -42,10 +41,11 @@
4241
test_status_list revert-$testid$key $result $expected
4342
}
4443
4544
set fileExistsTests [list -exists 1 does -notexists 0 should]
4645
foreach {key expected verb} $fileExistsTests {
46
+ set passed 1
4747
foreach path [dict get $args $key] {
4848
if {[file exists $path] != $expected} {
4949
set passed 0
5050
protOut " Failure: File $verb not exist: $path"
5151
}
5252
--- test/revert.test
+++ test/revert.test
@@ -24,11 +24,10 @@
24 # 'fossil addremove -n', as well as by verifying the existence of files
25 # on the file system. 'fossil undo' is called after each test
26 #
27 proc revert-test {testid revertArgs expectedRevertOutput args} {
28 global RESULT
29 set passed 1
30
31 set args [dict merge {
32 -changes {} -addremove {} -exists {} -notexists {}
33 } $args]
34
@@ -42,10 +41,11 @@
42 test_status_list revert-$testid$key $result $expected
43 }
44
45 set fileExistsTests [list -exists 1 does -notexists 0 should]
46 foreach {key expected verb} $fileExistsTests {
 
47 foreach path [dict get $args $key] {
48 if {[file exists $path] != $expected} {
49 set passed 0
50 protOut " Failure: File $verb not exist: $path"
51 }
52
--- test/revert.test
+++ test/revert.test
@@ -24,11 +24,10 @@
24 # 'fossil addremove -n', as well as by verifying the existence of files
25 # on the file system. 'fossil undo' is called after each test
26 #
27 proc revert-test {testid revertArgs expectedRevertOutput args} {
28 global RESULT
 
29
30 set args [dict merge {
31 -changes {} -addremove {} -exists {} -notexists {}
32 } $args]
33
@@ -42,10 +41,11 @@
41 test_status_list revert-$testid$key $result $expected
42 }
43
44 set fileExistsTests [list -exists 1 does -notexists 0 should]
45 foreach {key expected verb} $fileExistsTests {
46 set passed 1
47 foreach path [dict get $args $key] {
48 if {[file exists $path] != $expected} {
49 set passed 0
50 protOut " Failure: File $verb not exist: $path"
51 }
52
+1 -1
--- test/stash.test
+++ test/stash.test
@@ -42,11 +42,10 @@
4242
#
4343
# Also, if the exit status of fossil stash does not match
4444
# expectations, the rest of the areas are not tested.
4545
proc test_result_state {testid cmdArgs expectedOutput args} {
4646
global RESULT
47
- set passed 1
4847
4948
set args [dict merge {
5049
-changes {} -addremove {} -exists {} -notexists {} -knownbugs {}
5150
} $args]
5251
@@ -73,10 +72,11 @@
7372
test_status_list $testid$key $result $expected [knownBug $key $knownbugs]
7473
}
7574
7675
set fileExistsTests [list -exists 1 does -notexists 0 should]
7776
foreach {key expected verb} $fileExistsTests {
77
+ set passed 1
7878
foreach path [dict get $args $key] {
7979
if {[file exists $path] != $expected} {
8080
set passed 0
8181
protOut " Failure: File $verb not exist: $path"
8282
}
8383
--- test/stash.test
+++ test/stash.test
@@ -42,11 +42,10 @@
42 #
43 # Also, if the exit status of fossil stash does not match
44 # expectations, the rest of the areas are not tested.
45 proc test_result_state {testid cmdArgs expectedOutput args} {
46 global RESULT
47 set passed 1
48
49 set args [dict merge {
50 -changes {} -addremove {} -exists {} -notexists {} -knownbugs {}
51 } $args]
52
@@ -73,10 +72,11 @@
73 test_status_list $testid$key $result $expected [knownBug $key $knownbugs]
74 }
75
76 set fileExistsTests [list -exists 1 does -notexists 0 should]
77 foreach {key expected verb} $fileExistsTests {
 
78 foreach path [dict get $args $key] {
79 if {[file exists $path] != $expected} {
80 set passed 0
81 protOut " Failure: File $verb not exist: $path"
82 }
83
--- test/stash.test
+++ test/stash.test
@@ -42,11 +42,10 @@
42 #
43 # Also, if the exit status of fossil stash does not match
44 # expectations, the rest of the areas are not tested.
45 proc test_result_state {testid cmdArgs expectedOutput args} {
46 global RESULT
 
47
48 set args [dict merge {
49 -changes {} -addremove {} -exists {} -notexists {} -knownbugs {}
50 } $args]
51
@@ -73,10 +72,11 @@
72 test_status_list $testid$key $result $expected [knownBug $key $knownbugs]
73 }
74
75 set fileExistsTests [list -exists 1 does -notexists 0 should]
76 foreach {key expected verb} $fileExistsTests {
77 set passed 1
78 foreach path [dict get $args $key] {
79 if {[file exists $path] != $expected} {
80 set passed 0
81 protOut " Failure: File $verb not exist: $path"
82 }
83

Keyboard Shortcuts

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