Fossil SCM
Fix .test file problems where a missing file incorrectly causes failures.
Commit
d7931d72bbaa5554384205c9e4273bc5943b22890ed36ec8daf1880ddf78de25
Parent
825ad77cea5a1c9…
2 files changed
+1
-1
+1
-1
+1
-1
| --- test/revert.test | ||
| +++ test/revert.test | ||
| @@ -24,11 +24,10 @@ | ||
| 24 | 24 | # 'fossil addremove -n', as well as by verifying the existence of files |
| 25 | 25 | # on the file system. 'fossil undo' is called after each test |
| 26 | 26 | # |
| 27 | 27 | proc revert-test {testid revertArgs expectedRevertOutput args} { |
| 28 | 28 | global RESULT |
| 29 | - set passed 1 | |
| 30 | 29 | |
| 31 | 30 | set args [dict merge { |
| 32 | 31 | -changes {} -addremove {} -exists {} -notexists {} |
| 33 | 32 | } $args] |
| 34 | 33 | |
| @@ -42,10 +41,11 @@ | ||
| 42 | 41 | test_status_list revert-$testid$key $result $expected |
| 43 | 42 | } |
| 44 | 43 | |
| 45 | 44 | set fileExistsTests [list -exists 1 does -notexists 0 should] |
| 46 | 45 | foreach {key expected verb} $fileExistsTests { |
| 46 | + set passed 1 | |
| 47 | 47 | foreach path [dict get $args $key] { |
| 48 | 48 | if {[file exists $path] != $expected} { |
| 49 | 49 | set passed 0 |
| 50 | 50 | protOut " Failure: File $verb not exist: $path" |
| 51 | 51 | } |
| 52 | 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 | 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 @@ | ||
| 42 | 42 | # |
| 43 | 43 | # Also, if the exit status of fossil stash does not match |
| 44 | 44 | # expectations, the rest of the areas are not tested. |
| 45 | 45 | proc test_result_state {testid cmdArgs expectedOutput args} { |
| 46 | 46 | global RESULT |
| 47 | - set passed 1 | |
| 48 | 47 | |
| 49 | 48 | set args [dict merge { |
| 50 | 49 | -changes {} -addremove {} -exists {} -notexists {} -knownbugs {} |
| 51 | 50 | } $args] |
| 52 | 51 | |
| @@ -73,10 +72,11 @@ | ||
| 73 | 72 | test_status_list $testid$key $result $expected [knownBug $key $knownbugs] |
| 74 | 73 | } |
| 75 | 74 | |
| 76 | 75 | set fileExistsTests [list -exists 1 does -notexists 0 should] |
| 77 | 76 | foreach {key expected verb} $fileExistsTests { |
| 77 | + set passed 1 | |
| 78 | 78 | foreach path [dict get $args $key] { |
| 79 | 79 | if {[file exists $path] != $expected} { |
| 80 | 80 | set passed 0 |
| 81 | 81 | protOut " Failure: File $verb not exist: $path" |
| 82 | 82 | } |
| 83 | 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 | 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 |