Fossil SCM
Merge current state of testing-improvements. make clean output is now easy to review.
Commit
e5bcfd1efe9b638f3b639ebabe75275f0c8421dd6752821ec63250cb3997faed
Parent
9d9bf1abfb59ec6…
24 files changed
+1
-13
+1
-1
+5
+14
-1
+6
-6
+1
-1
+27
-27
+5
-5
+3
-1
+3
-3
+1
-1
+13
+5
-5
+13
-9
+7
-3
+1
-1
+1
-11
+26
-3
+14
-17
+2
-2
+8
-1
+3
-3
+25
-7
+123
~
test/commit-warning.test
~
test/delta1.test
~
test/fake-editor.tcl
~
test/json.test
~
test/merge1.test
~
test/merge2.test
~
test/merge3.test
~
test/merge4.test
~
test/merge5.test
~
test/merge_renames.test
~
test/merge_warn.test
~
test/rewrite-test-output.tcl
~
test/set-manifest.test
~
test/settings-repo.test
~
test/settings.test
~
test/stash.test
~
test/symlinks.test
~
test/tester.tcl
~
test/th1-docs.test
~
test/th1-hooks.test
~
test/th1-tcl.test
~
test/th1.test
~
test/unversioned.test
~
test/update.test
+1
-13
| --- test/commit-warning.test | ||
| +++ test/commit-warning.test | ||
| @@ -172,13 +172,10 @@ | ||
| 172 | 172 | test_block_in_checkout pre-commit-warnings-fossil-1 { |
| 173 | 173 | fossil test-commit-warning --no-settings |
| 174 | 174 | } { |
| 175 | 175 | test pre-commit-warnings-fossil-1 {[normalize_result] eq \ |
| 176 | 176 | [subst -nocommands -novariables [string trim { |
| 177 | -1\tart/branching.odp\tbinary data | |
| 178 | -1\tart/concept1.dia\tbinary data | |
| 179 | -1\tart/concept2.dia\tbinary data | |
| 180 | 177 | 1\tcompat/zlib/contrib/blast/test.pk\tbinary data |
| 181 | 178 | 1\tcompat/zlib/contrib/dotzlib/DotZLib.build\tCR/LF line endings |
| 182 | 179 | 1\tcompat/zlib/contrib/dotzlib/DotZLib.chm\tbinary data |
| 183 | 180 | 1\tcompat/zlib/contrib/dotzlib/DotZLib.sln\tCR/LF line endings |
| 184 | 181 | 1\tcompat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs\tCR/LF line endings |
| @@ -192,19 +189,10 @@ | ||
| 192 | 189 | 1\tcompat/zlib/contrib/dotzlib/DotZLib/Inflater.cs\tinvalid UTF-8 |
| 193 | 190 | 1\tcompat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs\tCR/LF line endings |
| 194 | 191 | 1\tcompat/zlib/contrib/dotzlib/LICENSE_1_0.txt\tCR/LF line endings |
| 195 | 192 | 1\tcompat/zlib/contrib/dotzlib/readme.txt\tCR/LF line endings |
| 196 | 193 | 1\tcompat/zlib/contrib/gcc_gvmat64/gvmat64.S\tCR/LF line endings |
| 197 | -1\tcompat/zlib/contrib/masmx64/bld_ml64.bat\tCR/LF line endings | |
| 198 | -1\tcompat/zlib/contrib/masmx64/gvmat64.asm\tCR/LF line endings | |
| 199 | -1\tcompat/zlib/contrib/masmx64/inffas8664.c\tCR/LF line endings | |
| 200 | -1\tcompat/zlib/contrib/masmx64/inffasx64.asm\tCR/LF line endings | |
| 201 | -1\tcompat/zlib/contrib/masmx64/readme.txt\tCR/LF line endings | |
| 202 | -1\tcompat/zlib/contrib/masmx86/bld_ml32.bat\tCR/LF line endings | |
| 203 | -1\tcompat/zlib/contrib/masmx86/inffas32.asm\tCR/LF line endings | |
| 204 | -1\tcompat/zlib/contrib/masmx86/match686.asm\tCR/LF line endings | |
| 205 | -1\tcompat/zlib/contrib/masmx86/readme.txt\tCR/LF line endings | |
| 206 | 194 | 1\tcompat/zlib/contrib/puff/zeros.raw\tbinary data |
| 207 | 195 | 1\tcompat/zlib/contrib/testzlib/testzlib.c\tCR/LF line endings |
| 208 | 196 | 1\tcompat/zlib/contrib/testzlib/testzlib.txt\tCR/LF line endings |
| 209 | 197 | 1\tcompat/zlib/contrib/vstudio/readme.txt\tCR/LF line endings |
| 210 | 198 | 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj\tCR/LF line endings |
| @@ -243,18 +231,18 @@ | ||
| 243 | 231 | 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.sln\tCR/LF line endings |
| 244 | 232 | 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.vcproj\tCR/LF line endings |
| 245 | 233 | 1\tcompat/zlib/win32/zlib.def\tCR/LF line endings |
| 246 | 234 | 1\tcompat/zlib/zlib.3.pdf\tbinary data |
| 247 | 235 | 1\tcompat/zlib/zlib.map\tCR/LF line endings |
| 236 | +1\textsrc/pikchr.wasm\tbinary data | |
| 248 | 237 | 1\tskins/blitz/arrow_project.png\tbinary data |
| 249 | 238 | 1\tskins/blitz/dir.png\tbinary data |
| 250 | 239 | 1\tskins/blitz/file.png\tbinary data |
| 251 | 240 | 1\tskins/blitz/fossil_100.png\tbinary data |
| 252 | 241 | 1\tskins/blitz/fossil_80_reversed_darkcyan.png\tbinary data |
| 253 | 242 | 1\tskins/blitz/fossil_80_reversed_darkcyan_text.png\tbinary data |
| 254 | 243 | 1\tskins/blitz/rss_20.png\tbinary data |
| 255 | -1\tskins/bootstrap/css.txt\tlong lines | |
| 256 | 244 | 1\tsrc/alerts/bflat2.wav\tbinary data |
| 257 | 245 | 1\tsrc/alerts/bflat3.wav\tbinary data |
| 258 | 246 | 1\tsrc/alerts/bloop.wav\tbinary data |
| 259 | 247 | 1\tsrc/alerts/plunk.wav\tbinary data |
| 260 | 248 | 1\tsrc/sounds/0.wav\tbinary data |
| 261 | 249 |
| --- test/commit-warning.test | |
| +++ test/commit-warning.test | |
| @@ -172,13 +172,10 @@ | |
| 172 | test_block_in_checkout pre-commit-warnings-fossil-1 { |
| 173 | fossil test-commit-warning --no-settings |
| 174 | } { |
| 175 | test pre-commit-warnings-fossil-1 {[normalize_result] eq \ |
| 176 | [subst -nocommands -novariables [string trim { |
| 177 | 1\tart/branching.odp\tbinary data |
| 178 | 1\tart/concept1.dia\tbinary data |
| 179 | 1\tart/concept2.dia\tbinary data |
| 180 | 1\tcompat/zlib/contrib/blast/test.pk\tbinary data |
| 181 | 1\tcompat/zlib/contrib/dotzlib/DotZLib.build\tCR/LF line endings |
| 182 | 1\tcompat/zlib/contrib/dotzlib/DotZLib.chm\tbinary data |
| 183 | 1\tcompat/zlib/contrib/dotzlib/DotZLib.sln\tCR/LF line endings |
| 184 | 1\tcompat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs\tCR/LF line endings |
| @@ -192,19 +189,10 @@ | |
| 192 | 1\tcompat/zlib/contrib/dotzlib/DotZLib/Inflater.cs\tinvalid UTF-8 |
| 193 | 1\tcompat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs\tCR/LF line endings |
| 194 | 1\tcompat/zlib/contrib/dotzlib/LICENSE_1_0.txt\tCR/LF line endings |
| 195 | 1\tcompat/zlib/contrib/dotzlib/readme.txt\tCR/LF line endings |
| 196 | 1\tcompat/zlib/contrib/gcc_gvmat64/gvmat64.S\tCR/LF line endings |
| 197 | 1\tcompat/zlib/contrib/masmx64/bld_ml64.bat\tCR/LF line endings |
| 198 | 1\tcompat/zlib/contrib/masmx64/gvmat64.asm\tCR/LF line endings |
| 199 | 1\tcompat/zlib/contrib/masmx64/inffas8664.c\tCR/LF line endings |
| 200 | 1\tcompat/zlib/contrib/masmx64/inffasx64.asm\tCR/LF line endings |
| 201 | 1\tcompat/zlib/contrib/masmx64/readme.txt\tCR/LF line endings |
| 202 | 1\tcompat/zlib/contrib/masmx86/bld_ml32.bat\tCR/LF line endings |
| 203 | 1\tcompat/zlib/contrib/masmx86/inffas32.asm\tCR/LF line endings |
| 204 | 1\tcompat/zlib/contrib/masmx86/match686.asm\tCR/LF line endings |
| 205 | 1\tcompat/zlib/contrib/masmx86/readme.txt\tCR/LF line endings |
| 206 | 1\tcompat/zlib/contrib/puff/zeros.raw\tbinary data |
| 207 | 1\tcompat/zlib/contrib/testzlib/testzlib.c\tCR/LF line endings |
| 208 | 1\tcompat/zlib/contrib/testzlib/testzlib.txt\tCR/LF line endings |
| 209 | 1\tcompat/zlib/contrib/vstudio/readme.txt\tCR/LF line endings |
| 210 | 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj\tCR/LF line endings |
| @@ -243,18 +231,18 @@ | |
| 243 | 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.sln\tCR/LF line endings |
| 244 | 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.vcproj\tCR/LF line endings |
| 245 | 1\tcompat/zlib/win32/zlib.def\tCR/LF line endings |
| 246 | 1\tcompat/zlib/zlib.3.pdf\tbinary data |
| 247 | 1\tcompat/zlib/zlib.map\tCR/LF line endings |
| 248 | 1\tskins/blitz/arrow_project.png\tbinary data |
| 249 | 1\tskins/blitz/dir.png\tbinary data |
| 250 | 1\tskins/blitz/file.png\tbinary data |
| 251 | 1\tskins/blitz/fossil_100.png\tbinary data |
| 252 | 1\tskins/blitz/fossil_80_reversed_darkcyan.png\tbinary data |
| 253 | 1\tskins/blitz/fossil_80_reversed_darkcyan_text.png\tbinary data |
| 254 | 1\tskins/blitz/rss_20.png\tbinary data |
| 255 | 1\tskins/bootstrap/css.txt\tlong lines |
| 256 | 1\tsrc/alerts/bflat2.wav\tbinary data |
| 257 | 1\tsrc/alerts/bflat3.wav\tbinary data |
| 258 | 1\tsrc/alerts/bloop.wav\tbinary data |
| 259 | 1\tsrc/alerts/plunk.wav\tbinary data |
| 260 | 1\tsrc/sounds/0.wav\tbinary data |
| 261 |
| --- test/commit-warning.test | |
| +++ test/commit-warning.test | |
| @@ -172,13 +172,10 @@ | |
| 172 | test_block_in_checkout pre-commit-warnings-fossil-1 { |
| 173 | fossil test-commit-warning --no-settings |
| 174 | } { |
| 175 | test pre-commit-warnings-fossil-1 {[normalize_result] eq \ |
| 176 | [subst -nocommands -novariables [string trim { |
| 177 | 1\tcompat/zlib/contrib/blast/test.pk\tbinary data |
| 178 | 1\tcompat/zlib/contrib/dotzlib/DotZLib.build\tCR/LF line endings |
| 179 | 1\tcompat/zlib/contrib/dotzlib/DotZLib.chm\tbinary data |
| 180 | 1\tcompat/zlib/contrib/dotzlib/DotZLib.sln\tCR/LF line endings |
| 181 | 1\tcompat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs\tCR/LF line endings |
| @@ -192,19 +189,10 @@ | |
| 189 | 1\tcompat/zlib/contrib/dotzlib/DotZLib/Inflater.cs\tinvalid UTF-8 |
| 190 | 1\tcompat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs\tCR/LF line endings |
| 191 | 1\tcompat/zlib/contrib/dotzlib/LICENSE_1_0.txt\tCR/LF line endings |
| 192 | 1\tcompat/zlib/contrib/dotzlib/readme.txt\tCR/LF line endings |
| 193 | 1\tcompat/zlib/contrib/gcc_gvmat64/gvmat64.S\tCR/LF line endings |
| 194 | 1\tcompat/zlib/contrib/puff/zeros.raw\tbinary data |
| 195 | 1\tcompat/zlib/contrib/testzlib/testzlib.c\tCR/LF line endings |
| 196 | 1\tcompat/zlib/contrib/testzlib/testzlib.txt\tCR/LF line endings |
| 197 | 1\tcompat/zlib/contrib/vstudio/readme.txt\tCR/LF line endings |
| 198 | 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj\tCR/LF line endings |
| @@ -243,18 +231,18 @@ | |
| 231 | 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.sln\tCR/LF line endings |
| 232 | 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.vcproj\tCR/LF line endings |
| 233 | 1\tcompat/zlib/win32/zlib.def\tCR/LF line endings |
| 234 | 1\tcompat/zlib/zlib.3.pdf\tbinary data |
| 235 | 1\tcompat/zlib/zlib.map\tCR/LF line endings |
| 236 | 1\textsrc/pikchr.wasm\tbinary data |
| 237 | 1\tskins/blitz/arrow_project.png\tbinary data |
| 238 | 1\tskins/blitz/dir.png\tbinary data |
| 239 | 1\tskins/blitz/file.png\tbinary data |
| 240 | 1\tskins/blitz/fossil_100.png\tbinary data |
| 241 | 1\tskins/blitz/fossil_80_reversed_darkcyan.png\tbinary data |
| 242 | 1\tskins/blitz/fossil_80_reversed_darkcyan_text.png\tbinary data |
| 243 | 1\tskins/blitz/rss_20.png\tbinary data |
| 244 | 1\tsrc/alerts/bflat2.wav\tbinary data |
| 245 | 1\tsrc/alerts/bflat3.wav\tbinary data |
| 246 | 1\tsrc/alerts/bloop.wav\tbinary data |
| 247 | 1\tsrc/alerts/plunk.wav\tbinary data |
| 248 | 1\tsrc/sounds/0.wav\tbinary data |
| 249 |
+1
-1
| --- test/delta1.test | ||
| +++ test/delta1.test | ||
| @@ -25,11 +25,11 @@ | ||
| 25 | 25 | # For each test, copy the file intact to "./t1". Make |
| 26 | 26 | # some random changes in "./t2". Then call test-delta on the |
| 27 | 27 | # two files to make sure that deltas between these two files |
| 28 | 28 | # work properly. |
| 29 | 29 | # |
| 30 | -set filelist [glob $testdir/*] | |
| 30 | +set filelist [lsort [glob $testdir/*]] | |
| 31 | 31 | foreach f $filelist { |
| 32 | 32 | if {[file isdir $f]} continue |
| 33 | 33 | set base [file root [file tail $f]] |
| 34 | 34 | set f1 [read_file $f] |
| 35 | 35 | write_file t1 $f1 |
| 36 | 36 |
| --- test/delta1.test | |
| +++ test/delta1.test | |
| @@ -25,11 +25,11 @@ | |
| 25 | # For each test, copy the file intact to "./t1". Make |
| 26 | # some random changes in "./t2". Then call test-delta on the |
| 27 | # two files to make sure that deltas between these two files |
| 28 | # work properly. |
| 29 | # |
| 30 | set filelist [glob $testdir/*] |
| 31 | foreach f $filelist { |
| 32 | if {[file isdir $f]} continue |
| 33 | set base [file root [file tail $f]] |
| 34 | set f1 [read_file $f] |
| 35 | write_file t1 $f1 |
| 36 |
| --- test/delta1.test | |
| +++ test/delta1.test | |
| @@ -25,11 +25,11 @@ | |
| 25 | # For each test, copy the file intact to "./t1". Make |
| 26 | # some random changes in "./t2". Then call test-delta on the |
| 27 | # two files to make sure that deltas between these two files |
| 28 | # work properly. |
| 29 | # |
| 30 | set filelist [lsort [glob $testdir/*]] |
| 31 | foreach f $filelist { |
| 32 | if {[file isdir $f]} continue |
| 33 | set base [file root [file tail $f]] |
| 34 | set f1 [read_file $f] |
| 35 | write_file t1 $f1 |
| 36 |
+5
| --- test/fake-editor.tcl | ||
| +++ test/fake-editor.tcl | ||
| @@ -49,10 +49,15 @@ | ||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | ############################################################################### |
| 52 | 52 | |
| 53 | 53 | set fileName [lindex $argv 0] |
| 54 | + | |
| 55 | +if {[regexp {^CYGWIN} $::tcl_platform(os)]} { | |
| 56 | + # Under Cygwin, we get a Windows path but must access using the unix path. | |
| 57 | + set fileName [exec cygpath --unix $fileName] | |
| 58 | +} | |
| 54 | 59 | |
| 55 | 60 | if {[file exists $fileName]} { |
| 56 | 61 | set data [readFile $fileName] |
| 57 | 62 | } else { |
| 58 | 63 | set data "" |
| 59 | 64 |
| --- test/fake-editor.tcl | |
| +++ test/fake-editor.tcl | |
| @@ -49,10 +49,15 @@ | |
| 49 | } |
| 50 | |
| 51 | ############################################################################### |
| 52 | |
| 53 | set fileName [lindex $argv 0] |
| 54 | |
| 55 | if {[file exists $fileName]} { |
| 56 | set data [readFile $fileName] |
| 57 | } else { |
| 58 | set data "" |
| 59 |
| --- test/fake-editor.tcl | |
| +++ test/fake-editor.tcl | |
| @@ -49,10 +49,15 @@ | |
| 49 | } |
| 50 | |
| 51 | ############################################################################### |
| 52 | |
| 53 | set fileName [lindex $argv 0] |
| 54 | |
| 55 | if {[regexp {^CYGWIN} $::tcl_platform(os)]} { |
| 56 | # Under Cygwin, we get a Windows path but must access using the unix path. |
| 57 | set fileName [exec cygpath --unix $fileName] |
| 58 | } |
| 59 | |
| 60 | if {[file exists $fileName]} { |
| 61 | set data [readFile $fileName] |
| 62 | } else { |
| 63 | set data "" |
| 64 |
+14
-1
| --- test/json.test | ||
| +++ test/json.test | ||
| @@ -177,10 +177,18 @@ | ||
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | #### VERSION AKA HAI |
| 180 | 180 | |
| 181 | 181 | # The JSON API generally assumes we have a respository, so let it have one. |
| 182 | + | |
| 183 | +# Set FOSSIL_USER to ensure consistent results in "json user list" | |
| 184 | +set _fossil_user "" | |
| 185 | +if [info exists env(FOSSIL_USER)] { | |
| 186 | + set _fossil_user $env(FOSSIL_USER) | |
| 187 | +} | |
| 188 | +set ::env(FOSSIL_USER) "JSON-TEST-USER" | |
| 189 | + | |
| 182 | 190 | test_setup |
| 183 | 191 | |
| 184 | 192 | # Stop backoffice from running during this test as it can cause hangs. |
| 185 | 193 | fossil settings backoffice-disable 1 |
| 186 | 194 | |
| @@ -887,11 +895,10 @@ | ||
| 887 | 895 | fossil_json HAI -expectError |
| 888 | 896 | test json-RC-4102-CLI-exit {$CODE != 0} |
| 889 | 897 | test_json_envelope json-RC-4102-CLI-exit {fossil timestamp command procTimeUs \ |
| 890 | 898 | procTimeMs resultCode resultText} {payload} |
| 891 | 899 | test json-RC-4102 {[dict get $JR resultCode] eq "FOSSIL-4102"} |
| 892 | -fossil open .rep.fossil | |
| 893 | 900 | |
| 894 | 901 | # FOSSIL-4103 FSL_JSON_E_DB_NOT_VALID |
| 895 | 902 | # Fossil repository db file is not valid. |
| 896 | 903 | write_file nope.fossil { |
| 897 | 904 | This is not a fossil repo. It ought to be a SQLite db with a well-known schema, |
| @@ -908,5 +915,11 @@ | ||
| 908 | 915 | } |
| 909 | 916 | |
| 910 | 917 | ############################################################################### |
| 911 | 918 | |
| 912 | 919 | test_cleanup |
| 920 | + | |
| 921 | +if { $_fossil_user eq "" } { | |
| 922 | + unset ::env(FOSSIL_USER) | |
| 923 | +} else { | |
| 924 | + set ::env(FOSSIL_USER) $_fossil_user | |
| 925 | +} | |
| 913 | 926 |
| --- test/json.test | |
| +++ test/json.test | |
| @@ -177,10 +177,18 @@ | |
| 177 | } |
| 178 | |
| 179 | #### VERSION AKA HAI |
| 180 | |
| 181 | # The JSON API generally assumes we have a respository, so let it have one. |
| 182 | test_setup |
| 183 | |
| 184 | # Stop backoffice from running during this test as it can cause hangs. |
| 185 | fossil settings backoffice-disable 1 |
| 186 | |
| @@ -887,11 +895,10 @@ | |
| 887 | fossil_json HAI -expectError |
| 888 | test json-RC-4102-CLI-exit {$CODE != 0} |
| 889 | test_json_envelope json-RC-4102-CLI-exit {fossil timestamp command procTimeUs \ |
| 890 | procTimeMs resultCode resultText} {payload} |
| 891 | test json-RC-4102 {[dict get $JR resultCode] eq "FOSSIL-4102"} |
| 892 | fossil open .rep.fossil |
| 893 | |
| 894 | # FOSSIL-4103 FSL_JSON_E_DB_NOT_VALID |
| 895 | # Fossil repository db file is not valid. |
| 896 | write_file nope.fossil { |
| 897 | This is not a fossil repo. It ought to be a SQLite db with a well-known schema, |
| @@ -908,5 +915,11 @@ | |
| 908 | } |
| 909 | |
| 910 | ############################################################################### |
| 911 | |
| 912 | test_cleanup |
| 913 |
| --- test/json.test | |
| +++ test/json.test | |
| @@ -177,10 +177,18 @@ | |
| 177 | } |
| 178 | |
| 179 | #### VERSION AKA HAI |
| 180 | |
| 181 | # The JSON API generally assumes we have a respository, so let it have one. |
| 182 | |
| 183 | # Set FOSSIL_USER to ensure consistent results in "json user list" |
| 184 | set _fossil_user "" |
| 185 | if [info exists env(FOSSIL_USER)] { |
| 186 | set _fossil_user $env(FOSSIL_USER) |
| 187 | } |
| 188 | set ::env(FOSSIL_USER) "JSON-TEST-USER" |
| 189 | |
| 190 | test_setup |
| 191 | |
| 192 | # Stop backoffice from running during this test as it can cause hangs. |
| 193 | fossil settings backoffice-disable 1 |
| 194 | |
| @@ -887,11 +895,10 @@ | |
| 895 | fossil_json HAI -expectError |
| 896 | test json-RC-4102-CLI-exit {$CODE != 0} |
| 897 | test_json_envelope json-RC-4102-CLI-exit {fossil timestamp command procTimeUs \ |
| 898 | procTimeMs resultCode resultText} {payload} |
| 899 | test json-RC-4102 {[dict get $JR resultCode] eq "FOSSIL-4102"} |
| 900 | |
| 901 | # FOSSIL-4103 FSL_JSON_E_DB_NOT_VALID |
| 902 | # Fossil repository db file is not valid. |
| 903 | write_file nope.fossil { |
| 904 | This is not a fossil repo. It ought to be a SQLite db with a well-known schema, |
| @@ -908,5 +915,11 @@ | |
| 915 | } |
| 916 | |
| 917 | ############################################################################### |
| 918 | |
| 919 | test_cleanup |
| 920 | |
| 921 | if { $_fossil_user eq "" } { |
| 922 | unset ::env(FOSSIL_USER) |
| 923 | } else { |
| 924 | set ::env(FOSSIL_USER) $_fossil_user |
| 925 | } |
| 926 |
+6
-6
| --- test/merge1.test | ||
| +++ test/merge1.test | ||
| @@ -98,13 +98,13 @@ | ||
| 98 | 98 | 222 - The second line program line in code - 2222 |
| 99 | 99 | 333 - This is a test of the merging algohm - 3333 |
| 100 | 100 | 444 - If all goes well, we will be pleased - 4444 |
| 101 | 101 | 555 - we think it well and other stuff too - 5555 |
| 102 | 102 | } |
| 103 | -fossil 3-way-merge t1 t3 t2 a32 | |
| 103 | +fossil 3-way-merge t1 t3 t2 a32 -expectError | |
| 104 | 104 | test merge1-2.1 {[same_file t32 a32]} |
| 105 | -fossil 3-way-merge t1 t2 t3 a23 | |
| 105 | +fossil 3-way-merge t1 t2 t3 a23 -expectError | |
| 106 | 106 | test merge1-2.2 {[same_file t23 a23]} |
| 107 | 107 | |
| 108 | 108 | write_file_indented t1 { |
| 109 | 109 | 111 - This is line one of the demo program - 1111 |
| 110 | 110 | 222 - The second line program line in code - 2222 |
| @@ -183,13 +183,13 @@ | ||
| 183 | 183 | 222 - The second line program line in code - 2222 |
| 184 | 184 | 333 - This is a test of the merging algohm - 3333 |
| 185 | 185 | 444 - If all goes well, we will be pleased - 4444 |
| 186 | 186 | 555 - we think it well and other stuff too - 5555 |
| 187 | 187 | } |
| 188 | -fossil 3-way-merge t1 t3 t2 a32 | |
| 188 | +fossil 3-way-merge t1 t3 t2 a32 -expectError | |
| 189 | 189 | test merge1-4.1 {[same_file t32 a32]} |
| 190 | -fossil 3-way-merge t1 t2 t3 a23 | |
| 190 | +fossil 3-way-merge t1 t2 t3 a23 -expectError | |
| 191 | 191 | test merge1-4.2 {[same_file t23 a23]} |
| 192 | 192 | |
| 193 | 193 | write_file_indented t1 { |
| 194 | 194 | 111 - This is line one of the demo program - 1111 |
| 195 | 195 | 222 - The second line program line in code - 2222 |
| @@ -330,11 +330,11 @@ | ||
| 330 | 330 | KLMN |
| 331 | 331 | OPQR |
| 332 | 332 | STUV |
| 333 | 333 | XYZ. |
| 334 | 334 | } |
| 335 | -fossil 3-way-merge t1 t2 t3 a23 | |
| 335 | +fossil 3-way-merge t1 t2 t3 a23 -expectError | |
| 336 | 336 | test merge1-7.1 {[same_file t23 a23]} |
| 337 | 337 | |
| 338 | 338 | write_file_indented t2 { |
| 339 | 339 | abcd |
| 340 | 340 | efgh 2 |
| @@ -398,11 +398,11 @@ | ||
| 398 | 398 | KLMN |
| 399 | 399 | OPQR |
| 400 | 400 | STUV |
| 401 | 401 | XYZ. |
| 402 | 402 | } |
| 403 | -fossil 3-way-merge t1 t2 t3 a23 | |
| 403 | +fossil 3-way-merge t1 t2 t3 a23 -expectError | |
| 404 | 404 | test merge1-7.2 {[same_file t23 a23]} |
| 405 | 405 | |
| 406 | 406 | ############################################################################### |
| 407 | 407 | |
| 408 | 408 | test_cleanup |
| 409 | 409 |
| --- test/merge1.test | |
| +++ test/merge1.test | |
| @@ -98,13 +98,13 @@ | |
| 98 | 222 - The second line program line in code - 2222 |
| 99 | 333 - This is a test of the merging algohm - 3333 |
| 100 | 444 - If all goes well, we will be pleased - 4444 |
| 101 | 555 - we think it well and other stuff too - 5555 |
| 102 | } |
| 103 | fossil 3-way-merge t1 t3 t2 a32 |
| 104 | test merge1-2.1 {[same_file t32 a32]} |
| 105 | fossil 3-way-merge t1 t2 t3 a23 |
| 106 | test merge1-2.2 {[same_file t23 a23]} |
| 107 | |
| 108 | write_file_indented t1 { |
| 109 | 111 - This is line one of the demo program - 1111 |
| 110 | 222 - The second line program line in code - 2222 |
| @@ -183,13 +183,13 @@ | |
| 183 | 222 - The second line program line in code - 2222 |
| 184 | 333 - This is a test of the merging algohm - 3333 |
| 185 | 444 - If all goes well, we will be pleased - 4444 |
| 186 | 555 - we think it well and other stuff too - 5555 |
| 187 | } |
| 188 | fossil 3-way-merge t1 t3 t2 a32 |
| 189 | test merge1-4.1 {[same_file t32 a32]} |
| 190 | fossil 3-way-merge t1 t2 t3 a23 |
| 191 | test merge1-4.2 {[same_file t23 a23]} |
| 192 | |
| 193 | write_file_indented t1 { |
| 194 | 111 - This is line one of the demo program - 1111 |
| 195 | 222 - The second line program line in code - 2222 |
| @@ -330,11 +330,11 @@ | |
| 330 | KLMN |
| 331 | OPQR |
| 332 | STUV |
| 333 | XYZ. |
| 334 | } |
| 335 | fossil 3-way-merge t1 t2 t3 a23 |
| 336 | test merge1-7.1 {[same_file t23 a23]} |
| 337 | |
| 338 | write_file_indented t2 { |
| 339 | abcd |
| 340 | efgh 2 |
| @@ -398,11 +398,11 @@ | |
| 398 | KLMN |
| 399 | OPQR |
| 400 | STUV |
| 401 | XYZ. |
| 402 | } |
| 403 | fossil 3-way-merge t1 t2 t3 a23 |
| 404 | test merge1-7.2 {[same_file t23 a23]} |
| 405 | |
| 406 | ############################################################################### |
| 407 | |
| 408 | test_cleanup |
| 409 |
| --- test/merge1.test | |
| +++ test/merge1.test | |
| @@ -98,13 +98,13 @@ | |
| 98 | 222 - The second line program line in code - 2222 |
| 99 | 333 - This is a test of the merging algohm - 3333 |
| 100 | 444 - If all goes well, we will be pleased - 4444 |
| 101 | 555 - we think it well and other stuff too - 5555 |
| 102 | } |
| 103 | fossil 3-way-merge t1 t3 t2 a32 -expectError |
| 104 | test merge1-2.1 {[same_file t32 a32]} |
| 105 | fossil 3-way-merge t1 t2 t3 a23 -expectError |
| 106 | test merge1-2.2 {[same_file t23 a23]} |
| 107 | |
| 108 | write_file_indented t1 { |
| 109 | 111 - This is line one of the demo program - 1111 |
| 110 | 222 - The second line program line in code - 2222 |
| @@ -183,13 +183,13 @@ | |
| 183 | 222 - The second line program line in code - 2222 |
| 184 | 333 - This is a test of the merging algohm - 3333 |
| 185 | 444 - If all goes well, we will be pleased - 4444 |
| 186 | 555 - we think it well and other stuff too - 5555 |
| 187 | } |
| 188 | fossil 3-way-merge t1 t3 t2 a32 -expectError |
| 189 | test merge1-4.1 {[same_file t32 a32]} |
| 190 | fossil 3-way-merge t1 t2 t3 a23 -expectError |
| 191 | test merge1-4.2 {[same_file t23 a23]} |
| 192 | |
| 193 | write_file_indented t1 { |
| 194 | 111 - This is line one of the demo program - 1111 |
| 195 | 222 - The second line program line in code - 2222 |
| @@ -330,11 +330,11 @@ | |
| 330 | KLMN |
| 331 | OPQR |
| 332 | STUV |
| 333 | XYZ. |
| 334 | } |
| 335 | fossil 3-way-merge t1 t2 t3 a23 -expectError |
| 336 | test merge1-7.1 {[same_file t23 a23]} |
| 337 | |
| 338 | write_file_indented t2 { |
| 339 | abcd |
| 340 | efgh 2 |
| @@ -398,11 +398,11 @@ | |
| 398 | KLMN |
| 399 | OPQR |
| 400 | STUV |
| 401 | XYZ. |
| 402 | } |
| 403 | fossil 3-way-merge t1 t2 t3 a23 -expectError |
| 404 | test merge1-7.2 {[same_file t23 a23]} |
| 405 | |
| 406 | ############################################################################### |
| 407 | |
| 408 | test_cleanup |
| 409 |
+1
-1
| --- test/merge2.test | ||
| +++ test/merge2.test | ||
| @@ -18,11 +18,11 @@ | ||
| 18 | 18 | # Tests of the delta mechanism. |
| 19 | 19 | # |
| 20 | 20 | |
| 21 | 21 | test_setup "" |
| 22 | 22 | |
| 23 | -set filelist [glob $testdir/*] | |
| 23 | +set filelist [lsort [glob $testdir/*]] | |
| 24 | 24 | foreach f $filelist { |
| 25 | 25 | if {[file isdir $f]} continue |
| 26 | 26 | set base [file root [file tail $f]] |
| 27 | 27 | if {[string match "utf16*" $base]} continue |
| 28 | 28 | set f1 [read_file $f] |
| 29 | 29 |
| --- test/merge2.test | |
| +++ test/merge2.test | |
| @@ -18,11 +18,11 @@ | |
| 18 | # Tests of the delta mechanism. |
| 19 | # |
| 20 | |
| 21 | test_setup "" |
| 22 | |
| 23 | set filelist [glob $testdir/*] |
| 24 | foreach f $filelist { |
| 25 | if {[file isdir $f]} continue |
| 26 | set base [file root [file tail $f]] |
| 27 | if {[string match "utf16*" $base]} continue |
| 28 | set f1 [read_file $f] |
| 29 |
| --- test/merge2.test | |
| +++ test/merge2.test | |
| @@ -18,11 +18,11 @@ | |
| 18 | # Tests of the delta mechanism. |
| 19 | # |
| 20 | |
| 21 | test_setup "" |
| 22 | |
| 23 | set filelist [lsort [glob $testdir/*]] |
| 24 | foreach f $filelist { |
| 25 | if {[file isdir $f]} continue |
| 26 | set base [file root [file tail $f]] |
| 27 | if {[string match "utf16*" $base]} continue |
| 28 | set f1 [read_file $f] |
| 29 |
+27
-27
| --- test/merge3.test | ||
| +++ test/merge3.test | ||
| @@ -18,15 +18,15 @@ | ||
| 18 | 18 | # Tests of the 3-way merge |
| 19 | 19 | # |
| 20 | 20 | |
| 21 | 21 | test_setup "" |
| 22 | 22 | |
| 23 | -proc merge-test {testid basis v1 v2 result} { | |
| 23 | +proc merge-test {testid basis v1 v2 result {fossil_args ""}} { | |
| 24 | 24 | write_file t1 [join [string trim $basis] \n]\n |
| 25 | 25 | write_file t2 [join [string trim $v1] \n]\n |
| 26 | 26 | write_file t3 [join [string trim $v2] \n]\n |
| 27 | - fossil 3-way-merge t1 t2 t3 t4 | |
| 27 | + fossil 3-way-merge t1 t2 t3 t4 {*}$fossil_args | |
| 28 | 28 | set x [read_file t4] |
| 29 | 29 | regsub -all \ |
| 30 | 30 | {<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <+ \(line \d+\)} \ |
| 31 | 31 | $x {MINE:} x |
| 32 | 32 | regsub -all \ |
| @@ -74,56 +74,56 @@ | ||
| 74 | 74 | 1 2 3b 4b 5b 6 7 8 9 |
| 75 | 75 | } { |
| 76 | 76 | 1 2 3 4 5c 6 7 8 9 |
| 77 | 77 | } { |
| 78 | 78 | 1 2 MINE: 3b 4b 5b COM: 3 4 5 YOURS: 3 4 5c END 6 7 8 9 |
| 79 | -} | |
| 79 | +} -expectError | |
| 80 | 80 | merge-test 4 { |
| 81 | 81 | 1 2 3 4 5 6 7 8 9 |
| 82 | 82 | } { |
| 83 | 83 | 1 2 3b 4b 5b 6b 7 8 9 |
| 84 | 84 | } { |
| 85 | 85 | 1 2 3 4 5c 6 7 8 9 |
| 86 | 86 | } { |
| 87 | 87 | 1 2 MINE: 3b 4b 5b 6b COM: 3 4 5 6 YOURS: 3 4 5c 6 END 7 8 9 |
| 88 | -} | |
| 88 | +} -expectError | |
| 89 | 89 | merge-test 5 { |
| 90 | 90 | 1 2 3 4 5 6 7 8 9 |
| 91 | 91 | } { |
| 92 | 92 | 1 2 3b 4b 5b 6b 7 8 9 |
| 93 | 93 | } { |
| 94 | 94 | 1 2 3 4 5c 6c 7c 8 9 |
| 95 | 95 | } { |
| 96 | 96 | 1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8 9 |
| 97 | -} | |
| 97 | +} -expectError | |
| 98 | 98 | merge-test 6 { |
| 99 | 99 | 1 2 3 4 5 6 7 8 9 |
| 100 | 100 | } { |
| 101 | 101 | 1 2 3b 4b 5b 6b 7 8b 9 |
| 102 | 102 | } { |
| 103 | 103 | 1 2 3 4 5c 6c 7c 8 9 |
| 104 | 104 | } { |
| 105 | 105 | 1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8b 9 |
| 106 | -} | |
| 106 | +} -expectError | |
| 107 | 107 | merge-test 7 { |
| 108 | 108 | 1 2 3 4 5 6 7 8 9 |
| 109 | 109 | } { |
| 110 | 110 | 1 2 3b 4b 5b 6b 7 8b 9 |
| 111 | 111 | } { |
| 112 | 112 | 1 2 3 4 5c 6c 7c 8c 9 |
| 113 | 113 | } { |
| 114 | 114 | 1 2 MINE: 3b 4b 5b 6b 7 8b COM: 3 4 5 6 7 8 YOURS: 3 4 5c 6c 7c 8c END 9 |
| 115 | -} | |
| 115 | +} -expectError | |
| 116 | 116 | merge-test 8 { |
| 117 | 117 | 1 2 3 4 5 6 7 8 9 |
| 118 | 118 | } { |
| 119 | 119 | 1 2 3b 4b 5b 6b 7 8b 9b |
| 120 | 120 | } { |
| 121 | 121 | 1 2 3 4 5c 6c 7c 8c 9 |
| 122 | 122 | } { |
| 123 | 123 | 1 2 MINE: 3b 4b 5b 6b 7 8b 9b COM: 3 4 5 6 7 8 9 YOURS: 3 4 5c 6c 7c 8c 9 END |
| 124 | -} | |
| 124 | +} -expectError | |
| 125 | 125 | merge-test 9 { |
| 126 | 126 | 1 2 3 4 5 6 7 8 9 |
| 127 | 127 | } { |
| 128 | 128 | 1 2 3b 4b 5 6 7 8b 9b |
| 129 | 129 | } { |
| @@ -147,11 +147,11 @@ | ||
| 147 | 147 | 1 2 3b 4b 5 6 7 8b 9b |
| 148 | 148 | } { |
| 149 | 149 | 1 2 3b 4c 5 6c 7c 8 9 |
| 150 | 150 | } { |
| 151 | 151 | 1 2 MINE: 3b 4b COM: 3 4 YOURS: 3b 4c END 5 6c 7c 8b 9b |
| 152 | -} | |
| 152 | +} -expectError | |
| 153 | 153 | merge-test 12 { |
| 154 | 154 | 1 2 3 4 5 6 7 8 9 |
| 155 | 155 | } { |
| 156 | 156 | 1 2 3b4b 5 6 7 8b 9b |
| 157 | 157 | } { |
| @@ -202,20 +202,20 @@ | ||
| 202 | 202 | 1 6 7 8 9 |
| 203 | 203 | } { |
| 204 | 204 | 1 2 3 4 9 |
| 205 | 205 | } { |
| 206 | 206 | 1 MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9 |
| 207 | -} | |
| 207 | +} -expectError | |
| 208 | 208 | merge-test 25 { |
| 209 | 209 | 1 2 3 4 5 6 7 8 9 |
| 210 | 210 | } { |
| 211 | 211 | 1 7 8 9 |
| 212 | 212 | } { |
| 213 | 213 | 1 2 3 9 |
| 214 | 214 | } { |
| 215 | 215 | 1 MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9 |
| 216 | -} | |
| 216 | +} -expectError | |
| 217 | 217 | |
| 218 | 218 | merge-test 30 { |
| 219 | 219 | 1 2 3 4 5 6 7 8 9 |
| 220 | 220 | } { |
| 221 | 221 | 1 2 3 4 5 6 7 9 |
| @@ -257,20 +257,20 @@ | ||
| 257 | 257 | 1 2 3 4 9 |
| 258 | 258 | } { |
| 259 | 259 | 1 6 7 8 9 |
| 260 | 260 | } { |
| 261 | 261 | 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END 9 |
| 262 | -} | |
| 262 | +} -expectError | |
| 263 | 263 | merge-test 35 { |
| 264 | 264 | 1 2 3 4 5 6 7 8 9 |
| 265 | 265 | } { |
| 266 | 266 | 1 2 3 9 |
| 267 | 267 | } { |
| 268 | 268 | 1 7 8 9 |
| 269 | 269 | } { |
| 270 | 270 | 1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END 9 |
| 271 | -} | |
| 271 | +} -expectError | |
| 272 | 272 | |
| 273 | 273 | merge-test 40 { |
| 274 | 274 | 2 3 4 5 6 7 8 |
| 275 | 275 | } { |
| 276 | 276 | 3 4 5 6 7 8 |
| @@ -312,20 +312,20 @@ | ||
| 312 | 312 | 6 7 8 |
| 313 | 313 | } { |
| 314 | 314 | 2 3 4 |
| 315 | 315 | } { |
| 316 | 316 | MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END |
| 317 | -} | |
| 317 | +} -expectError | |
| 318 | 318 | merge-test 45 { |
| 319 | 319 | 2 3 4 5 6 7 8 |
| 320 | 320 | } { |
| 321 | 321 | 7 8 |
| 322 | 322 | } { |
| 323 | 323 | 2 3 |
| 324 | 324 | } { |
| 325 | 325 | MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END |
| 326 | -} | |
| 326 | +} -expectError | |
| 327 | 327 | |
| 328 | 328 | merge-test 50 { |
| 329 | 329 | 2 3 4 5 6 7 8 |
| 330 | 330 | } { |
| 331 | 331 | 2 3 4 5 6 7 |
| @@ -366,20 +366,20 @@ | ||
| 366 | 366 | 2 3 4 |
| 367 | 367 | } { |
| 368 | 368 | 6 7 8 |
| 369 | 369 | } { |
| 370 | 370 | MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END |
| 371 | -} | |
| 371 | +} -expectError | |
| 372 | 372 | merge-test 55 { |
| 373 | 373 | 2 3 4 5 6 7 8 |
| 374 | 374 | } { |
| 375 | 375 | 2 3 |
| 376 | 376 | } { |
| 377 | 377 | 7 8 |
| 378 | 378 | } { |
| 379 | 379 | MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END |
| 380 | -} | |
| 380 | +} -expectError | |
| 381 | 381 | |
| 382 | 382 | merge-test 60 { |
| 383 | 383 | 1 2 3 4 5 6 7 8 9 |
| 384 | 384 | } { |
| 385 | 385 | 1 2b 3 4 5 6 7 8 9 |
| @@ -421,20 +421,20 @@ | ||
| 421 | 421 | 1 2b 3b 4b 5b 6 7 8 9 |
| 422 | 422 | } { |
| 423 | 423 | 1 2 3 4 9 |
| 424 | 424 | } { |
| 425 | 425 | 1 MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9 |
| 426 | -} | |
| 426 | +} -expectError | |
| 427 | 427 | merge-test 65 { |
| 428 | 428 | 1 2 3 4 5 6 7 8 9 |
| 429 | 429 | } { |
| 430 | 430 | 1 2b 3b 4b 5b 6b 7 8 9 |
| 431 | 431 | } { |
| 432 | 432 | 1 2 3 9 |
| 433 | 433 | } { |
| 434 | 434 | 1 MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9 |
| 435 | -} | |
| 435 | +} -expectError | |
| 436 | 436 | |
| 437 | 437 | merge-test 70 { |
| 438 | 438 | 1 2 3 4 5 6 7 8 9 |
| 439 | 439 | } { |
| 440 | 440 | 1 2 3 4 5 6 7 9 |
| @@ -476,20 +476,20 @@ | ||
| 476 | 476 | 1 2 3 4 9 |
| 477 | 477 | } { |
| 478 | 478 | 1 2b 3b 4b 5b 6 7 8 9 |
| 479 | 479 | } { |
| 480 | 480 | 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END 9 |
| 481 | -} | |
| 481 | +} -expectError | |
| 482 | 482 | merge-test 75 { |
| 483 | 483 | 1 2 3 4 5 6 7 8 9 |
| 484 | 484 | } { |
| 485 | 485 | 1 2 3 9 |
| 486 | 486 | } { |
| 487 | 487 | 1 2b 3b 4b 5b 6b 7 8 9 |
| 488 | 488 | } { |
| 489 | 489 | 1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END 9 |
| 490 | -} | |
| 490 | +} -expectError | |
| 491 | 491 | |
| 492 | 492 | merge-test 80 { |
| 493 | 493 | 2 3 4 5 6 7 8 |
| 494 | 494 | } { |
| 495 | 495 | 2b 3 4 5 6 7 8 |
| @@ -531,20 +531,20 @@ | ||
| 531 | 531 | 2b 3b 4b 5b 6 7 8 |
| 532 | 532 | } { |
| 533 | 533 | 2 3 4 |
| 534 | 534 | } { |
| 535 | 535 | MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END |
| 536 | -} | |
| 536 | +} -expectError | |
| 537 | 537 | merge-test 85 { |
| 538 | 538 | 2 3 4 5 6 7 8 |
| 539 | 539 | } { |
| 540 | 540 | 2b 3b 4b 5b 6b 7 8 |
| 541 | 541 | } { |
| 542 | 542 | 2 3 |
| 543 | 543 | } { |
| 544 | 544 | MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END |
| 545 | -} | |
| 545 | +} -expectError | |
| 546 | 546 | |
| 547 | 547 | merge-test 90 { |
| 548 | 548 | 2 3 4 5 6 7 8 |
| 549 | 549 | } { |
| 550 | 550 | 2 3 4 5 6 7 |
| @@ -586,20 +586,20 @@ | ||
| 586 | 586 | 2 3 4 |
| 587 | 587 | } { |
| 588 | 588 | 2b 3b 4b 5b 6 7 8 |
| 589 | 589 | } { |
| 590 | 590 | MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END |
| 591 | -} | |
| 591 | +} -expectError | |
| 592 | 592 | merge-test 95 { |
| 593 | 593 | 2 3 4 5 6 7 8 |
| 594 | 594 | } { |
| 595 | 595 | 2 3 |
| 596 | 596 | } { |
| 597 | 597 | 2b 3b 4b 5b 6b 7 8 |
| 598 | 598 | } { |
| 599 | 599 | MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END |
| 600 | -} | |
| 600 | +} -expectError | |
| 601 | 601 | |
| 602 | 602 | merge-test 100 { |
| 603 | 603 | 1 2 3 4 5 6 7 8 9 |
| 604 | 604 | } { |
| 605 | 605 | 1 2b 3 4 5 7 8 9 a b c d e |
| @@ -632,19 +632,19 @@ | ||
| 632 | 632 | 1 2 3 4 5 7 8 9b |
| 633 | 633 | } { |
| 634 | 634 | 1 2 3 4 5 7 8 9b a b c d e |
| 635 | 635 | } { |
| 636 | 636 | 1 2 3 4 5 7 8 MINE: 9b COM: 9 YOURS: 9b a b c d e END |
| 637 | -} | |
| 637 | +} -expectError | |
| 638 | 638 | merge-test 104 { |
| 639 | 639 | 1 2 3 4 5 6 7 8 9 |
| 640 | 640 | } { |
| 641 | 641 | 1 2 3 4 5 7 8 9b a b c d e |
| 642 | 642 | } { |
| 643 | 643 | 1 2 3 4 5 7 8 9b |
| 644 | 644 | } { |
| 645 | 645 | 1 2 3 4 5 7 8 MINE: 9b a b c d e COM: 9 YOURS: 9b END |
| 646 | -} | |
| 646 | +} -expectError | |
| 647 | 647 | |
| 648 | 648 | ############################################################################### |
| 649 | 649 | |
| 650 | 650 | test_cleanup |
| 651 | 651 |
| --- test/merge3.test | |
| +++ test/merge3.test | |
| @@ -18,15 +18,15 @@ | |
| 18 | # Tests of the 3-way merge |
| 19 | # |
| 20 | |
| 21 | test_setup "" |
| 22 | |
| 23 | proc merge-test {testid basis v1 v2 result} { |
| 24 | write_file t1 [join [string trim $basis] \n]\n |
| 25 | write_file t2 [join [string trim $v1] \n]\n |
| 26 | write_file t3 [join [string trim $v2] \n]\n |
| 27 | fossil 3-way-merge t1 t2 t3 t4 |
| 28 | set x [read_file t4] |
| 29 | regsub -all \ |
| 30 | {<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <+ \(line \d+\)} \ |
| 31 | $x {MINE:} x |
| 32 | regsub -all \ |
| @@ -74,56 +74,56 @@ | |
| 74 | 1 2 3b 4b 5b 6 7 8 9 |
| 75 | } { |
| 76 | 1 2 3 4 5c 6 7 8 9 |
| 77 | } { |
| 78 | 1 2 MINE: 3b 4b 5b COM: 3 4 5 YOURS: 3 4 5c END 6 7 8 9 |
| 79 | } |
| 80 | merge-test 4 { |
| 81 | 1 2 3 4 5 6 7 8 9 |
| 82 | } { |
| 83 | 1 2 3b 4b 5b 6b 7 8 9 |
| 84 | } { |
| 85 | 1 2 3 4 5c 6 7 8 9 |
| 86 | } { |
| 87 | 1 2 MINE: 3b 4b 5b 6b COM: 3 4 5 6 YOURS: 3 4 5c 6 END 7 8 9 |
| 88 | } |
| 89 | merge-test 5 { |
| 90 | 1 2 3 4 5 6 7 8 9 |
| 91 | } { |
| 92 | 1 2 3b 4b 5b 6b 7 8 9 |
| 93 | } { |
| 94 | 1 2 3 4 5c 6c 7c 8 9 |
| 95 | } { |
| 96 | 1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8 9 |
| 97 | } |
| 98 | merge-test 6 { |
| 99 | 1 2 3 4 5 6 7 8 9 |
| 100 | } { |
| 101 | 1 2 3b 4b 5b 6b 7 8b 9 |
| 102 | } { |
| 103 | 1 2 3 4 5c 6c 7c 8 9 |
| 104 | } { |
| 105 | 1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8b 9 |
| 106 | } |
| 107 | merge-test 7 { |
| 108 | 1 2 3 4 5 6 7 8 9 |
| 109 | } { |
| 110 | 1 2 3b 4b 5b 6b 7 8b 9 |
| 111 | } { |
| 112 | 1 2 3 4 5c 6c 7c 8c 9 |
| 113 | } { |
| 114 | 1 2 MINE: 3b 4b 5b 6b 7 8b COM: 3 4 5 6 7 8 YOURS: 3 4 5c 6c 7c 8c END 9 |
| 115 | } |
| 116 | merge-test 8 { |
| 117 | 1 2 3 4 5 6 7 8 9 |
| 118 | } { |
| 119 | 1 2 3b 4b 5b 6b 7 8b 9b |
| 120 | } { |
| 121 | 1 2 3 4 5c 6c 7c 8c 9 |
| 122 | } { |
| 123 | 1 2 MINE: 3b 4b 5b 6b 7 8b 9b COM: 3 4 5 6 7 8 9 YOURS: 3 4 5c 6c 7c 8c 9 END |
| 124 | } |
| 125 | merge-test 9 { |
| 126 | 1 2 3 4 5 6 7 8 9 |
| 127 | } { |
| 128 | 1 2 3b 4b 5 6 7 8b 9b |
| 129 | } { |
| @@ -147,11 +147,11 @@ | |
| 147 | 1 2 3b 4b 5 6 7 8b 9b |
| 148 | } { |
| 149 | 1 2 3b 4c 5 6c 7c 8 9 |
| 150 | } { |
| 151 | 1 2 MINE: 3b 4b COM: 3 4 YOURS: 3b 4c END 5 6c 7c 8b 9b |
| 152 | } |
| 153 | merge-test 12 { |
| 154 | 1 2 3 4 5 6 7 8 9 |
| 155 | } { |
| 156 | 1 2 3b4b 5 6 7 8b 9b |
| 157 | } { |
| @@ -202,20 +202,20 @@ | |
| 202 | 1 6 7 8 9 |
| 203 | } { |
| 204 | 1 2 3 4 9 |
| 205 | } { |
| 206 | 1 MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9 |
| 207 | } |
| 208 | merge-test 25 { |
| 209 | 1 2 3 4 5 6 7 8 9 |
| 210 | } { |
| 211 | 1 7 8 9 |
| 212 | } { |
| 213 | 1 2 3 9 |
| 214 | } { |
| 215 | 1 MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9 |
| 216 | } |
| 217 | |
| 218 | merge-test 30 { |
| 219 | 1 2 3 4 5 6 7 8 9 |
| 220 | } { |
| 221 | 1 2 3 4 5 6 7 9 |
| @@ -257,20 +257,20 @@ | |
| 257 | 1 2 3 4 9 |
| 258 | } { |
| 259 | 1 6 7 8 9 |
| 260 | } { |
| 261 | 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END 9 |
| 262 | } |
| 263 | merge-test 35 { |
| 264 | 1 2 3 4 5 6 7 8 9 |
| 265 | } { |
| 266 | 1 2 3 9 |
| 267 | } { |
| 268 | 1 7 8 9 |
| 269 | } { |
| 270 | 1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END 9 |
| 271 | } |
| 272 | |
| 273 | merge-test 40 { |
| 274 | 2 3 4 5 6 7 8 |
| 275 | } { |
| 276 | 3 4 5 6 7 8 |
| @@ -312,20 +312,20 @@ | |
| 312 | 6 7 8 |
| 313 | } { |
| 314 | 2 3 4 |
| 315 | } { |
| 316 | MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END |
| 317 | } |
| 318 | merge-test 45 { |
| 319 | 2 3 4 5 6 7 8 |
| 320 | } { |
| 321 | 7 8 |
| 322 | } { |
| 323 | 2 3 |
| 324 | } { |
| 325 | MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END |
| 326 | } |
| 327 | |
| 328 | merge-test 50 { |
| 329 | 2 3 4 5 6 7 8 |
| 330 | } { |
| 331 | 2 3 4 5 6 7 |
| @@ -366,20 +366,20 @@ | |
| 366 | 2 3 4 |
| 367 | } { |
| 368 | 6 7 8 |
| 369 | } { |
| 370 | MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END |
| 371 | } |
| 372 | merge-test 55 { |
| 373 | 2 3 4 5 6 7 8 |
| 374 | } { |
| 375 | 2 3 |
| 376 | } { |
| 377 | 7 8 |
| 378 | } { |
| 379 | MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END |
| 380 | } |
| 381 | |
| 382 | merge-test 60 { |
| 383 | 1 2 3 4 5 6 7 8 9 |
| 384 | } { |
| 385 | 1 2b 3 4 5 6 7 8 9 |
| @@ -421,20 +421,20 @@ | |
| 421 | 1 2b 3b 4b 5b 6 7 8 9 |
| 422 | } { |
| 423 | 1 2 3 4 9 |
| 424 | } { |
| 425 | 1 MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9 |
| 426 | } |
| 427 | merge-test 65 { |
| 428 | 1 2 3 4 5 6 7 8 9 |
| 429 | } { |
| 430 | 1 2b 3b 4b 5b 6b 7 8 9 |
| 431 | } { |
| 432 | 1 2 3 9 |
| 433 | } { |
| 434 | 1 MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9 |
| 435 | } |
| 436 | |
| 437 | merge-test 70 { |
| 438 | 1 2 3 4 5 6 7 8 9 |
| 439 | } { |
| 440 | 1 2 3 4 5 6 7 9 |
| @@ -476,20 +476,20 @@ | |
| 476 | 1 2 3 4 9 |
| 477 | } { |
| 478 | 1 2b 3b 4b 5b 6 7 8 9 |
| 479 | } { |
| 480 | 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END 9 |
| 481 | } |
| 482 | merge-test 75 { |
| 483 | 1 2 3 4 5 6 7 8 9 |
| 484 | } { |
| 485 | 1 2 3 9 |
| 486 | } { |
| 487 | 1 2b 3b 4b 5b 6b 7 8 9 |
| 488 | } { |
| 489 | 1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END 9 |
| 490 | } |
| 491 | |
| 492 | merge-test 80 { |
| 493 | 2 3 4 5 6 7 8 |
| 494 | } { |
| 495 | 2b 3 4 5 6 7 8 |
| @@ -531,20 +531,20 @@ | |
| 531 | 2b 3b 4b 5b 6 7 8 |
| 532 | } { |
| 533 | 2 3 4 |
| 534 | } { |
| 535 | MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END |
| 536 | } |
| 537 | merge-test 85 { |
| 538 | 2 3 4 5 6 7 8 |
| 539 | } { |
| 540 | 2b 3b 4b 5b 6b 7 8 |
| 541 | } { |
| 542 | 2 3 |
| 543 | } { |
| 544 | MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END |
| 545 | } |
| 546 | |
| 547 | merge-test 90 { |
| 548 | 2 3 4 5 6 7 8 |
| 549 | } { |
| 550 | 2 3 4 5 6 7 |
| @@ -586,20 +586,20 @@ | |
| 586 | 2 3 4 |
| 587 | } { |
| 588 | 2b 3b 4b 5b 6 7 8 |
| 589 | } { |
| 590 | MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END |
| 591 | } |
| 592 | merge-test 95 { |
| 593 | 2 3 4 5 6 7 8 |
| 594 | } { |
| 595 | 2 3 |
| 596 | } { |
| 597 | 2b 3b 4b 5b 6b 7 8 |
| 598 | } { |
| 599 | MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END |
| 600 | } |
| 601 | |
| 602 | merge-test 100 { |
| 603 | 1 2 3 4 5 6 7 8 9 |
| 604 | } { |
| 605 | 1 2b 3 4 5 7 8 9 a b c d e |
| @@ -632,19 +632,19 @@ | |
| 632 | 1 2 3 4 5 7 8 9b |
| 633 | } { |
| 634 | 1 2 3 4 5 7 8 9b a b c d e |
| 635 | } { |
| 636 | 1 2 3 4 5 7 8 MINE: 9b COM: 9 YOURS: 9b a b c d e END |
| 637 | } |
| 638 | merge-test 104 { |
| 639 | 1 2 3 4 5 6 7 8 9 |
| 640 | } { |
| 641 | 1 2 3 4 5 7 8 9b a b c d e |
| 642 | } { |
| 643 | 1 2 3 4 5 7 8 9b |
| 644 | } { |
| 645 | 1 2 3 4 5 7 8 MINE: 9b a b c d e COM: 9 YOURS: 9b END |
| 646 | } |
| 647 | |
| 648 | ############################################################################### |
| 649 | |
| 650 | test_cleanup |
| 651 |
| --- test/merge3.test | |
| +++ test/merge3.test | |
| @@ -18,15 +18,15 @@ | |
| 18 | # Tests of the 3-way merge |
| 19 | # |
| 20 | |
| 21 | test_setup "" |
| 22 | |
| 23 | proc merge-test {testid basis v1 v2 result {fossil_args ""}} { |
| 24 | write_file t1 [join [string trim $basis] \n]\n |
| 25 | write_file t2 [join [string trim $v1] \n]\n |
| 26 | write_file t3 [join [string trim $v2] \n]\n |
| 27 | fossil 3-way-merge t1 t2 t3 t4 {*}$fossil_args |
| 28 | set x [read_file t4] |
| 29 | regsub -all \ |
| 30 | {<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <+ \(line \d+\)} \ |
| 31 | $x {MINE:} x |
| 32 | regsub -all \ |
| @@ -74,56 +74,56 @@ | |
| 74 | 1 2 3b 4b 5b 6 7 8 9 |
| 75 | } { |
| 76 | 1 2 3 4 5c 6 7 8 9 |
| 77 | } { |
| 78 | 1 2 MINE: 3b 4b 5b COM: 3 4 5 YOURS: 3 4 5c END 6 7 8 9 |
| 79 | } -expectError |
| 80 | merge-test 4 { |
| 81 | 1 2 3 4 5 6 7 8 9 |
| 82 | } { |
| 83 | 1 2 3b 4b 5b 6b 7 8 9 |
| 84 | } { |
| 85 | 1 2 3 4 5c 6 7 8 9 |
| 86 | } { |
| 87 | 1 2 MINE: 3b 4b 5b 6b COM: 3 4 5 6 YOURS: 3 4 5c 6 END 7 8 9 |
| 88 | } -expectError |
| 89 | merge-test 5 { |
| 90 | 1 2 3 4 5 6 7 8 9 |
| 91 | } { |
| 92 | 1 2 3b 4b 5b 6b 7 8 9 |
| 93 | } { |
| 94 | 1 2 3 4 5c 6c 7c 8 9 |
| 95 | } { |
| 96 | 1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8 9 |
| 97 | } -expectError |
| 98 | merge-test 6 { |
| 99 | 1 2 3 4 5 6 7 8 9 |
| 100 | } { |
| 101 | 1 2 3b 4b 5b 6b 7 8b 9 |
| 102 | } { |
| 103 | 1 2 3 4 5c 6c 7c 8 9 |
| 104 | } { |
| 105 | 1 2 MINE: 3b 4b 5b 6b 7 COM: 3 4 5 6 7 YOURS: 3 4 5c 6c 7c END 8b 9 |
| 106 | } -expectError |
| 107 | merge-test 7 { |
| 108 | 1 2 3 4 5 6 7 8 9 |
| 109 | } { |
| 110 | 1 2 3b 4b 5b 6b 7 8b 9 |
| 111 | } { |
| 112 | 1 2 3 4 5c 6c 7c 8c 9 |
| 113 | } { |
| 114 | 1 2 MINE: 3b 4b 5b 6b 7 8b COM: 3 4 5 6 7 8 YOURS: 3 4 5c 6c 7c 8c END 9 |
| 115 | } -expectError |
| 116 | merge-test 8 { |
| 117 | 1 2 3 4 5 6 7 8 9 |
| 118 | } { |
| 119 | 1 2 3b 4b 5b 6b 7 8b 9b |
| 120 | } { |
| 121 | 1 2 3 4 5c 6c 7c 8c 9 |
| 122 | } { |
| 123 | 1 2 MINE: 3b 4b 5b 6b 7 8b 9b COM: 3 4 5 6 7 8 9 YOURS: 3 4 5c 6c 7c 8c 9 END |
| 124 | } -expectError |
| 125 | merge-test 9 { |
| 126 | 1 2 3 4 5 6 7 8 9 |
| 127 | } { |
| 128 | 1 2 3b 4b 5 6 7 8b 9b |
| 129 | } { |
| @@ -147,11 +147,11 @@ | |
| 147 | 1 2 3b 4b 5 6 7 8b 9b |
| 148 | } { |
| 149 | 1 2 3b 4c 5 6c 7c 8 9 |
| 150 | } { |
| 151 | 1 2 MINE: 3b 4b COM: 3 4 YOURS: 3b 4c END 5 6c 7c 8b 9b |
| 152 | } -expectError |
| 153 | merge-test 12 { |
| 154 | 1 2 3 4 5 6 7 8 9 |
| 155 | } { |
| 156 | 1 2 3b4b 5 6 7 8b 9b |
| 157 | } { |
| @@ -202,20 +202,20 @@ | |
| 202 | 1 6 7 8 9 |
| 203 | } { |
| 204 | 1 2 3 4 9 |
| 205 | } { |
| 206 | 1 MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9 |
| 207 | } -expectError |
| 208 | merge-test 25 { |
| 209 | 1 2 3 4 5 6 7 8 9 |
| 210 | } { |
| 211 | 1 7 8 9 |
| 212 | } { |
| 213 | 1 2 3 9 |
| 214 | } { |
| 215 | 1 MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9 |
| 216 | } -expectError |
| 217 | |
| 218 | merge-test 30 { |
| 219 | 1 2 3 4 5 6 7 8 9 |
| 220 | } { |
| 221 | 1 2 3 4 5 6 7 9 |
| @@ -257,20 +257,20 @@ | |
| 257 | 1 2 3 4 9 |
| 258 | } { |
| 259 | 1 6 7 8 9 |
| 260 | } { |
| 261 | 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END 9 |
| 262 | } -expectError |
| 263 | merge-test 35 { |
| 264 | 1 2 3 4 5 6 7 8 9 |
| 265 | } { |
| 266 | 1 2 3 9 |
| 267 | } { |
| 268 | 1 7 8 9 |
| 269 | } { |
| 270 | 1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END 9 |
| 271 | } -expectError |
| 272 | |
| 273 | merge-test 40 { |
| 274 | 2 3 4 5 6 7 8 |
| 275 | } { |
| 276 | 3 4 5 6 7 8 |
| @@ -312,20 +312,20 @@ | |
| 312 | 6 7 8 |
| 313 | } { |
| 314 | 2 3 4 |
| 315 | } { |
| 316 | MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END |
| 317 | } -expectError |
| 318 | merge-test 45 { |
| 319 | 2 3 4 5 6 7 8 |
| 320 | } { |
| 321 | 7 8 |
| 322 | } { |
| 323 | 2 3 |
| 324 | } { |
| 325 | MINE: 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END |
| 326 | } -expectError |
| 327 | |
| 328 | merge-test 50 { |
| 329 | 2 3 4 5 6 7 8 |
| 330 | } { |
| 331 | 2 3 4 5 6 7 |
| @@ -366,20 +366,20 @@ | |
| 366 | 2 3 4 |
| 367 | } { |
| 368 | 6 7 8 |
| 369 | } { |
| 370 | MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END |
| 371 | } -expectError |
| 372 | merge-test 55 { |
| 373 | 2 3 4 5 6 7 8 |
| 374 | } { |
| 375 | 2 3 |
| 376 | } { |
| 377 | 7 8 |
| 378 | } { |
| 379 | MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 7 8 END |
| 380 | } -expectError |
| 381 | |
| 382 | merge-test 60 { |
| 383 | 1 2 3 4 5 6 7 8 9 |
| 384 | } { |
| 385 | 1 2b 3 4 5 6 7 8 9 |
| @@ -421,20 +421,20 @@ | |
| 421 | 1 2b 3b 4b 5b 6 7 8 9 |
| 422 | } { |
| 423 | 1 2 3 4 9 |
| 424 | } { |
| 425 | 1 MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9 |
| 426 | } -expectError |
| 427 | merge-test 65 { |
| 428 | 1 2 3 4 5 6 7 8 9 |
| 429 | } { |
| 430 | 1 2b 3b 4b 5b 6b 7 8 9 |
| 431 | } { |
| 432 | 1 2 3 9 |
| 433 | } { |
| 434 | 1 MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END 9 |
| 435 | } -expectError |
| 436 | |
| 437 | merge-test 70 { |
| 438 | 1 2 3 4 5 6 7 8 9 |
| 439 | } { |
| 440 | 1 2 3 4 5 6 7 9 |
| @@ -476,20 +476,20 @@ | |
| 476 | 1 2 3 4 9 |
| 477 | } { |
| 478 | 1 2b 3b 4b 5b 6 7 8 9 |
| 479 | } { |
| 480 | 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END 9 |
| 481 | } -expectError |
| 482 | merge-test 75 { |
| 483 | 1 2 3 4 5 6 7 8 9 |
| 484 | } { |
| 485 | 1 2 3 9 |
| 486 | } { |
| 487 | 1 2b 3b 4b 5b 6b 7 8 9 |
| 488 | } { |
| 489 | 1 MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END 9 |
| 490 | } -expectError |
| 491 | |
| 492 | merge-test 80 { |
| 493 | 2 3 4 5 6 7 8 |
| 494 | } { |
| 495 | 2b 3 4 5 6 7 8 |
| @@ -531,20 +531,20 @@ | |
| 531 | 2b 3b 4b 5b 6 7 8 |
| 532 | } { |
| 533 | 2 3 4 |
| 534 | } { |
| 535 | MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END |
| 536 | } -expectError |
| 537 | merge-test 85 { |
| 538 | 2 3 4 5 6 7 8 |
| 539 | } { |
| 540 | 2b 3b 4b 5b 6b 7 8 |
| 541 | } { |
| 542 | 2 3 |
| 543 | } { |
| 544 | MINE: 2b 3b 4b 5b 6b 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 END |
| 545 | } -expectError |
| 546 | |
| 547 | merge-test 90 { |
| 548 | 2 3 4 5 6 7 8 |
| 549 | } { |
| 550 | 2 3 4 5 6 7 |
| @@ -586,20 +586,20 @@ | |
| 586 | 2 3 4 |
| 587 | } { |
| 588 | 2b 3b 4b 5b 6 7 8 |
| 589 | } { |
| 590 | MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END |
| 591 | } -expectError |
| 592 | merge-test 95 { |
| 593 | 2 3 4 5 6 7 8 |
| 594 | } { |
| 595 | 2 3 |
| 596 | } { |
| 597 | 2b 3b 4b 5b 6b 7 8 |
| 598 | } { |
| 599 | MINE: 2 3 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6b 7 8 END |
| 600 | } -expectError |
| 601 | |
| 602 | merge-test 100 { |
| 603 | 1 2 3 4 5 6 7 8 9 |
| 604 | } { |
| 605 | 1 2b 3 4 5 7 8 9 a b c d e |
| @@ -632,19 +632,19 @@ | |
| 632 | 1 2 3 4 5 7 8 9b |
| 633 | } { |
| 634 | 1 2 3 4 5 7 8 9b a b c d e |
| 635 | } { |
| 636 | 1 2 3 4 5 7 8 MINE: 9b COM: 9 YOURS: 9b a b c d e END |
| 637 | } -expectError |
| 638 | merge-test 104 { |
| 639 | 1 2 3 4 5 6 7 8 9 |
| 640 | } { |
| 641 | 1 2 3 4 5 7 8 9b a b c d e |
| 642 | } { |
| 643 | 1 2 3 4 5 7 8 9b |
| 644 | } { |
| 645 | 1 2 3 4 5 7 8 MINE: 9b a b c d e COM: 9 YOURS: 9b END |
| 646 | } -expectError |
| 647 | |
| 648 | ############################################################################### |
| 649 | |
| 650 | test_cleanup |
| 651 |
+5
-5
| --- test/merge4.test | ||
| +++ test/merge4.test | ||
| @@ -18,16 +18,16 @@ | ||
| 18 | 18 | # Tests of the 3-way merge |
| 19 | 19 | # |
| 20 | 20 | |
| 21 | 21 | test_setup "" |
| 22 | 22 | |
| 23 | -proc merge-test {testid basis v1 v2 result1 result2} { | |
| 23 | +proc merge-test {testid basis v1 v2 result1 result2 {fossil_args ""}} { | |
| 24 | 24 | write_file t1 [join [string trim $basis] \n]\n |
| 25 | 25 | write_file t2 [join [string trim $v1] \n]\n |
| 26 | 26 | write_file t3 [join [string trim $v2] \n]\n |
| 27 | - fossil 3-way-merge t1 t2 t3 t4 | |
| 28 | - fossil 3-way-merge t1 t3 t2 t5 | |
| 27 | + fossil 3-way-merge t1 t2 t3 t4 {*}$fossil_args | |
| 28 | + fossil 3-way-merge t1 t3 t2 t5 {*}$fossil_args | |
| 29 | 29 | set x [read_file t4] |
| 30 | 30 | regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<< \(line \d+\)} $x {>} x |
| 31 | 31 | regsub -all {\|\|\|\|\|\|\|.*======= \(line \d+\)} $x {=} x |
| 32 | 32 | regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x |
| 33 | 33 | set x [split [string trim $x] \n] |
| @@ -61,11 +61,11 @@ | ||
| 61 | 61 | 1 2 3 4c 5c 6c 7 8 9 |
| 62 | 62 | } { |
| 63 | 63 | 1 > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < 9 |
| 64 | 64 | } { |
| 65 | 65 | 1 > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < 9 |
| 66 | -} | |
| 66 | +} -expectError | |
| 67 | 67 | merge-test 1001 { |
| 68 | 68 | 1 2 3 4 5 6 7 8 9 |
| 69 | 69 | } { |
| 70 | 70 | 1 2b 3b 4 5 6 7b 8b 9 |
| 71 | 71 | } { |
| @@ -83,11 +83,11 @@ | ||
| 83 | 83 | 2 3 4c 5c 6c 7 8 |
| 84 | 84 | } { |
| 85 | 85 | > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < |
| 86 | 86 | } { |
| 87 | 87 | > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < |
| 88 | -} | |
| 88 | +} -expectError | |
| 89 | 89 | merge-test 1003 { |
| 90 | 90 | 2 3 4 5 6 7 8 |
| 91 | 91 | } { |
| 92 | 92 | 2b 3b 4 5 6 7b 8b |
| 93 | 93 | } { |
| 94 | 94 |
| --- test/merge4.test | |
| +++ test/merge4.test | |
| @@ -18,16 +18,16 @@ | |
| 18 | # Tests of the 3-way merge |
| 19 | # |
| 20 | |
| 21 | test_setup "" |
| 22 | |
| 23 | proc merge-test {testid basis v1 v2 result1 result2} { |
| 24 | write_file t1 [join [string trim $basis] \n]\n |
| 25 | write_file t2 [join [string trim $v1] \n]\n |
| 26 | write_file t3 [join [string trim $v2] \n]\n |
| 27 | fossil 3-way-merge t1 t2 t3 t4 |
| 28 | fossil 3-way-merge t1 t3 t2 t5 |
| 29 | set x [read_file t4] |
| 30 | regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<< \(line \d+\)} $x {>} x |
| 31 | regsub -all {\|\|\|\|\|\|\|.*======= \(line \d+\)} $x {=} x |
| 32 | regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x |
| 33 | set x [split [string trim $x] \n] |
| @@ -61,11 +61,11 @@ | |
| 61 | 1 2 3 4c 5c 6c 7 8 9 |
| 62 | } { |
| 63 | 1 > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < 9 |
| 64 | } { |
| 65 | 1 > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < 9 |
| 66 | } |
| 67 | merge-test 1001 { |
| 68 | 1 2 3 4 5 6 7 8 9 |
| 69 | } { |
| 70 | 1 2b 3b 4 5 6 7b 8b 9 |
| 71 | } { |
| @@ -83,11 +83,11 @@ | |
| 83 | 2 3 4c 5c 6c 7 8 |
| 84 | } { |
| 85 | > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < |
| 86 | } { |
| 87 | > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < |
| 88 | } |
| 89 | merge-test 1003 { |
| 90 | 2 3 4 5 6 7 8 |
| 91 | } { |
| 92 | 2b 3b 4 5 6 7b 8b |
| 93 | } { |
| 94 |
| --- test/merge4.test | |
| +++ test/merge4.test | |
| @@ -18,16 +18,16 @@ | |
| 18 | # Tests of the 3-way merge |
| 19 | # |
| 20 | |
| 21 | test_setup "" |
| 22 | |
| 23 | proc merge-test {testid basis v1 v2 result1 result2 {fossil_args ""}} { |
| 24 | write_file t1 [join [string trim $basis] \n]\n |
| 25 | write_file t2 [join [string trim $v1] \n]\n |
| 26 | write_file t3 [join [string trim $v2] \n]\n |
| 27 | fossil 3-way-merge t1 t2 t3 t4 {*}$fossil_args |
| 28 | fossil 3-way-merge t1 t3 t2 t5 {*}$fossil_args |
| 29 | set x [read_file t4] |
| 30 | regsub -all {<<<<<<< BEGIN MERGE CONFLICT.*<< \(line \d+\)} $x {>} x |
| 31 | regsub -all {\|\|\|\|\|\|\|.*======= \(line \d+\)} $x {=} x |
| 32 | regsub -all {>>>>>>> END MERGE CONFLICT.*>>>>} $x {<} x |
| 33 | set x [split [string trim $x] \n] |
| @@ -61,11 +61,11 @@ | |
| 61 | 1 2 3 4c 5c 6c 7 8 9 |
| 62 | } { |
| 63 | 1 > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < 9 |
| 64 | } { |
| 65 | 1 > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < 9 |
| 66 | } -expectError |
| 67 | merge-test 1001 { |
| 68 | 1 2 3 4 5 6 7 8 9 |
| 69 | } { |
| 70 | 1 2b 3b 4 5 6 7b 8b 9 |
| 71 | } { |
| @@ -83,11 +83,11 @@ | |
| 83 | 2 3 4c 5c 6c 7 8 |
| 84 | } { |
| 85 | > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < |
| 86 | } { |
| 87 | > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < |
| 88 | } -expectError |
| 89 | merge-test 1003 { |
| 90 | 2 3 4 5 6 7 8 |
| 91 | } { |
| 92 | 2b 3b 4 5 6 7b 8b |
| 93 | } { |
| 94 |
+3
-1
| --- test/merge5.test | ||
| +++ test/merge5.test | ||
| @@ -16,11 +16,13 @@ | ||
| 16 | 16 | ############################################################################ |
| 17 | 17 | # |
| 18 | 18 | # Tests of the "merge" command |
| 19 | 19 | # |
| 20 | 20 | |
| 21 | -puts "Skipping Merge5 tests" | |
| 21 | +if {! $::QUIET} { | |
| 22 | + puts "Skipping Merge5 tests" | |
| 23 | +} | |
| 22 | 24 | protOut { |
| 23 | 25 | fossil sqlite3 --no-repository reacts badly to SQL dumped from |
| 24 | 26 | repositories created from fossil older than version 2.0. |
| 25 | 27 | } |
| 26 | 28 | test merge5-sqlite3-issue false knownBug |
| 27 | 29 |
| --- test/merge5.test | |
| +++ test/merge5.test | |
| @@ -16,11 +16,13 @@ | |
| 16 | ############################################################################ |
| 17 | # |
| 18 | # Tests of the "merge" command |
| 19 | # |
| 20 | |
| 21 | puts "Skipping Merge5 tests" |
| 22 | protOut { |
| 23 | fossil sqlite3 --no-repository reacts badly to SQL dumped from |
| 24 | repositories created from fossil older than version 2.0. |
| 25 | } |
| 26 | test merge5-sqlite3-issue false knownBug |
| 27 |
| --- test/merge5.test | |
| +++ test/merge5.test | |
| @@ -16,11 +16,13 @@ | |
| 16 | ############################################################################ |
| 17 | # |
| 18 | # Tests of the "merge" command |
| 19 | # |
| 20 | |
| 21 | if {! $::QUIET} { |
| 22 | puts "Skipping Merge5 tests" |
| 23 | } |
| 24 | protOut { |
| 25 | fossil sqlite3 --no-repository reacts badly to SQL dumped from |
| 26 | repositories created from fossil older than version 2.0. |
| 27 | } |
| 28 | test merge5-sqlite3-issue false knownBug |
| 29 |
+3
-3
| --- test/merge_renames.test | ||
| +++ test/merge_renames.test | ||
| @@ -262,19 +262,19 @@ | ||
| 262 | 262 | fossil add f1 |
| 263 | 263 | fossil commit -b b2 -m "add f1" |
| 264 | 264 | |
| 265 | 265 | fossil update trunk |
| 266 | 266 | fossil merge b1 |
| 267 | -fossil merge b2 | |
| 267 | +fossil merge b2 -expectError | |
| 268 | 268 | test_status_list merge_renames-8-1 $RESULT { |
| 269 | 269 | MERGE f1 |
| 270 | 270 | WARNING: 1 merge conflicts |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | fossil revert |
| 274 | 274 | fossil merge --integrate b1 |
| 275 | -fossil merge b2 | |
| 275 | +fossil merge b2 -expectError | |
| 276 | 276 | test_status_list merge_renames-8-2 $RESULT { |
| 277 | 277 | MERGE f1 |
| 278 | 278 | WARNING: 1 merge conflicts |
| 279 | 279 | } |
| 280 | 280 | |
| @@ -322,11 +322,11 @@ | ||
| 322 | 322 | fossil undo |
| 323 | 323 | test_status_list merge_renames-9-5 $RESULT { |
| 324 | 324 | UNDO f1 |
| 325 | 325 | UNDO f2 |
| 326 | 326 | } |
| 327 | -fossil merge -n b | |
| 327 | +fossil merge -n b -expectError | |
| 328 | 328 | test_status_list merge_renames-9-6 $RESULT " |
| 329 | 329 | $expectedMerge |
| 330 | 330 | REMINDER: this was a dry run - no files were actually changed. |
| 331 | 331 | " |
| 332 | 332 | test merge_renames-9-7 {[fossil changes] eq ""} |
| 333 | 333 |
| --- test/merge_renames.test | |
| +++ test/merge_renames.test | |
| @@ -262,19 +262,19 @@ | |
| 262 | fossil add f1 |
| 263 | fossil commit -b b2 -m "add f1" |
| 264 | |
| 265 | fossil update trunk |
| 266 | fossil merge b1 |
| 267 | fossil merge b2 |
| 268 | test_status_list merge_renames-8-1 $RESULT { |
| 269 | MERGE f1 |
| 270 | WARNING: 1 merge conflicts |
| 271 | } |
| 272 | |
| 273 | fossil revert |
| 274 | fossil merge --integrate b1 |
| 275 | fossil merge b2 |
| 276 | test_status_list merge_renames-8-2 $RESULT { |
| 277 | MERGE f1 |
| 278 | WARNING: 1 merge conflicts |
| 279 | } |
| 280 | |
| @@ -322,11 +322,11 @@ | |
| 322 | fossil undo |
| 323 | test_status_list merge_renames-9-5 $RESULT { |
| 324 | UNDO f1 |
| 325 | UNDO f2 |
| 326 | } |
| 327 | fossil merge -n b |
| 328 | test_status_list merge_renames-9-6 $RESULT " |
| 329 | $expectedMerge |
| 330 | REMINDER: this was a dry run - no files were actually changed. |
| 331 | " |
| 332 | test merge_renames-9-7 {[fossil changes] eq ""} |
| 333 |
| --- test/merge_renames.test | |
| +++ test/merge_renames.test | |
| @@ -262,19 +262,19 @@ | |
| 262 | fossil add f1 |
| 263 | fossil commit -b b2 -m "add f1" |
| 264 | |
| 265 | fossil update trunk |
| 266 | fossil merge b1 |
| 267 | fossil merge b2 -expectError |
| 268 | test_status_list merge_renames-8-1 $RESULT { |
| 269 | MERGE f1 |
| 270 | WARNING: 1 merge conflicts |
| 271 | } |
| 272 | |
| 273 | fossil revert |
| 274 | fossil merge --integrate b1 |
| 275 | fossil merge b2 -expectError |
| 276 | test_status_list merge_renames-8-2 $RESULT { |
| 277 | MERGE f1 |
| 278 | WARNING: 1 merge conflicts |
| 279 | } |
| 280 | |
| @@ -322,11 +322,11 @@ | |
| 322 | fossil undo |
| 323 | test_status_list merge_renames-9-5 $RESULT { |
| 324 | UNDO f1 |
| 325 | UNDO f2 |
| 326 | } |
| 327 | fossil merge -n b -expectError |
| 328 | test_status_list merge_renames-9-6 $RESULT " |
| 329 | $expectedMerge |
| 330 | REMINDER: this was a dry run - no files were actually changed. |
| 331 | " |
| 332 | test merge_renames-9-7 {[fossil changes] eq ""} |
| 333 |
+1
-1
| --- test/merge_warn.test | ||
| +++ test/merge_warn.test | ||
| @@ -40,11 +40,11 @@ | ||
| 40 | 40 | fossil commit -m "add f4" |
| 41 | 41 | |
| 42 | 42 | fossil update trunk |
| 43 | 43 | write_file f1 "f1.1" |
| 44 | 44 | write_file f3 "f3.1" |
| 45 | -fossil merge --integrate mrg | |
| 45 | +fossil merge --integrate mrg -expectError | |
| 46 | 46 | test_status_list merge_warn-1 $RESULT { |
| 47 | 47 | WARNING: 1 unmanaged files were overwritten |
| 48 | 48 | WARNING: 2 merge conflicts |
| 49 | 49 | DELETE f1 |
| 50 | 50 | MERGE f2 |
| 51 | 51 | |
| 52 | 52 | ADDED test/rewrite-test-output.tcl |
| --- test/merge_warn.test | |
| +++ test/merge_warn.test | |
| @@ -40,11 +40,11 @@ | |
| 40 | fossil commit -m "add f4" |
| 41 | |
| 42 | fossil update trunk |
| 43 | write_file f1 "f1.1" |
| 44 | write_file f3 "f3.1" |
| 45 | fossil merge --integrate mrg |
| 46 | test_status_list merge_warn-1 $RESULT { |
| 47 | WARNING: 1 unmanaged files were overwritten |
| 48 | WARNING: 2 merge conflicts |
| 49 | DELETE f1 |
| 50 | MERGE f2 |
| 51 | |
| 52 | DDED test/rewrite-test-output.tcl |
| --- test/merge_warn.test | |
| +++ test/merge_warn.test | |
| @@ -40,11 +40,11 @@ | |
| 40 | fossil commit -m "add f4" |
| 41 | |
| 42 | fossil update trunk |
| 43 | write_file f1 "f1.1" |
| 44 | write_file f3 "f3.1" |
| 45 | fossil merge --integrate mrg -expectError |
| 46 | test_status_list merge_warn-1 $RESULT { |
| 47 | WARNING: 1 unmanaged files were overwritten |
| 48 | WARNING: 2 merge conflicts |
| 49 | DELETE f1 |
| 50 | MERGE f2 |
| 51 | |
| 52 | DDED test/rewrite-test-output.tcl |
| --- a/test/rewrite-test-output.tcl | ||
| +++ b/test/rewrite-test-output.tcl | ||
| @@ -0,0 +1,13 @@ | ||
| 1 | +#!/usr/bin/env tclsh | |
| 2 | + | |
| 3 | +# Script to anonymise test results for comparison. | |
| 4 | +# - Replaces hashes, pids and similar with fixed strings | |
| 5 | +# - Rewrites temporary paths to standardise them in output | |
| 6 | + | |
| 7 | +# Pick up options | |
| 8 | +set EXTRA 0 | |
| 9 | +set i [lsearch $argv -extra] | |
| 10 | +while { $i >= 0 } { | |
| 11 | + incr EXTRA | |
| 12 | + set argv [lreplace $argv $i $i] | |
| 13 | + set i [lsearch $ |
| --- a/test/rewrite-test-output.tcl | |
| +++ b/test/rewrite-test-output.tcl | |
| @@ -0,0 +1,13 @@ | |
| --- a/test/rewrite-test-output.tcl | |
| +++ b/test/rewrite-test-output.tcl | |
| @@ -0,0 +1,13 @@ | |
| 1 | #!/usr/bin/env tclsh |
| 2 | |
| 3 | # Script to anonymise test results for comparison. |
| 4 | # - Replaces hashes, pids and similar with fixed strings |
| 5 | # - Rewrites temporary paths to standardise them in output |
| 6 | |
| 7 | # Pick up options |
| 8 | set EXTRA 0 |
| 9 | set i [lsearch $argv -extra] |
| 10 | while { $i >= 0 } { |
| 11 | incr EXTRA |
| 12 | set argv [lreplace $argv $i $i] |
| 13 | set i [lsearch $ |
+5
-5
| --- test/set-manifest.test | ||
| +++ test/set-manifest.test | ||
| @@ -46,21 +46,21 @@ | ||
| 46 | 46 | #### Verify classic behavior of the manifest setting |
| 47 | 47 | |
| 48 | 48 | # Setting is off by default, and there are no extra files. |
| 49 | 49 | fossil settings manifest |
| 50 | 50 | test "set-manifest-1" {[regexp {^manifest *$} $RESULT]} |
| 51 | -set filelist [glob -nocomplain manifest*] | |
| 51 | +set filelist [lsort [glob -nocomplain manifest*]] | |
| 52 | 52 | test "set-manifest-1-n" {[llength $filelist] == 0} |
| 53 | 53 | |
| 54 | 54 | # Classic behavior: TRUE value creates manifest and manifest.uuid |
| 55 | 55 | set truths [list true on 1] |
| 56 | 56 | foreach v $truths { |
| 57 | 57 | fossil settings manifest $v |
| 58 | 58 | test "set-manifest-2-$v" {$RESULT eq ""} |
| 59 | 59 | fossil settings manifest |
| 60 | 60 | test "set-manifest-2-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 61 | - set filelist [glob manifest*] | |
| 61 | + set filelist [lsort [glob manifest*]] | |
| 62 | 62 | test "set-manifest-2-$v-n" {[llength $filelist] == 2} |
| 63 | 63 | foreach f $filelist { |
| 64 | 64 | test "set-manifest-2-$v-f-$f" {[file isfile $f]} |
| 65 | 65 | } |
| 66 | 66 | } |
| @@ -88,21 +88,21 @@ | ||
| 88 | 88 | foreach v $falses { |
| 89 | 89 | fossil settings manifest $v |
| 90 | 90 | test "set-manifest-3-$v" {$RESULT eq ""} |
| 91 | 91 | fossil settings manifest |
| 92 | 92 | test "set-manifest-3-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 93 | - set filelist [glob -nocomplain manifest*] | |
| 93 | + set filelist [lsort [glob -nocomplain manifest*]] | |
| 94 | 94 | test "set-manifest-3-$v-n" {[llength $filelist] == 0} |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | |
| 98 | 98 | # Classic behavior: unset removes manifest and manifest.uuid |
| 99 | 99 | fossil unset manifest |
| 100 | 100 | test "set-manifest-4" {$RESULT eq ""} |
| 101 | 101 | fossil settings manifest |
| 102 | 102 | test "set-manifest-4-a" {[regexp {^manifest *$} $RESULT]} |
| 103 | -set filelist [glob -nocomplain manifest*] | |
| 103 | +set filelist [lsort [glob -nocomplain manifest*]] | |
| 104 | 104 | test "set-manifest-4-n" {[llength $filelist] == 0} |
| 105 | 105 | |
| 106 | 106 | |
| 107 | 107 | ##### Tags Manifest feature extends the manifest setting |
| 108 | 108 | |
| @@ -112,11 +112,11 @@ | ||
| 112 | 112 | foreach v $truths { |
| 113 | 113 | fossil settings manifest $v |
| 114 | 114 | test "set-manifest-5-$v" {$RESULT eq ""} |
| 115 | 115 | fossil settings manifest |
| 116 | 116 | test "set-manifest-5-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 117 | - set filelist [glob manifest*] | |
| 117 | + set filelist [lsort [glob manifest*]] | |
| 118 | 118 | test "set-manifest-5-$v-n" {[llength $filelist] == [string length $v]} |
| 119 | 119 | foreach f $filelist { |
| 120 | 120 | test "set-manifest-5-$v-f-$f" {[file isfile $f]} |
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | 123 |
| --- test/set-manifest.test | |
| +++ test/set-manifest.test | |
| @@ -46,21 +46,21 @@ | |
| 46 | #### Verify classic behavior of the manifest setting |
| 47 | |
| 48 | # Setting is off by default, and there are no extra files. |
| 49 | fossil settings manifest |
| 50 | test "set-manifest-1" {[regexp {^manifest *$} $RESULT]} |
| 51 | set filelist [glob -nocomplain manifest*] |
| 52 | test "set-manifest-1-n" {[llength $filelist] == 0} |
| 53 | |
| 54 | # Classic behavior: TRUE value creates manifest and manifest.uuid |
| 55 | set truths [list true on 1] |
| 56 | foreach v $truths { |
| 57 | fossil settings manifest $v |
| 58 | test "set-manifest-2-$v" {$RESULT eq ""} |
| 59 | fossil settings manifest |
| 60 | test "set-manifest-2-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 61 | set filelist [glob manifest*] |
| 62 | test "set-manifest-2-$v-n" {[llength $filelist] == 2} |
| 63 | foreach f $filelist { |
| 64 | test "set-manifest-2-$v-f-$f" {[file isfile $f]} |
| 65 | } |
| 66 | } |
| @@ -88,21 +88,21 @@ | |
| 88 | foreach v $falses { |
| 89 | fossil settings manifest $v |
| 90 | test "set-manifest-3-$v" {$RESULT eq ""} |
| 91 | fossil settings manifest |
| 92 | test "set-manifest-3-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 93 | set filelist [glob -nocomplain manifest*] |
| 94 | test "set-manifest-3-$v-n" {[llength $filelist] == 0} |
| 95 | } |
| 96 | |
| 97 | |
| 98 | # Classic behavior: unset removes manifest and manifest.uuid |
| 99 | fossil unset manifest |
| 100 | test "set-manifest-4" {$RESULT eq ""} |
| 101 | fossil settings manifest |
| 102 | test "set-manifest-4-a" {[regexp {^manifest *$} $RESULT]} |
| 103 | set filelist [glob -nocomplain manifest*] |
| 104 | test "set-manifest-4-n" {[llength $filelist] == 0} |
| 105 | |
| 106 | |
| 107 | ##### Tags Manifest feature extends the manifest setting |
| 108 | |
| @@ -112,11 +112,11 @@ | |
| 112 | foreach v $truths { |
| 113 | fossil settings manifest $v |
| 114 | test "set-manifest-5-$v" {$RESULT eq ""} |
| 115 | fossil settings manifest |
| 116 | test "set-manifest-5-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 117 | set filelist [glob manifest*] |
| 118 | test "set-manifest-5-$v-n" {[llength $filelist] == [string length $v]} |
| 119 | foreach f $filelist { |
| 120 | test "set-manifest-5-$v-f-$f" {[file isfile $f]} |
| 121 | } |
| 122 | } |
| 123 |
| --- test/set-manifest.test | |
| +++ test/set-manifest.test | |
| @@ -46,21 +46,21 @@ | |
| 46 | #### Verify classic behavior of the manifest setting |
| 47 | |
| 48 | # Setting is off by default, and there are no extra files. |
| 49 | fossil settings manifest |
| 50 | test "set-manifest-1" {[regexp {^manifest *$} $RESULT]} |
| 51 | set filelist [lsort [glob -nocomplain manifest*]] |
| 52 | test "set-manifest-1-n" {[llength $filelist] == 0} |
| 53 | |
| 54 | # Classic behavior: TRUE value creates manifest and manifest.uuid |
| 55 | set truths [list true on 1] |
| 56 | foreach v $truths { |
| 57 | fossil settings manifest $v |
| 58 | test "set-manifest-2-$v" {$RESULT eq ""} |
| 59 | fossil settings manifest |
| 60 | test "set-manifest-2-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 61 | set filelist [lsort [glob manifest*]] |
| 62 | test "set-manifest-2-$v-n" {[llength $filelist] == 2} |
| 63 | foreach f $filelist { |
| 64 | test "set-manifest-2-$v-f-$f" {[file isfile $f]} |
| 65 | } |
| 66 | } |
| @@ -88,21 +88,21 @@ | |
| 88 | foreach v $falses { |
| 89 | fossil settings manifest $v |
| 90 | test "set-manifest-3-$v" {$RESULT eq ""} |
| 91 | fossil settings manifest |
| 92 | test "set-manifest-3-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 93 | set filelist [lsort [glob -nocomplain manifest*]] |
| 94 | test "set-manifest-3-$v-n" {[llength $filelist] == 0} |
| 95 | } |
| 96 | |
| 97 | |
| 98 | # Classic behavior: unset removes manifest and manifest.uuid |
| 99 | fossil unset manifest |
| 100 | test "set-manifest-4" {$RESULT eq ""} |
| 101 | fossil settings manifest |
| 102 | test "set-manifest-4-a" {[regexp {^manifest *$} $RESULT]} |
| 103 | set filelist [lsort [glob -nocomplain manifest*]] |
| 104 | test "set-manifest-4-n" {[llength $filelist] == 0} |
| 105 | |
| 106 | |
| 107 | ##### Tags Manifest feature extends the manifest setting |
| 108 | |
| @@ -112,11 +112,11 @@ | |
| 112 | foreach v $truths { |
| 113 | fossil settings manifest $v |
| 114 | test "set-manifest-5-$v" {$RESULT eq ""} |
| 115 | fossil settings manifest |
| 116 | test "set-manifest-5-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
| 117 | set filelist [lsort [glob manifest*]] |
| 118 | test "set-manifest-5-$v-n" {[llength $filelist] == [string length $v]} |
| 119 | foreach f $filelist { |
| 120 | test "set-manifest-5-$v-f-$f" {[file isfile $f]} |
| 121 | } |
| 122 | } |
| 123 |
+13
-9
| --- test/settings-repo.test | ||
| +++ test/settings-repo.test | ||
| @@ -40,11 +40,15 @@ | ||
| 40 | 40 | foreach name $all_settings { |
| 41 | 41 | # |
| 42 | 42 | # HACK: Make 100% sure that there are no non-default setting values |
| 43 | 43 | # present anywhere. |
| 44 | 44 | # |
| 45 | - fossil unset $name --exact --global | |
| 45 | + if {$name eq "manifest"} { | |
| 46 | + fossil unset $name --exact --global -expectError | |
| 47 | + } else { | |
| 48 | + fossil unset $name --exact --global | |
| 49 | + } | |
| 46 | 50 | fossil unset $name --exact |
| 47 | 51 | |
| 48 | 52 | # |
| 49 | 53 | # NOTE: Query for the hard-coded default value of this setting and |
| 50 | 54 | # save it. |
| @@ -53,62 +57,62 @@ | ||
| 53 | 57 | set defaults($name) [normalize_result] |
| 54 | 58 | } |
| 55 | 59 | |
| 56 | 60 | ############################################################################### |
| 57 | 61 | |
| 58 | -fossil settings bad-setting some_value | |
| 62 | +fossil settings bad-setting some_value -expectError | |
| 59 | 63 | |
| 60 | 64 | test settings-set-bad-local { |
| 61 | 65 | [normalize_result] eq "no such setting: bad-setting" |
| 62 | 66 | } |
| 63 | 67 | |
| 64 | -fossil settings bad-setting some_value --global | |
| 68 | +fossil settings bad-setting some_value --global -expectError | |
| 65 | 69 | |
| 66 | 70 | test settings-set-bad-global { |
| 67 | 71 | [normalize_result] eq "no such setting: bad-setting" |
| 68 | 72 | } |
| 69 | 73 | |
| 70 | 74 | ############################################################################### |
| 71 | 75 | |
| 72 | -fossil unset bad-setting | |
| 76 | +fossil unset bad-setting -expectError | |
| 73 | 77 | |
| 74 | 78 | test settings-unset-bad-local { |
| 75 | 79 | [normalize_result] eq "no such setting: bad-setting" |
| 76 | 80 | } |
| 77 | 81 | |
| 78 | -fossil unset bad-setting --global | |
| 82 | +fossil unset bad-setting --global -expectError | |
| 79 | 83 | |
| 80 | 84 | test settings-unset-bad-global { |
| 81 | 85 | [normalize_result] eq "no such setting: bad-setting" |
| 82 | 86 | } |
| 83 | 87 | |
| 84 | 88 | ############################################################################### |
| 85 | 89 | |
| 86 | -fossil settings ssl some_value | |
| 90 | +fossil settings ssl some_value -expectError | |
| 87 | 91 | |
| 88 | 92 | test settings-set-ambiguous-local { |
| 89 | 93 | [normalize_result] eq |
| 90 | 94 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 91 | 95 | } |
| 92 | 96 | |
| 93 | -fossil settings ssl some_value --global | |
| 97 | +fossil settings ssl some_value --global -expectError | |
| 94 | 98 | |
| 95 | 99 | test settings-set-ambiguous-global { |
| 96 | 100 | [normalize_result] eq |
| 97 | 101 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 98 | 102 | } |
| 99 | 103 | |
| 100 | 104 | ############################################################################### |
| 101 | 105 | |
| 102 | -fossil unset ssl | |
| 106 | +fossil unset ssl -expectError | |
| 103 | 107 | |
| 104 | 108 | test settings-unset-ambiguous-local { |
| 105 | 109 | [normalize_result] eq |
| 106 | 110 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 107 | 111 | } |
| 108 | 112 | |
| 109 | -fossil unset ssl --global | |
| 113 | +fossil unset ssl --global -expectError | |
| 110 | 114 | |
| 111 | 115 | test settings-unset-ambiguous-global { |
| 112 | 116 | [normalize_result] eq |
| 113 | 117 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 114 | 118 | } |
| 115 | 119 |
| --- test/settings-repo.test | |
| +++ test/settings-repo.test | |
| @@ -40,11 +40,15 @@ | |
| 40 | foreach name $all_settings { |
| 41 | # |
| 42 | # HACK: Make 100% sure that there are no non-default setting values |
| 43 | # present anywhere. |
| 44 | # |
| 45 | fossil unset $name --exact --global |
| 46 | fossil unset $name --exact |
| 47 | |
| 48 | # |
| 49 | # NOTE: Query for the hard-coded default value of this setting and |
| 50 | # save it. |
| @@ -53,62 +57,62 @@ | |
| 53 | set defaults($name) [normalize_result] |
| 54 | } |
| 55 | |
| 56 | ############################################################################### |
| 57 | |
| 58 | fossil settings bad-setting some_value |
| 59 | |
| 60 | test settings-set-bad-local { |
| 61 | [normalize_result] eq "no such setting: bad-setting" |
| 62 | } |
| 63 | |
| 64 | fossil settings bad-setting some_value --global |
| 65 | |
| 66 | test settings-set-bad-global { |
| 67 | [normalize_result] eq "no such setting: bad-setting" |
| 68 | } |
| 69 | |
| 70 | ############################################################################### |
| 71 | |
| 72 | fossil unset bad-setting |
| 73 | |
| 74 | test settings-unset-bad-local { |
| 75 | [normalize_result] eq "no such setting: bad-setting" |
| 76 | } |
| 77 | |
| 78 | fossil unset bad-setting --global |
| 79 | |
| 80 | test settings-unset-bad-global { |
| 81 | [normalize_result] eq "no such setting: bad-setting" |
| 82 | } |
| 83 | |
| 84 | ############################################################################### |
| 85 | |
| 86 | fossil settings ssl some_value |
| 87 | |
| 88 | test settings-set-ambiguous-local { |
| 89 | [normalize_result] eq |
| 90 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 91 | } |
| 92 | |
| 93 | fossil settings ssl some_value --global |
| 94 | |
| 95 | test settings-set-ambiguous-global { |
| 96 | [normalize_result] eq |
| 97 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 98 | } |
| 99 | |
| 100 | ############################################################################### |
| 101 | |
| 102 | fossil unset ssl |
| 103 | |
| 104 | test settings-unset-ambiguous-local { |
| 105 | [normalize_result] eq |
| 106 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 107 | } |
| 108 | |
| 109 | fossil unset ssl --global |
| 110 | |
| 111 | test settings-unset-ambiguous-global { |
| 112 | [normalize_result] eq |
| 113 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 114 | } |
| 115 |
| --- test/settings-repo.test | |
| +++ test/settings-repo.test | |
| @@ -40,11 +40,15 @@ | |
| 40 | foreach name $all_settings { |
| 41 | # |
| 42 | # HACK: Make 100% sure that there are no non-default setting values |
| 43 | # present anywhere. |
| 44 | # |
| 45 | if {$name eq "manifest"} { |
| 46 | fossil unset $name --exact --global -expectError |
| 47 | } else { |
| 48 | fossil unset $name --exact --global |
| 49 | } |
| 50 | fossil unset $name --exact |
| 51 | |
| 52 | # |
| 53 | # NOTE: Query for the hard-coded default value of this setting and |
| 54 | # save it. |
| @@ -53,62 +57,62 @@ | |
| 57 | set defaults($name) [normalize_result] |
| 58 | } |
| 59 | |
| 60 | ############################################################################### |
| 61 | |
| 62 | fossil settings bad-setting some_value -expectError |
| 63 | |
| 64 | test settings-set-bad-local { |
| 65 | [normalize_result] eq "no such setting: bad-setting" |
| 66 | } |
| 67 | |
| 68 | fossil settings bad-setting some_value --global -expectError |
| 69 | |
| 70 | test settings-set-bad-global { |
| 71 | [normalize_result] eq "no such setting: bad-setting" |
| 72 | } |
| 73 | |
| 74 | ############################################################################### |
| 75 | |
| 76 | fossil unset bad-setting -expectError |
| 77 | |
| 78 | test settings-unset-bad-local { |
| 79 | [normalize_result] eq "no such setting: bad-setting" |
| 80 | } |
| 81 | |
| 82 | fossil unset bad-setting --global -expectError |
| 83 | |
| 84 | test settings-unset-bad-global { |
| 85 | [normalize_result] eq "no such setting: bad-setting" |
| 86 | } |
| 87 | |
| 88 | ############################################################################### |
| 89 | |
| 90 | fossil settings ssl some_value -expectError |
| 91 | |
| 92 | test settings-set-ambiguous-local { |
| 93 | [normalize_result] eq |
| 94 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 95 | } |
| 96 | |
| 97 | fossil settings ssl some_value --global -expectError |
| 98 | |
| 99 | test settings-set-ambiguous-global { |
| 100 | [normalize_result] eq |
| 101 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 102 | } |
| 103 | |
| 104 | ############################################################################### |
| 105 | |
| 106 | fossil unset ssl -expectError |
| 107 | |
| 108 | test settings-unset-ambiguous-local { |
| 109 | [normalize_result] eq |
| 110 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 111 | } |
| 112 | |
| 113 | fossil unset ssl --global -expectError |
| 114 | |
| 115 | test settings-unset-ambiguous-global { |
| 116 | [normalize_result] eq |
| 117 | "ambiguous setting \"ssl\" - might be: ssl-ca-location ssl-identity" |
| 118 | } |
| 119 |
+7
-3
| --- test/settings.test | ||
| +++ test/settings.test | ||
| @@ -92,11 +92,15 @@ | ||
| 92 | 92 | test settings-query-local-$name { |
| 93 | 93 | [regexp -- [string map [list %name% $name] $pattern(1)] $data] || |
| 94 | 94 | [regexp -- [string map [list %name% $name] $pattern(2)] $data] |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - fossil settings $name --exact --global | |
| 97 | + if {$name eq "manifest"} { | |
| 98 | + fossil settings $name --exact --global -expectError | |
| 99 | + } else { | |
| 100 | + fossil settings $name --exact --global | |
| 101 | + } | |
| 98 | 102 | set data [normalize_result] |
| 99 | 103 | |
| 100 | 104 | if {$name eq "manifest"} { |
| 101 | 105 | test settings-query-global-$name { |
| 102 | 106 | $data eq "cannot set 'manifest' globally" |
| @@ -109,20 +113,20 @@ | ||
| 109 | 113 | } |
| 110 | 114 | } |
| 111 | 115 | |
| 112 | 116 | ############################################################################### |
| 113 | 117 | |
| 114 | -fossil settings bad-setting | |
| 118 | +fossil settings bad-setting -expectError | |
| 115 | 119 | |
| 116 | 120 | test settings-query-bad-local { |
| 117 | 121 | [normalize_result] eq "no such setting: bad-setting" |
| 118 | 122 | } |
| 119 | 123 | |
| 120 | -fossil settings bad-setting --global | |
| 124 | +fossil settings bad-setting --global -expectError | |
| 121 | 125 | |
| 122 | 126 | test settings-query-bad-global { |
| 123 | 127 | [normalize_result] eq "no such setting: bad-setting" |
| 124 | 128 | } |
| 125 | 129 | |
| 126 | 130 | ############################################################################### |
| 127 | 131 | |
| 128 | 132 | test_cleanup |
| 129 | 133 |
| --- test/settings.test | |
| +++ test/settings.test | |
| @@ -92,11 +92,15 @@ | |
| 92 | test settings-query-local-$name { |
| 93 | [regexp -- [string map [list %name% $name] $pattern(1)] $data] || |
| 94 | [regexp -- [string map [list %name% $name] $pattern(2)] $data] |
| 95 | } |
| 96 | |
| 97 | fossil settings $name --exact --global |
| 98 | set data [normalize_result] |
| 99 | |
| 100 | if {$name eq "manifest"} { |
| 101 | test settings-query-global-$name { |
| 102 | $data eq "cannot set 'manifest' globally" |
| @@ -109,20 +113,20 @@ | |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | ############################################################################### |
| 113 | |
| 114 | fossil settings bad-setting |
| 115 | |
| 116 | test settings-query-bad-local { |
| 117 | [normalize_result] eq "no such setting: bad-setting" |
| 118 | } |
| 119 | |
| 120 | fossil settings bad-setting --global |
| 121 | |
| 122 | test settings-query-bad-global { |
| 123 | [normalize_result] eq "no such setting: bad-setting" |
| 124 | } |
| 125 | |
| 126 | ############################################################################### |
| 127 | |
| 128 | test_cleanup |
| 129 |
| --- test/settings.test | |
| +++ test/settings.test | |
| @@ -92,11 +92,15 @@ | |
| 92 | test settings-query-local-$name { |
| 93 | [regexp -- [string map [list %name% $name] $pattern(1)] $data] || |
| 94 | [regexp -- [string map [list %name% $name] $pattern(2)] $data] |
| 95 | } |
| 96 | |
| 97 | if {$name eq "manifest"} { |
| 98 | fossil settings $name --exact --global -expectError |
| 99 | } else { |
| 100 | fossil settings $name --exact --global |
| 101 | } |
| 102 | set data [normalize_result] |
| 103 | |
| 104 | if {$name eq "manifest"} { |
| 105 | test settings-query-global-$name { |
| 106 | $data eq "cannot set 'manifest' globally" |
| @@ -109,20 +113,20 @@ | |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | ############################################################################### |
| 117 | |
| 118 | fossil settings bad-setting -expectError |
| 119 | |
| 120 | test settings-query-bad-local { |
| 121 | [normalize_result] eq "no such setting: bad-setting" |
| 122 | } |
| 123 | |
| 124 | fossil settings bad-setting --global -expectError |
| 125 | |
| 126 | test settings-query-bad-global { |
| 127 | [normalize_result] eq "no such setting: bad-setting" |
| 128 | } |
| 129 | |
| 130 | ############################################################################### |
| 131 | |
| 132 | test_cleanup |
| 133 |
+1
-1
| --- test/stash.test | ||
| +++ test/stash.test | ||
| @@ -206,11 +206,11 @@ | ||
| 206 | 206 | # fossil: ./src/delta.c:231: checksum: Assertion '...' failed. |
| 207 | 207 | # Should be triggered by this stash-WY-1 test. |
| 208 | 208 | fossil checkout --force c1 |
| 209 | 209 | fossil clean |
| 210 | 210 | fossil mv --soft f1 f1new |
| 211 | -stash-test WY-1 {save -m "Reported 2016-02-09"} { | |
| 211 | +stash-test WY-1 {-expectError save -m "Reported 2016-02-09"} { | |
| 212 | 212 | REVERT f1 |
| 213 | 213 | DELETE f1new |
| 214 | 214 | } -changes { |
| 215 | 215 | } -addremove { |
| 216 | 216 | } -exists {f1 f2 f3} -notexists {f1new} -knownbugs {-code -result} |
| 217 | 217 |
| --- test/stash.test | |
| +++ test/stash.test | |
| @@ -206,11 +206,11 @@ | |
| 206 | # fossil: ./src/delta.c:231: checksum: Assertion '...' failed. |
| 207 | # Should be triggered by this stash-WY-1 test. |
| 208 | fossil checkout --force c1 |
| 209 | fossil clean |
| 210 | fossil mv --soft f1 f1new |
| 211 | stash-test WY-1 {save -m "Reported 2016-02-09"} { |
| 212 | REVERT f1 |
| 213 | DELETE f1new |
| 214 | } -changes { |
| 215 | } -addremove { |
| 216 | } -exists {f1 f2 f3} -notexists {f1new} -knownbugs {-code -result} |
| 217 |
| --- test/stash.test | |
| +++ test/stash.test | |
| @@ -206,11 +206,11 @@ | |
| 206 | # fossil: ./src/delta.c:231: checksum: Assertion '...' failed. |
| 207 | # Should be triggered by this stash-WY-1 test. |
| 208 | fossil checkout --force c1 |
| 209 | fossil clean |
| 210 | fossil mv --soft f1 f1new |
| 211 | stash-test WY-1 {-expectError save -m "Reported 2016-02-09"} { |
| 212 | REVERT f1 |
| 213 | DELETE f1new |
| 214 | } -changes { |
| 215 | } -addremove { |
| 216 | } -exists {f1 f2 f3} -notexists {f1new} -knownbugs {-code -result} |
| 217 |
+1
-11
| --- test/symlinks.test | ||
| +++ test/symlinks.test | ||
| @@ -23,17 +23,10 @@ | ||
| 23 | 23 | if {$is_windows} { |
| 24 | 24 | puts "Symlinks are not supported on Windows." |
| 25 | 25 | test_cleanup_then_return |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | -fossil test-th-eval --open-config "setting allow-symlinks" | |
| 29 | - | |
| 30 | -if {![string is true -strict [normalize_result]]} { | |
| 31 | - puts "Symlinks are not enabled." | |
| 32 | - test_cleanup_then_return | |
| 33 | -} | |
| 34 | - | |
| 35 | 28 | require_no_open_checkout |
| 36 | 29 | |
| 37 | 30 | ############################################################################### |
| 38 | 31 | |
| 39 | 32 | test_setup; set rootDir [file normalize [pwd]] |
| @@ -68,11 +61,11 @@ | ||
| 68 | 61 | |
| 69 | 62 | fossil add [file join $rootDir symdirA f1.txt] |
| 70 | 63 | test symlinks-skip-dir-traversal {[normalize_result] eq \ |
| 71 | 64 | "SKIP symdirA/f1.txt"} |
| 72 | 65 | |
| 73 | -fossil commit -m "c1" | |
| 66 | +fossil commit -m "c1" -expectError | |
| 74 | 67 | |
| 75 | 68 | test symlinks-empty-commit {[normalize_result] eq \ |
| 76 | 69 | "nothing has changed; use --allow-empty to override"} |
| 77 | 70 | |
| 78 | 71 | ############################################################################### |
| @@ -80,13 +73,10 @@ | ||
| 80 | 73 | fossil ls |
| 81 | 74 | test symlinks-dir-5 {[normalize_result] eq ""} |
| 82 | 75 | |
| 83 | 76 | ############################################################################### |
| 84 | 77 | |
| 85 | -fossil set allow | |
| 86 | -puts $RESULT | |
| 87 | - | |
| 88 | 78 | fossil extras |
| 89 | 79 | test symlinks-dir-6 {[normalize_result] eq \ |
| 90 | 80 | "subdirA/f1.txt\nsubdirA/f2.txt\nsymdirA"} |
| 91 | 81 | |
| 92 | 82 | ############################################################################### |
| 93 | 83 |
| --- test/symlinks.test | |
| +++ test/symlinks.test | |
| @@ -23,17 +23,10 @@ | |
| 23 | if {$is_windows} { |
| 24 | puts "Symlinks are not supported on Windows." |
| 25 | test_cleanup_then_return |
| 26 | } |
| 27 | |
| 28 | fossil test-th-eval --open-config "setting allow-symlinks" |
| 29 | |
| 30 | if {![string is true -strict [normalize_result]]} { |
| 31 | puts "Symlinks are not enabled." |
| 32 | test_cleanup_then_return |
| 33 | } |
| 34 | |
| 35 | require_no_open_checkout |
| 36 | |
| 37 | ############################################################################### |
| 38 | |
| 39 | test_setup; set rootDir [file normalize [pwd]] |
| @@ -68,11 +61,11 @@ | |
| 68 | |
| 69 | fossil add [file join $rootDir symdirA f1.txt] |
| 70 | test symlinks-skip-dir-traversal {[normalize_result] eq \ |
| 71 | "SKIP symdirA/f1.txt"} |
| 72 | |
| 73 | fossil commit -m "c1" |
| 74 | |
| 75 | test symlinks-empty-commit {[normalize_result] eq \ |
| 76 | "nothing has changed; use --allow-empty to override"} |
| 77 | |
| 78 | ############################################################################### |
| @@ -80,13 +73,10 @@ | |
| 80 | fossil ls |
| 81 | test symlinks-dir-5 {[normalize_result] eq ""} |
| 82 | |
| 83 | ############################################################################### |
| 84 | |
| 85 | fossil set allow |
| 86 | puts $RESULT |
| 87 | |
| 88 | fossil extras |
| 89 | test symlinks-dir-6 {[normalize_result] eq \ |
| 90 | "subdirA/f1.txt\nsubdirA/f2.txt\nsymdirA"} |
| 91 | |
| 92 | ############################################################################### |
| 93 |
| --- test/symlinks.test | |
| +++ test/symlinks.test | |
| @@ -23,17 +23,10 @@ | |
| 23 | if {$is_windows} { |
| 24 | puts "Symlinks are not supported on Windows." |
| 25 | test_cleanup_then_return |
| 26 | } |
| 27 | |
| 28 | require_no_open_checkout |
| 29 | |
| 30 | ############################################################################### |
| 31 | |
| 32 | test_setup; set rootDir [file normalize [pwd]] |
| @@ -68,11 +61,11 @@ | |
| 61 | |
| 62 | fossil add [file join $rootDir symdirA f1.txt] |
| 63 | test symlinks-skip-dir-traversal {[normalize_result] eq \ |
| 64 | "SKIP symdirA/f1.txt"} |
| 65 | |
| 66 | fossil commit -m "c1" -expectError |
| 67 | |
| 68 | test symlinks-empty-commit {[normalize_result] eq \ |
| 69 | "nothing has changed; use --allow-empty to override"} |
| 70 | |
| 71 | ############################################################################### |
| @@ -80,13 +73,10 @@ | |
| 73 | fossil ls |
| 74 | test symlinks-dir-5 {[normalize_result] eq ""} |
| 75 | |
| 76 | ############################################################################### |
| 77 | |
| 78 | fossil extras |
| 79 | test symlinks-dir-6 {[normalize_result] eq \ |
| 80 | "subdirA/f1.txt\nsubdirA/f2.txt\nsymdirA"} |
| 81 | |
| 82 | ############################################################################### |
| 83 |
+26
-3
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -35,10 +35,11 @@ | ||
| 35 | 35 | set testfiledir [file normalize [file dirname [info script]]] |
| 36 | 36 | set testrundir [pwd] |
| 37 | 37 | set testdir [file normalize [file dirname $argv0]] |
| 38 | 38 | set fossilexe [file normalize [lindex $argv 0]] |
| 39 | 39 | set is_windows [expr {$::tcl_platform(platform) eq "windows"}] |
| 40 | +set is_cygwin [regexp {^CYGWIN} $::tcl_platform(os)] | |
| 40 | 41 | |
| 41 | 42 | if {$::is_windows} { |
| 42 | 43 | if {[string length [file extension $fossilexe]] == 0} { |
| 43 | 44 | append fossilexe .exe |
| 44 | 45 | } |
| @@ -447,10 +448,12 @@ | ||
| 447 | 448 | $::env(FOSSIL_TEST_DANGEROUS_IGNORE_OPEN_CHECKOUT) eq "YES_DO_IT"} { |
| 448 | 449 | return |
| 449 | 450 | } |
| 450 | 451 | catch {exec $::fossilexe info} res |
| 451 | 452 | if {[regexp {local-root:} $res]} { |
| 453 | + global skipped_tests testfile | |
| 454 | + lappend skipped_tests $testfile | |
| 452 | 455 | set projectName <unknown> |
| 453 | 456 | set localRoot <unknown> |
| 454 | 457 | regexp -line -- {^project-name: (.*)$} $res dummy projectName |
| 455 | 458 | set projectName [string trim $projectName] |
| 456 | 459 | regexp -line -- {^local-root: (.*)$} $res dummy localRoot |
| @@ -484,16 +487,22 @@ | ||
| 484 | 487 | } |
| 485 | 488 | error "Could not delete \"$path\", error: $error" |
| 486 | 489 | } |
| 487 | 490 | |
| 488 | 491 | proc test_cleanup_then_return {} { |
| 492 | + global skipped_tests testfile | |
| 493 | + lappend skipped_tests $testfile | |
| 489 | 494 | uplevel 1 [list test_cleanup] |
| 490 | 495 | return -code return |
| 491 | 496 | } |
| 492 | 497 | |
| 493 | 498 | proc test_cleanup {} { |
| 494 | - if {$::KEEP} {return}; # All cleanup disabled? | |
| 499 | + if {$::KEEP} { | |
| 500 | + # To avoid errors with require_no_open_checkout, cd out of here. | |
| 501 | + if {[info exists ::tempSavedPwd]} {cd $::tempSavedPwd; unset ::tempSavedPwd} | |
| 502 | + return | |
| 503 | + } | |
| 495 | 504 | if {![info exists ::tempRepoPath]} {return} |
| 496 | 505 | if {![file exists $::tempRepoPath]} {return} |
| 497 | 506 | if {![file isdirectory $::tempRepoPath]} {return} |
| 498 | 507 | set tempPathEnd [expr {[string length $::tempPath] - 1}] |
| 499 | 508 | if {[string length $::tempPath] == 0 || \ |
| @@ -518,11 +527,11 @@ | ||
| 518 | 527 | if {![info exists ::tempKeepHome]} {delete_temporary_home} |
| 519 | 528 | } |
| 520 | 529 | |
| 521 | 530 | proc delete_temporary_home {} { |
| 522 | 531 | if {$::KEEP} {return}; # All cleanup disabled? |
| 523 | - if {$::is_windows} { | |
| 532 | + if {$::is_windows || $::is_cygwin} { | |
| 524 | 533 | robust_delete [file join $::tempHomePath _fossil] |
| 525 | 534 | } else { |
| 526 | 535 | robust_delete [file join $::tempHomePath .fossil] |
| 527 | 536 | } |
| 528 | 537 | robust_delete $::tempHomePath |
| @@ -845,10 +854,11 @@ | ||
| 845 | 854 | } |
| 846 | 855 | } |
| 847 | 856 | } |
| 848 | 857 | set bad_test {} |
| 849 | 858 | set ignored_test {} |
| 859 | +set skipped_tests {} | |
| 850 | 860 | |
| 851 | 861 | # Return a random string N characters long. |
| 852 | 862 | # |
| 853 | 863 | set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 854 | 864 | append vocabulary " ()*^!.eeeeeeeeaaaaattiioo " |
| @@ -1009,11 +1019,11 @@ | ||
| 1009 | 1019 | set data [subst [read_file $dataFileName]] |
| 1010 | 1020 | |
| 1011 | 1021 | write_file $inFileName $data |
| 1012 | 1022 | |
| 1013 | 1023 | fossil http --in $inFileName --out $outFileName --ipaddr 127.0.0.1 \ |
| 1014 | - $repository --localauth --th-trace | |
| 1024 | + $repository --localauth --th-trace -expectError | |
| 1015 | 1025 | |
| 1016 | 1026 | set result [expr {[file exists $outFileName] ? [read_file $outFileName] : ""}] |
| 1017 | 1027 | |
| 1018 | 1028 | if {1} { |
| 1019 | 1029 | catch {file delete $inFileName} |
| @@ -1105,10 +1115,15 @@ | ||
| 1105 | 1115 | } |
| 1106 | 1116 | |
| 1107 | 1117 | |
| 1108 | 1118 | protInit $fossilexe |
| 1109 | 1119 | set ::tempKeepHome 1 |
| 1120 | + | |
| 1121 | +# Start in tempHomePath to help avoid errors with require_no_open_checkout | |
| 1122 | +set startPwd [pwd] | |
| 1123 | +cd $tempHomePath | |
| 1124 | + | |
| 1110 | 1125 | foreach testfile $argv { |
| 1111 | 1126 | protOut "***** $testfile ******" |
| 1112 | 1127 | if { [catch {source $testdir/$testfile.test} testerror testopts] } { |
| 1113 | 1128 | test test-framework-$testfile 0 |
| 1114 | 1129 | protOut "!!!!! $testfile: $testerror" |
| @@ -1116,10 +1131,11 @@ | ||
| 1116 | 1131 | } else { |
| 1117 | 1132 | test test-framework-$testfile 1 |
| 1118 | 1133 | } |
| 1119 | 1134 | protOut "***** End of $testfile: [llength $bad_test] errors so far ******" |
| 1120 | 1135 | } |
| 1136 | +cd $startPwd | |
| 1121 | 1137 | unset ::tempKeepHome; delete_temporary_home |
| 1122 | 1138 | |
| 1123 | 1139 | # Clean up the file descriptor |
| 1124 | 1140 | close $possibly_fd0 |
| 1125 | 1141 | |
| @@ -1134,6 +1150,13 @@ | ||
| 1134 | 1150 | if {$nErr>0 || !$::QUIET} { |
| 1135 | 1151 | protOut "***** Ignored results: $nErr ignored errors out of $test_count tests" 1 |
| 1136 | 1152 | } |
| 1137 | 1153 | if {$nErr>0} { |
| 1138 | 1154 | protOut "***** Ignored failures: $ignored_test" 1 |
| 1155 | +} | |
| 1156 | +set nSkipped [llength $skipped_tests] | |
| 1157 | +if {$nSkipped>0} { | |
| 1158 | + protOut "***** Skipped tests: $skipped_tests" 1 | |
| 1159 | +} | |
| 1160 | +if {$bad_test>0} { | |
| 1161 | + exit 1 | |
| 1139 | 1162 | } |
| 1140 | 1163 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -35,10 +35,11 @@ | |
| 35 | set testfiledir [file normalize [file dirname [info script]]] |
| 36 | set testrundir [pwd] |
| 37 | set testdir [file normalize [file dirname $argv0]] |
| 38 | set fossilexe [file normalize [lindex $argv 0]] |
| 39 | set is_windows [expr {$::tcl_platform(platform) eq "windows"}] |
| 40 | |
| 41 | if {$::is_windows} { |
| 42 | if {[string length [file extension $fossilexe]] == 0} { |
| 43 | append fossilexe .exe |
| 44 | } |
| @@ -447,10 +448,12 @@ | |
| 447 | $::env(FOSSIL_TEST_DANGEROUS_IGNORE_OPEN_CHECKOUT) eq "YES_DO_IT"} { |
| 448 | return |
| 449 | } |
| 450 | catch {exec $::fossilexe info} res |
| 451 | if {[regexp {local-root:} $res]} { |
| 452 | set projectName <unknown> |
| 453 | set localRoot <unknown> |
| 454 | regexp -line -- {^project-name: (.*)$} $res dummy projectName |
| 455 | set projectName [string trim $projectName] |
| 456 | regexp -line -- {^local-root: (.*)$} $res dummy localRoot |
| @@ -484,16 +487,22 @@ | |
| 484 | } |
| 485 | error "Could not delete \"$path\", error: $error" |
| 486 | } |
| 487 | |
| 488 | proc test_cleanup_then_return {} { |
| 489 | uplevel 1 [list test_cleanup] |
| 490 | return -code return |
| 491 | } |
| 492 | |
| 493 | proc test_cleanup {} { |
| 494 | if {$::KEEP} {return}; # All cleanup disabled? |
| 495 | if {![info exists ::tempRepoPath]} {return} |
| 496 | if {![file exists $::tempRepoPath]} {return} |
| 497 | if {![file isdirectory $::tempRepoPath]} {return} |
| 498 | set tempPathEnd [expr {[string length $::tempPath] - 1}] |
| 499 | if {[string length $::tempPath] == 0 || \ |
| @@ -518,11 +527,11 @@ | |
| 518 | if {![info exists ::tempKeepHome]} {delete_temporary_home} |
| 519 | } |
| 520 | |
| 521 | proc delete_temporary_home {} { |
| 522 | if {$::KEEP} {return}; # All cleanup disabled? |
| 523 | if {$::is_windows} { |
| 524 | robust_delete [file join $::tempHomePath _fossil] |
| 525 | } else { |
| 526 | robust_delete [file join $::tempHomePath .fossil] |
| 527 | } |
| 528 | robust_delete $::tempHomePath |
| @@ -845,10 +854,11 @@ | |
| 845 | } |
| 846 | } |
| 847 | } |
| 848 | set bad_test {} |
| 849 | set ignored_test {} |
| 850 | |
| 851 | # Return a random string N characters long. |
| 852 | # |
| 853 | set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 854 | append vocabulary " ()*^!.eeeeeeeeaaaaattiioo " |
| @@ -1009,11 +1019,11 @@ | |
| 1009 | set data [subst [read_file $dataFileName]] |
| 1010 | |
| 1011 | write_file $inFileName $data |
| 1012 | |
| 1013 | fossil http --in $inFileName --out $outFileName --ipaddr 127.0.0.1 \ |
| 1014 | $repository --localauth --th-trace |
| 1015 | |
| 1016 | set result [expr {[file exists $outFileName] ? [read_file $outFileName] : ""}] |
| 1017 | |
| 1018 | if {1} { |
| 1019 | catch {file delete $inFileName} |
| @@ -1105,10 +1115,15 @@ | |
| 1105 | } |
| 1106 | |
| 1107 | |
| 1108 | protInit $fossilexe |
| 1109 | set ::tempKeepHome 1 |
| 1110 | foreach testfile $argv { |
| 1111 | protOut "***** $testfile ******" |
| 1112 | if { [catch {source $testdir/$testfile.test} testerror testopts] } { |
| 1113 | test test-framework-$testfile 0 |
| 1114 | protOut "!!!!! $testfile: $testerror" |
| @@ -1116,10 +1131,11 @@ | |
| 1116 | } else { |
| 1117 | test test-framework-$testfile 1 |
| 1118 | } |
| 1119 | protOut "***** End of $testfile: [llength $bad_test] errors so far ******" |
| 1120 | } |
| 1121 | unset ::tempKeepHome; delete_temporary_home |
| 1122 | |
| 1123 | # Clean up the file descriptor |
| 1124 | close $possibly_fd0 |
| 1125 | |
| @@ -1134,6 +1150,13 @@ | |
| 1134 | if {$nErr>0 || !$::QUIET} { |
| 1135 | protOut "***** Ignored results: $nErr ignored errors out of $test_count tests" 1 |
| 1136 | } |
| 1137 | if {$nErr>0} { |
| 1138 | protOut "***** Ignored failures: $ignored_test" 1 |
| 1139 | } |
| 1140 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -35,10 +35,11 @@ | |
| 35 | set testfiledir [file normalize [file dirname [info script]]] |
| 36 | set testrundir [pwd] |
| 37 | set testdir [file normalize [file dirname $argv0]] |
| 38 | set fossilexe [file normalize [lindex $argv 0]] |
| 39 | set is_windows [expr {$::tcl_platform(platform) eq "windows"}] |
| 40 | set is_cygwin [regexp {^CYGWIN} $::tcl_platform(os)] |
| 41 | |
| 42 | if {$::is_windows} { |
| 43 | if {[string length [file extension $fossilexe]] == 0} { |
| 44 | append fossilexe .exe |
| 45 | } |
| @@ -447,10 +448,12 @@ | |
| 448 | $::env(FOSSIL_TEST_DANGEROUS_IGNORE_OPEN_CHECKOUT) eq "YES_DO_IT"} { |
| 449 | return |
| 450 | } |
| 451 | catch {exec $::fossilexe info} res |
| 452 | if {[regexp {local-root:} $res]} { |
| 453 | global skipped_tests testfile |
| 454 | lappend skipped_tests $testfile |
| 455 | set projectName <unknown> |
| 456 | set localRoot <unknown> |
| 457 | regexp -line -- {^project-name: (.*)$} $res dummy projectName |
| 458 | set projectName [string trim $projectName] |
| 459 | regexp -line -- {^local-root: (.*)$} $res dummy localRoot |
| @@ -484,16 +487,22 @@ | |
| 487 | } |
| 488 | error "Could not delete \"$path\", error: $error" |
| 489 | } |
| 490 | |
| 491 | proc test_cleanup_then_return {} { |
| 492 | global skipped_tests testfile |
| 493 | lappend skipped_tests $testfile |
| 494 | uplevel 1 [list test_cleanup] |
| 495 | return -code return |
| 496 | } |
| 497 | |
| 498 | proc test_cleanup {} { |
| 499 | if {$::KEEP} { |
| 500 | # To avoid errors with require_no_open_checkout, cd out of here. |
| 501 | if {[info exists ::tempSavedPwd]} {cd $::tempSavedPwd; unset ::tempSavedPwd} |
| 502 | return |
| 503 | } |
| 504 | if {![info exists ::tempRepoPath]} {return} |
| 505 | if {![file exists $::tempRepoPath]} {return} |
| 506 | if {![file isdirectory $::tempRepoPath]} {return} |
| 507 | set tempPathEnd [expr {[string length $::tempPath] - 1}] |
| 508 | if {[string length $::tempPath] == 0 || \ |
| @@ -518,11 +527,11 @@ | |
| 527 | if {![info exists ::tempKeepHome]} {delete_temporary_home} |
| 528 | } |
| 529 | |
| 530 | proc delete_temporary_home {} { |
| 531 | if {$::KEEP} {return}; # All cleanup disabled? |
| 532 | if {$::is_windows || $::is_cygwin} { |
| 533 | robust_delete [file join $::tempHomePath _fossil] |
| 534 | } else { |
| 535 | robust_delete [file join $::tempHomePath .fossil] |
| 536 | } |
| 537 | robust_delete $::tempHomePath |
| @@ -845,10 +854,11 @@ | |
| 854 | } |
| 855 | } |
| 856 | } |
| 857 | set bad_test {} |
| 858 | set ignored_test {} |
| 859 | set skipped_tests {} |
| 860 | |
| 861 | # Return a random string N characters long. |
| 862 | # |
| 863 | set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 864 | append vocabulary " ()*^!.eeeeeeeeaaaaattiioo " |
| @@ -1009,11 +1019,11 @@ | |
| 1019 | set data [subst [read_file $dataFileName]] |
| 1020 | |
| 1021 | write_file $inFileName $data |
| 1022 | |
| 1023 | fossil http --in $inFileName --out $outFileName --ipaddr 127.0.0.1 \ |
| 1024 | $repository --localauth --th-trace -expectError |
| 1025 | |
| 1026 | set result [expr {[file exists $outFileName] ? [read_file $outFileName] : ""}] |
| 1027 | |
| 1028 | if {1} { |
| 1029 | catch {file delete $inFileName} |
| @@ -1105,10 +1115,15 @@ | |
| 1115 | } |
| 1116 | |
| 1117 | |
| 1118 | protInit $fossilexe |
| 1119 | set ::tempKeepHome 1 |
| 1120 | |
| 1121 | # Start in tempHomePath to help avoid errors with require_no_open_checkout |
| 1122 | set startPwd [pwd] |
| 1123 | cd $tempHomePath |
| 1124 | |
| 1125 | foreach testfile $argv { |
| 1126 | protOut "***** $testfile ******" |
| 1127 | if { [catch {source $testdir/$testfile.test} testerror testopts] } { |
| 1128 | test test-framework-$testfile 0 |
| 1129 | protOut "!!!!! $testfile: $testerror" |
| @@ -1116,10 +1131,11 @@ | |
| 1131 | } else { |
| 1132 | test test-framework-$testfile 1 |
| 1133 | } |
| 1134 | protOut "***** End of $testfile: [llength $bad_test] errors so far ******" |
| 1135 | } |
| 1136 | cd $startPwd |
| 1137 | unset ::tempKeepHome; delete_temporary_home |
| 1138 | |
| 1139 | # Clean up the file descriptor |
| 1140 | close $possibly_fd0 |
| 1141 | |
| @@ -1134,6 +1150,13 @@ | |
| 1150 | if {$nErr>0 || !$::QUIET} { |
| 1151 | protOut "***** Ignored results: $nErr ignored errors out of $test_count tests" 1 |
| 1152 | } |
| 1153 | if {$nErr>0} { |
| 1154 | protOut "***** Ignored failures: $ignored_test" 1 |
| 1155 | } |
| 1156 | set nSkipped [llength $skipped_tests] |
| 1157 | if {$nSkipped>0} { |
| 1158 | protOut "***** Skipped tests: $skipped_tests" 1 |
| 1159 | } |
| 1160 | if {$bad_test>0} { |
| 1161 | exit 1 |
| 1162 | } |
| 1163 |
+14
-17
| --- test/th1-docs.test | ||
| +++ test/th1-docs.test | ||
| @@ -30,49 +30,46 @@ | ||
| 30 | 30 | if {[normalize_result] ne "1"} { |
| 31 | 31 | puts "Fossil was not compiled with Tcl support." |
| 32 | 32 | test_cleanup_then_return |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -if {$::outside_fossil_repo} { | |
| 36 | - puts "Skipping th1-docs-* tests: not in Fossil repo checkout." | |
| 37 | - test_cleanup_then_return | |
| 38 | -} elseif ($::dirty_ckout) { | |
| 39 | - puts "Skipping th1-docs-* tests: uncommitted changes in Fossil checkout." | |
| 40 | - test_cleanup_then_return | |
| 41 | -} | |
| 42 | - | |
| 43 | 35 | ############################################################################### |
| 44 | 36 | |
| 45 | -test_setup "" | |
| 37 | +test_setup | |
| 46 | 38 | |
| 47 | 39 | ############################################################################### |
| 48 | 40 | |
| 49 | 41 | set env(TH1_ENABLE_DOCS) 1; # TH1 docs must be enabled for this test. |
| 50 | 42 | set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test. |
| 51 | 43 | |
| 52 | 44 | ############################################################################### |
| 53 | 45 | |
| 54 | -run_in_checkout { | |
| 55 | - set data [fossil info] | |
| 56 | -} | |
| 46 | +set data [fossil info] | |
| 57 | 47 | |
| 58 | 48 | regexp -line -- {^repository: (.*)$} $data dummy repository |
| 59 | 49 | |
| 60 | 50 | if {[string length $repository] == 0 || ![file exists $repository]} { |
| 61 | 51 | error "unable to locate repository" |
| 62 | 52 | } |
| 63 | 53 | |
| 64 | 54 | set dataFileName [file join $::testdir th1-docs-input.txt] |
| 55 | +set origFileStat [file join $::testdir fileStat.th1] | |
| 56 | + | |
| 57 | +if {![file exists $origFileStat]} { | |
| 58 | + error "unable to locate [$origFileStat]" | |
| 59 | +} | |
| 60 | + | |
| 61 | +file copy $origFileStat fileStat.th1 | |
| 62 | +fossil add fileStat.th1 | |
| 63 | +fossil commit -m "Add fileStat.th1" | |
| 65 | 64 | |
| 66 | 65 | ############################################################################### |
| 67 | 66 | |
| 68 | -run_in_checkout { | |
| 69 | - set RESULT [test_fossil_http \ | |
| 70 | - $repository $dataFileName /doc/trunk/test/fileStat.th1] | |
| 71 | -} | |
| 67 | +set RESULT [test_fossil_http \ | |
| 68 | + $repository $dataFileName /doc/trunk/fileStat.th1] | |
| 72 | 69 | |
| 73 | -test th1-docs-1a {[regexp {<title>Fossil: test/fileStat.th1</title>} $RESULT]} | |
| 70 | +test th1-docs-1a {[regexp {<title>Unnamed Fossil Project: fileStat.th1</title>} $RESULT]} | |
| 74 | 71 | test th1-docs-1b {[regexp {>\[[0-9a-f]{40,64}\]<} $RESULT]} |
| 75 | 72 | test th1-docs-1c {[regexp { contains \d+ files\.} $RESULT]} |
| 76 | 73 | |
| 77 | 74 | ############################################################################### |
| 78 | 75 | |
| 79 | 76 |
| --- test/th1-docs.test | |
| +++ test/th1-docs.test | |
| @@ -30,49 +30,46 @@ | |
| 30 | if {[normalize_result] ne "1"} { |
| 31 | puts "Fossil was not compiled with Tcl support." |
| 32 | test_cleanup_then_return |
| 33 | } |
| 34 | |
| 35 | if {$::outside_fossil_repo} { |
| 36 | puts "Skipping th1-docs-* tests: not in Fossil repo checkout." |
| 37 | test_cleanup_then_return |
| 38 | } elseif ($::dirty_ckout) { |
| 39 | puts "Skipping th1-docs-* tests: uncommitted changes in Fossil checkout." |
| 40 | test_cleanup_then_return |
| 41 | } |
| 42 | |
| 43 | ############################################################################### |
| 44 | |
| 45 | test_setup "" |
| 46 | |
| 47 | ############################################################################### |
| 48 | |
| 49 | set env(TH1_ENABLE_DOCS) 1; # TH1 docs must be enabled for this test. |
| 50 | set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test. |
| 51 | |
| 52 | ############################################################################### |
| 53 | |
| 54 | run_in_checkout { |
| 55 | set data [fossil info] |
| 56 | } |
| 57 | |
| 58 | regexp -line -- {^repository: (.*)$} $data dummy repository |
| 59 | |
| 60 | if {[string length $repository] == 0 || ![file exists $repository]} { |
| 61 | error "unable to locate repository" |
| 62 | } |
| 63 | |
| 64 | set dataFileName [file join $::testdir th1-docs-input.txt] |
| 65 | |
| 66 | ############################################################################### |
| 67 | |
| 68 | run_in_checkout { |
| 69 | set RESULT [test_fossil_http \ |
| 70 | $repository $dataFileName /doc/trunk/test/fileStat.th1] |
| 71 | } |
| 72 | |
| 73 | test th1-docs-1a {[regexp {<title>Fossil: test/fileStat.th1</title>} $RESULT]} |
| 74 | test th1-docs-1b {[regexp {>\[[0-9a-f]{40,64}\]<} $RESULT]} |
| 75 | test th1-docs-1c {[regexp { contains \d+ files\.} $RESULT]} |
| 76 | |
| 77 | ############################################################################### |
| 78 | |
| 79 |
| --- test/th1-docs.test | |
| +++ test/th1-docs.test | |
| @@ -30,49 +30,46 @@ | |
| 30 | if {[normalize_result] ne "1"} { |
| 31 | puts "Fossil was not compiled with Tcl support." |
| 32 | test_cleanup_then_return |
| 33 | } |
| 34 | |
| 35 | ############################################################################### |
| 36 | |
| 37 | test_setup |
| 38 | |
| 39 | ############################################################################### |
| 40 | |
| 41 | set env(TH1_ENABLE_DOCS) 1; # TH1 docs must be enabled for this test. |
| 42 | set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test. |
| 43 | |
| 44 | ############################################################################### |
| 45 | |
| 46 | set data [fossil info] |
| 47 | |
| 48 | regexp -line -- {^repository: (.*)$} $data dummy repository |
| 49 | |
| 50 | if {[string length $repository] == 0 || ![file exists $repository]} { |
| 51 | error "unable to locate repository" |
| 52 | } |
| 53 | |
| 54 | set dataFileName [file join $::testdir th1-docs-input.txt] |
| 55 | set origFileStat [file join $::testdir fileStat.th1] |
| 56 | |
| 57 | if {![file exists $origFileStat]} { |
| 58 | error "unable to locate [$origFileStat]" |
| 59 | } |
| 60 | |
| 61 | file copy $origFileStat fileStat.th1 |
| 62 | fossil add fileStat.th1 |
| 63 | fossil commit -m "Add fileStat.th1" |
| 64 | |
| 65 | ############################################################################### |
| 66 | |
| 67 | set RESULT [test_fossil_http \ |
| 68 | $repository $dataFileName /doc/trunk/fileStat.th1] |
| 69 | |
| 70 | test th1-docs-1a {[regexp {<title>Unnamed Fossil Project: fileStat.th1</title>} $RESULT]} |
| 71 | test th1-docs-1b {[regexp {>\[[0-9a-f]{40,64}\]<} $RESULT]} |
| 72 | test th1-docs-1c {[regexp { contains \d+ files\.} $RESULT]} |
| 73 | |
| 74 | ############################################################################### |
| 75 | |
| 76 |
+2
-2
| --- test/th1-hooks.test | ||
| +++ test/th1-hooks.test | ||
| @@ -146,11 +146,11 @@ | ||
| 146 | 146 | +++ some stuff here +++ |
| 147 | 147 | <h1><b>command_hook timeline command_notify timeline</b></h1>}} |
| 148 | 148 | |
| 149 | 149 | ############################################################################### |
| 150 | 150 | |
| 151 | -fossil timeline custom3; # NOTE: Bad "WHEN" argument. | |
| 151 | +fossil timeline custom3 -expectError; # NOTE: Bad "WHEN" argument. | |
| 152 | 152 | |
| 153 | 153 | test th1-cmd-hooks-1c {[normalize_result] eq \ |
| 154 | 154 | {<h1><b>command_hook timeline</b></h1> |
| 155 | 155 | unknown check-in or invalid date: custom3}} |
| 156 | 156 | |
| @@ -196,11 +196,11 @@ | ||
| 196 | 196 | test th1-custom-cmd-3a {[string trim $RESULT] eq \ |
| 197 | 197 | {<h1><b>command_hook test3</b></h1>}} |
| 198 | 198 | |
| 199 | 199 | ############################################################################### |
| 200 | 200 | |
| 201 | -fossil test4 | |
| 201 | +fossil test4 -expectError | |
| 202 | 202 | |
| 203 | 203 | test th1-custom-cmd-4a {[first_data_line] eq \ |
| 204 | 204 | {<h1><b>command_hook test4</b></h1>}} |
| 205 | 205 | |
| 206 | 206 | test th1-custom-cmd-4b {[regexp -- \ |
| 207 | 207 |
| --- test/th1-hooks.test | |
| +++ test/th1-hooks.test | |
| @@ -146,11 +146,11 @@ | |
| 146 | +++ some stuff here +++ |
| 147 | <h1><b>command_hook timeline command_notify timeline</b></h1>}} |
| 148 | |
| 149 | ############################################################################### |
| 150 | |
| 151 | fossil timeline custom3; # NOTE: Bad "WHEN" argument. |
| 152 | |
| 153 | test th1-cmd-hooks-1c {[normalize_result] eq \ |
| 154 | {<h1><b>command_hook timeline</b></h1> |
| 155 | unknown check-in or invalid date: custom3}} |
| 156 | |
| @@ -196,11 +196,11 @@ | |
| 196 | test th1-custom-cmd-3a {[string trim $RESULT] eq \ |
| 197 | {<h1><b>command_hook test3</b></h1>}} |
| 198 | |
| 199 | ############################################################################### |
| 200 | |
| 201 | fossil test4 |
| 202 | |
| 203 | test th1-custom-cmd-4a {[first_data_line] eq \ |
| 204 | {<h1><b>command_hook test4</b></h1>}} |
| 205 | |
| 206 | test th1-custom-cmd-4b {[regexp -- \ |
| 207 |
| --- test/th1-hooks.test | |
| +++ test/th1-hooks.test | |
| @@ -146,11 +146,11 @@ | |
| 146 | +++ some stuff here +++ |
| 147 | <h1><b>command_hook timeline command_notify timeline</b></h1>}} |
| 148 | |
| 149 | ############################################################################### |
| 150 | |
| 151 | fossil timeline custom3 -expectError; # NOTE: Bad "WHEN" argument. |
| 152 | |
| 153 | test th1-cmd-hooks-1c {[normalize_result] eq \ |
| 154 | {<h1><b>command_hook timeline</b></h1> |
| 155 | unknown check-in or invalid date: custom3}} |
| 156 | |
| @@ -196,11 +196,11 @@ | |
| 196 | test th1-custom-cmd-3a {[string trim $RESULT] eq \ |
| 197 | {<h1><b>command_hook test3</b></h1>}} |
| 198 | |
| 199 | ############################################################################### |
| 200 | |
| 201 | fossil test4 -expectError |
| 202 | |
| 203 | test th1-custom-cmd-4a {[first_data_line] eq \ |
| 204 | {<h1><b>command_hook test4</b></h1>}} |
| 205 | |
| 206 | test th1-custom-cmd-4b {[regexp -- \ |
| 207 |
+8
-1
| --- test/th1-tcl.test | ||
| +++ test/th1-tcl.test | ||
| @@ -129,11 +129,18 @@ | ||
| 129 | 129 | ############################################################################### |
| 130 | 130 | |
| 131 | 131 | fossil test-th-render --open-config \ |
| 132 | 132 | [file nativename [file join $path th1-tcl9.txt]] |
| 133 | 133 | |
| 134 | -test th1-tcl-9 {[string trim $RESULT] eq [list [file tail $fossilexe] 3 \ | |
| 134 | +# Under cygwin, the printed name with Usage: strips the extension | |
| 135 | +if { $::is_cygwin && [file extension $fossilexe] eq ".exe" } { | |
| 136 | + set fossilexeref [string range $fossilexe 0 end-4] | |
| 137 | +} else { | |
| 138 | + set fossilexeref $fossilexe | |
| 139 | +} | |
| 140 | + | |
| 141 | +test th1-tcl-9 {[string trim $RESULT] eq [list [file tail $fossilexeref] 3 \ | |
| 135 | 142 | [list test-th-render --open-config [file nativename [file join $path \ |
| 136 | 143 | th1-tcl9.txt]]]]} |
| 137 | 144 | |
| 138 | 145 | ############################################################################### |
| 139 | 146 | |
| 140 | 147 |
| --- test/th1-tcl.test | |
| +++ test/th1-tcl.test | |
| @@ -129,11 +129,18 @@ | |
| 129 | ############################################################################### |
| 130 | |
| 131 | fossil test-th-render --open-config \ |
| 132 | [file nativename [file join $path th1-tcl9.txt]] |
| 133 | |
| 134 | test th1-tcl-9 {[string trim $RESULT] eq [list [file tail $fossilexe] 3 \ |
| 135 | [list test-th-render --open-config [file nativename [file join $path \ |
| 136 | th1-tcl9.txt]]]]} |
| 137 | |
| 138 | ############################################################################### |
| 139 | |
| 140 |
| --- test/th1-tcl.test | |
| +++ test/th1-tcl.test | |
| @@ -129,11 +129,18 @@ | |
| 129 | ############################################################################### |
| 130 | |
| 131 | fossil test-th-render --open-config \ |
| 132 | [file nativename [file join $path th1-tcl9.txt]] |
| 133 | |
| 134 | # Under cygwin, the printed name with Usage: strips the extension |
| 135 | if { $::is_cygwin && [file extension $fossilexe] eq ".exe" } { |
| 136 | set fossilexeref [string range $fossilexe 0 end-4] |
| 137 | } else { |
| 138 | set fossilexeref $fossilexe |
| 139 | } |
| 140 | |
| 141 | test th1-tcl-9 {[string trim $RESULT] eq [list [file tail $fossilexeref] 3 \ |
| 142 | [list test-th-render --open-config [file nativename [file join $path \ |
| 143 | th1-tcl9.txt]]]]} |
| 144 | |
| 145 | ############################################################################### |
| 146 | |
| 147 |
+3
-3
| --- test/th1.test | ||
| +++ test/th1.test | ||
| @@ -730,11 +730,11 @@ | ||
| 730 | 730 | fossil test-th-eval "trace {}" |
| 731 | 731 | test th1-trace-1 {$RESULT eq {}} |
| 732 | 732 | |
| 733 | 733 | ############################################################################### |
| 734 | 734 | |
| 735 | -fossil test-th-eval --th-trace "trace {}" | |
| 735 | +fossil test-th-eval --th-trace "trace {}" -expectError | |
| 736 | 736 | set normalized_result [normalize_result] |
| 737 | 737 | |
| 738 | 738 | regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \ |
| 739 | 739 | $normalized_result {} normalized_result |
| 740 | 740 | |
| @@ -758,11 +758,11 @@ | ||
| 758 | 758 | fossil test-th-eval "trace {this is a trace message.}" |
| 759 | 759 | test th1-trace-3 {$RESULT eq {}} |
| 760 | 760 | |
| 761 | 761 | ############################################################################### |
| 762 | 762 | |
| 763 | -fossil test-th-eval --th-trace "trace {this is a trace message.}" | |
| 763 | +fossil test-th-eval --th-trace "trace {this is a trace message.}" -expectError | |
| 764 | 764 | set normalized_result [normalize_result] |
| 765 | 765 | |
| 766 | 766 | regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \ |
| 767 | 767 | $normalized_result {} normalized_result |
| 768 | 768 | |
| @@ -1023,11 +1023,11 @@ | ||
| 1023 | 1023 | fossil test-th-eval "globalState vfs" |
| 1024 | 1024 | test th1-globalState-14 {[string length $RESULT] == 0} |
| 1025 | 1025 | |
| 1026 | 1026 | ############################################################################### |
| 1027 | 1027 | |
| 1028 | -if {$is_windows} { | |
| 1028 | +if {$is_windows || $is_cygwin} { | |
| 1029 | 1029 | set altVfs win32-longpath |
| 1030 | 1030 | } else { |
| 1031 | 1031 | set altVfs unix-dotfile |
| 1032 | 1032 | } |
| 1033 | 1033 | |
| 1034 | 1034 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -730,11 +730,11 @@ | |
| 730 | fossil test-th-eval "trace {}" |
| 731 | test th1-trace-1 {$RESULT eq {}} |
| 732 | |
| 733 | ############################################################################### |
| 734 | |
| 735 | fossil test-th-eval --th-trace "trace {}" |
| 736 | set normalized_result [normalize_result] |
| 737 | |
| 738 | regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \ |
| 739 | $normalized_result {} normalized_result |
| 740 | |
| @@ -758,11 +758,11 @@ | |
| 758 | fossil test-th-eval "trace {this is a trace message.}" |
| 759 | test th1-trace-3 {$RESULT eq {}} |
| 760 | |
| 761 | ############################################################################### |
| 762 | |
| 763 | fossil test-th-eval --th-trace "trace {this is a trace message.}" |
| 764 | set normalized_result [normalize_result] |
| 765 | |
| 766 | regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \ |
| 767 | $normalized_result {} normalized_result |
| 768 | |
| @@ -1023,11 +1023,11 @@ | |
| 1023 | fossil test-th-eval "globalState vfs" |
| 1024 | test th1-globalState-14 {[string length $RESULT] == 0} |
| 1025 | |
| 1026 | ############################################################################### |
| 1027 | |
| 1028 | if {$is_windows} { |
| 1029 | set altVfs win32-longpath |
| 1030 | } else { |
| 1031 | set altVfs unix-dotfile |
| 1032 | } |
| 1033 | |
| 1034 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -730,11 +730,11 @@ | |
| 730 | fossil test-th-eval "trace {}" |
| 731 | test th1-trace-1 {$RESULT eq {}} |
| 732 | |
| 733 | ############################################################################### |
| 734 | |
| 735 | fossil test-th-eval --th-trace "trace {}" -expectError |
| 736 | set normalized_result [normalize_result] |
| 737 | |
| 738 | regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \ |
| 739 | $normalized_result {} normalized_result |
| 740 | |
| @@ -758,11 +758,11 @@ | |
| 758 | fossil test-th-eval "trace {this is a trace message.}" |
| 759 | test th1-trace-3 {$RESULT eq {}} |
| 760 | |
| 761 | ############################################################################### |
| 762 | |
| 763 | fossil test-th-eval --th-trace "trace {this is a trace message.}" -expectError |
| 764 | set normalized_result [normalize_result] |
| 765 | |
| 766 | regsub -- {\n/\*\*\*\*\* Subprocess \d+ exit\(\d+\) \*\*\*\*\*/} \ |
| 767 | $normalized_result {} normalized_result |
| 768 | |
| @@ -1023,11 +1023,11 @@ | |
| 1023 | fossil test-th-eval "globalState vfs" |
| 1024 | test th1-globalState-14 {[string length $RESULT] == 0} |
| 1025 | |
| 1026 | ############################################################################### |
| 1027 | |
| 1028 | if {$is_windows || $is_cygwin} { |
| 1029 | set altVfs win32-longpath |
| 1030 | } else { |
| 1031 | set altVfs unix-dotfile |
| 1032 | } |
| 1033 | |
| 1034 |
+25
-7
| --- test/unversioned.test | ||
| +++ test/unversioned.test | ||
| @@ -26,10 +26,13 @@ | ||
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | require_no_open_checkout |
| 29 | 29 | |
| 30 | 30 | test_setup; set rootDir [file normalize [pwd]] |
| 31 | + | |
| 32 | +# Avoid delays from the backoffice. | |
| 33 | +fossil set backoffice-disable 1 | |
| 31 | 34 | |
| 32 | 35 | fossil test-th-eval --open-config {repository} |
| 33 | 36 | set repository [normalize_result] |
| 34 | 37 | |
| 35 | 38 | if {[string length $repository] == 0} { |
| @@ -46,13 +49,20 @@ | ||
| 46 | 49 | set env(VISUAL) [appendArgs \ |
| 47 | 50 | [info nameofexecutable] " " [file join $path fake-editor.tcl]] |
| 48 | 51 | |
| 49 | 52 | ############################################################################### |
| 50 | 53 | |
| 51 | -fossil unversioned | |
| 54 | +# Under cygwin, the printed name with Usage: strips the extension | |
| 55 | +if { $::is_cygwin && [file extension $fossilexe] eq ".exe" } { | |
| 56 | + set fossilexeref [string range $fossilexe 0 end-4] | |
| 57 | +} else { | |
| 58 | + set fossilexeref $fossilexe | |
| 59 | +} | |
| 60 | + | |
| 61 | +fossil unversioned -expectError | |
| 52 | 62 | test unversioned-1 {[normalize_result] eq \ |
| 53 | -[string map [list %fossil% [file nativename $fossilexe]] {Usage: %fossil%\ | |
| 63 | +[string map [list %fossil% [file nativename $fossilexeref]] {Usage: %fossil%\ | |
| 54 | 64 | unversioned add|cat|edit|export|list|revert|remove|sync|touch}]} |
| 55 | 65 | |
| 56 | 66 | ############################################################################### |
| 57 | 67 | |
| 58 | 68 | fossil unversioned list |
| @@ -312,26 +322,30 @@ | ||
| 312 | 322 | fossil user capabilities uvtester oy |
| 313 | 323 | |
| 314 | 324 | ############################################################################### |
| 315 | 325 | |
| 316 | 326 | foreach {pid port outTmpFile} [test_start_server $repository stopArg] {} |
| 317 | -puts [appendArgs "Started Fossil server, pid \"" $pid \" ", port \"" $port \".] | |
| 327 | +if {! $::QUIET} { | |
| 328 | + puts [appendArgs "Started Fossil server, pid \"" $pid \" ", port \"" $port \".] | |
| 329 | +} | |
| 318 | 330 | set remote [appendArgs http://uvtester: $password @localhost: $port /] |
| 319 | 331 | |
| 320 | 332 | ############################################################################### |
| 321 | 333 | |
| 322 | 334 | set clientDir [file join $tempPath [appendArgs \ |
| 323 | 335 | uvtest_ [string trim [clock seconds] -] _ [getSeqNo]]] |
| 324 | 336 | |
| 325 | 337 | set savedPwd [pwd] |
| 326 | 338 | file mkdir $clientDir; cd $clientDir |
| 327 | -puts [appendArgs "Now in client directory \"" [pwd] \".] | |
| 339 | +if {! $::QUIET} { | |
| 340 | + puts [appendArgs "Now in client directory \"" [pwd] \".] | |
| 341 | +} | |
| 328 | 342 | write_file unversioned-client1.txt "This is unversioned client file #1." |
| 329 | 343 | |
| 330 | 344 | ############################################################################### |
| 331 | 345 | |
| 332 | -fossil_maybe_answer y clone $remote uvrepo.fossil | |
| 346 | +fossil clone --save-http-password $remote uvrepo.fossil | |
| 333 | 347 | fossil open -f uvrepo.fossil |
| 334 | 348 | |
| 335 | 349 | ############################################################################### |
| 336 | 350 | |
| 337 | 351 | fossil unversioned list |
| @@ -426,20 +440,24 @@ | ||
| 426 | 440 | |
| 427 | 441 | ############################################################################### |
| 428 | 442 | |
| 429 | 443 | cd $savedPwd; unset savedPwd |
| 430 | 444 | file delete -force $clientDir |
| 431 | -puts [appendArgs "Now in server directory \"" [pwd] \".] | |
| 445 | +if {! $::QUIET} { | |
| 446 | + puts [appendArgs "Now in server directory \"" [pwd] \".] | |
| 447 | +} | |
| 432 | 448 | |
| 433 | 449 | ############################################################################### |
| 434 | 450 | |
| 435 | 451 | set stopped [test_stop_server $stopArg $pid $outTmpFile] |
| 436 | 452 | |
| 437 | -puts [appendArgs \ | |
| 453 | +if {! $::QUIET} { | |
| 454 | + puts [appendArgs \ | |
| 438 | 455 | [expr {$stopped ? "Stopped" : "Could not stop"}] \ |
| 439 | 456 | " Fossil server, pid \"" $pid "\", using argument \"" \ |
| 440 | 457 | $stopArg \".] |
| 458 | +} | |
| 441 | 459 | |
| 442 | 460 | ############################################################################### |
| 443 | 461 | |
| 444 | 462 | fossil unversioned list |
| 445 | 463 | test unversioned-57 {[regexp \ |
| 446 | 464 | |
| 447 | 465 | ADDED test/update.test |
| --- test/unversioned.test | |
| +++ test/unversioned.test | |
| @@ -26,10 +26,13 @@ | |
| 26 | } |
| 27 | |
| 28 | require_no_open_checkout |
| 29 | |
| 30 | test_setup; set rootDir [file normalize [pwd]] |
| 31 | |
| 32 | fossil test-th-eval --open-config {repository} |
| 33 | set repository [normalize_result] |
| 34 | |
| 35 | if {[string length $repository] == 0} { |
| @@ -46,13 +49,20 @@ | |
| 46 | set env(VISUAL) [appendArgs \ |
| 47 | [info nameofexecutable] " " [file join $path fake-editor.tcl]] |
| 48 | |
| 49 | ############################################################################### |
| 50 | |
| 51 | fossil unversioned |
| 52 | test unversioned-1 {[normalize_result] eq \ |
| 53 | [string map [list %fossil% [file nativename $fossilexe]] {Usage: %fossil%\ |
| 54 | unversioned add|cat|edit|export|list|revert|remove|sync|touch}]} |
| 55 | |
| 56 | ############################################################################### |
| 57 | |
| 58 | fossil unversioned list |
| @@ -312,26 +322,30 @@ | |
| 312 | fossil user capabilities uvtester oy |
| 313 | |
| 314 | ############################################################################### |
| 315 | |
| 316 | foreach {pid port outTmpFile} [test_start_server $repository stopArg] {} |
| 317 | puts [appendArgs "Started Fossil server, pid \"" $pid \" ", port \"" $port \".] |
| 318 | set remote [appendArgs http://uvtester: $password @localhost: $port /] |
| 319 | |
| 320 | ############################################################################### |
| 321 | |
| 322 | set clientDir [file join $tempPath [appendArgs \ |
| 323 | uvtest_ [string trim [clock seconds] -] _ [getSeqNo]]] |
| 324 | |
| 325 | set savedPwd [pwd] |
| 326 | file mkdir $clientDir; cd $clientDir |
| 327 | puts [appendArgs "Now in client directory \"" [pwd] \".] |
| 328 | write_file unversioned-client1.txt "This is unversioned client file #1." |
| 329 | |
| 330 | ############################################################################### |
| 331 | |
| 332 | fossil_maybe_answer y clone $remote uvrepo.fossil |
| 333 | fossil open -f uvrepo.fossil |
| 334 | |
| 335 | ############################################################################### |
| 336 | |
| 337 | fossil unversioned list |
| @@ -426,20 +440,24 @@ | |
| 426 | |
| 427 | ############################################################################### |
| 428 | |
| 429 | cd $savedPwd; unset savedPwd |
| 430 | file delete -force $clientDir |
| 431 | puts [appendArgs "Now in server directory \"" [pwd] \".] |
| 432 | |
| 433 | ############################################################################### |
| 434 | |
| 435 | set stopped [test_stop_server $stopArg $pid $outTmpFile] |
| 436 | |
| 437 | puts [appendArgs \ |
| 438 | [expr {$stopped ? "Stopped" : "Could not stop"}] \ |
| 439 | " Fossil server, pid \"" $pid "\", using argument \"" \ |
| 440 | $stopArg \".] |
| 441 | |
| 442 | ############################################################################### |
| 443 | |
| 444 | fossil unversioned list |
| 445 | test unversioned-57 {[regexp \ |
| 446 | |
| 447 | DDED test/update.test |
| --- test/unversioned.test | |
| +++ test/unversioned.test | |
| @@ -26,10 +26,13 @@ | |
| 26 | } |
| 27 | |
| 28 | require_no_open_checkout |
| 29 | |
| 30 | test_setup; set rootDir [file normalize [pwd]] |
| 31 | |
| 32 | # Avoid delays from the backoffice. |
| 33 | fossil set backoffice-disable 1 |
| 34 | |
| 35 | fossil test-th-eval --open-config {repository} |
| 36 | set repository [normalize_result] |
| 37 | |
| 38 | if {[string length $repository] == 0} { |
| @@ -46,13 +49,20 @@ | |
| 49 | set env(VISUAL) [appendArgs \ |
| 50 | [info nameofexecutable] " " [file join $path fake-editor.tcl]] |
| 51 | |
| 52 | ############################################################################### |
| 53 | |
| 54 | # Under cygwin, the printed name with Usage: strips the extension |
| 55 | if { $::is_cygwin && [file extension $fossilexe] eq ".exe" } { |
| 56 | set fossilexeref [string range $fossilexe 0 end-4] |
| 57 | } else { |
| 58 | set fossilexeref $fossilexe |
| 59 | } |
| 60 | |
| 61 | fossil unversioned -expectError |
| 62 | test unversioned-1 {[normalize_result] eq \ |
| 63 | [string map [list %fossil% [file nativename $fossilexeref]] {Usage: %fossil%\ |
| 64 | unversioned add|cat|edit|export|list|revert|remove|sync|touch}]} |
| 65 | |
| 66 | ############################################################################### |
| 67 | |
| 68 | fossil unversioned list |
| @@ -312,26 +322,30 @@ | |
| 322 | fossil user capabilities uvtester oy |
| 323 | |
| 324 | ############################################################################### |
| 325 | |
| 326 | foreach {pid port outTmpFile} [test_start_server $repository stopArg] {} |
| 327 | if {! $::QUIET} { |
| 328 | puts [appendArgs "Started Fossil server, pid \"" $pid \" ", port \"" $port \".] |
| 329 | } |
| 330 | set remote [appendArgs http://uvtester: $password @localhost: $port /] |
| 331 | |
| 332 | ############################################################################### |
| 333 | |
| 334 | set clientDir [file join $tempPath [appendArgs \ |
| 335 | uvtest_ [string trim [clock seconds] -] _ [getSeqNo]]] |
| 336 | |
| 337 | set savedPwd [pwd] |
| 338 | file mkdir $clientDir; cd $clientDir |
| 339 | if {! $::QUIET} { |
| 340 | puts [appendArgs "Now in client directory \"" [pwd] \".] |
| 341 | } |
| 342 | write_file unversioned-client1.txt "This is unversioned client file #1." |
| 343 | |
| 344 | ############################################################################### |
| 345 | |
| 346 | fossil clone --save-http-password $remote uvrepo.fossil |
| 347 | fossil open -f uvrepo.fossil |
| 348 | |
| 349 | ############################################################################### |
| 350 | |
| 351 | fossil unversioned list |
| @@ -426,20 +440,24 @@ | |
| 440 | |
| 441 | ############################################################################### |
| 442 | |
| 443 | cd $savedPwd; unset savedPwd |
| 444 | file delete -force $clientDir |
| 445 | if {! $::QUIET} { |
| 446 | puts [appendArgs "Now in server directory \"" [pwd] \".] |
| 447 | } |
| 448 | |
| 449 | ############################################################################### |
| 450 | |
| 451 | set stopped [test_stop_server $stopArg $pid $outTmpFile] |
| 452 | |
| 453 | if {! $::QUIET} { |
| 454 | puts [appendArgs \ |
| 455 | [expr {$stopped ? "Stopped" : "Could not stop"}] \ |
| 456 | " Fossil server, pid \"" $pid "\", using argument \"" \ |
| 457 | $stopArg \".] |
| 458 | } |
| 459 | |
| 460 | ############################################################################### |
| 461 | |
| 462 | fossil unversioned list |
| 463 | test unversioned-57 {[regexp \ |
| 464 | |
| 465 | DDED test/update.test |
+123
| --- a/test/update.test | ||
| +++ b/test/update.test | ||
| @@ -0,0 +1,123 @@ | ||
| 1 | +# | |
| 2 | +# Copyright (c) 2024 Preben Guldnerg <[email protected]> | |
| 3 | +# | |
| 4 | +# This program is free software; you can redistribute it and/or | |
| 5 | +# modify it under the terms of the Simplified BSD License (also | |
| 6 | +# known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | +# | |
| 8 | +# This program is distributed in the hope that it will be useful, | |
| 9 | +# but without any warranty; without even the implied warranty of | |
| 10 | +# merchantability or fitness for a particular purpose. | |
| 11 | +# | |
| 12 | +# Author contact information: | |
| 13 | +# [email protected] | |
| 14 | +# http://www.hwaci.com/drh/ | |
| 15 | +# | |
| 16 | +############################################################################ | |
| 17 | +# | |
| 18 | +# Tests for the "update" command. | |
| 19 | +# | |
| 20 | + | |
| 21 | +# Track number of tests we have set up in test_update_setup. This helps ensure | |
| 22 | +# that generated files are ordered in `fossil update --verbose` mode. | |
| 23 | +set UPDATE_TEST 0 | |
| 24 | + | |
| 25 | +proc test_update_setup {desc} { | |
| 26 | + global UPDATE_TEST | |
| 27 | + incr UPDATE_TEST | |
| 28 | + fossil revert | |
| 29 | + fossil eben Guldnerg <[email protected]> | |
| 30 | +# | |
| 31 | +# This program is free software; you can redistribute it and/or | |
| 32 | +# modify it under the terms of the Simplified BSD License (also | |
| 33 | +# known as the "2-Clause License" or "FreeBSD License".) | |
| 34 | +# | |
| 35 | +# This program is distributed in the hope that it will be useful, | |
| 36 | +# but without any warranty; without even the implied warranty of | |
| 37 | +# merchantability or fitness for a particular purpose. | |
| 38 | +# | |
| 39 | +# Author contact information: | |
| 40 | +# [email protected] | |
| 41 | +# http://www.hwaci.com/drh/ | |
| 42 | +# | |
| 43 | +############################################################################ | |
| 44 | +# | |
| 45 | +# Tests for the "update $testname $mesil_args ""}} { | |
| 46 | + fossil updateADD $fname" | |
| 47 | +set changes "" | |
| 48 | +write_seq_to_file $fname | |
| 49 | +fossil add $fname | |
| 50 | +fossil com -m "Remove $fname" | |
| 51 | +fossil up previous | |
| 52 | +test_update $testname $messaEQ_NO\n" | |
| 53 | +} | |
| 54 | + | |
| 55 | +# Make sure we are not in an open repository and initialize new repository | |
| 56 | +test_setup | |
| 57 | + | |
| 58 | +############################################################################### | |
| 59 | + | |
| 60 | +fossil update --verbose | |
| 61 | +test update-already-up-to-date { | |
| 62 | + [regexp {^-{79}\ncheckout: .*\nchanges: +None. Already up-to-date.$} $RESULT] | |
| 63 | +} | |
| 64 | + | |
| 65 | +# Remaining tests are carried out in the order update_cmd() performs checks. | |
| 66 | +# | |
| 67 | +# Common approach for tests below: | |
| 68 | +# 1. Set the testname | |
| 69 | +# 2. Set the file name, done by calling update_setup | |
| 70 | +# 3. Set message and changes, the expected message message and subsequent changes | |
| 71 | +# 3. Optionally set up and commit a common base for the next steps | |
| 72 | +# 4. Commit a change to the repository (new tip) | |
| 73 | +# 5. Update to the previous version | |
| 74 | +# 6. Make changes | |
| 75 | +# 7. Call test_update to attempt and update to tip | |
| 76 | + | |
| 77 | + | |
| 78 | +set testname "conflict-standard" | |
| 79 | +set fname [test_update_setup $testname] | |
| 80 | +set message "CONFLICT $fname" | |
| 81 | +set changes "EDITED $fname" | |
| 82 | +write_seq_to_file $fname | |
| 83 | +fossil add $fname | |
| 84 | +fossil commit -m "Add $fname" | |
| 85 | +fossil up previous | |
| 86 | +write_seq_to_file $fname | |
| 87 | +fossil add $fname | |
| 88 | +test_update $testname $message $changes -expectError | |
| 89 | + | |
| 90 | +set testname "add-overwrites" | |
| 91 | +set fname [test_update_setup $testname] | |
| 92 | +set message "ADD $fname - overwrites an unmanaged file, original copy backed up as \"./$fname-original\"" | |
| 93 | +set changes "" | |
| 94 | +write_seq_to_file $fname | |
| 95 | +fossil aest_update_setup $testname] | |
| 96 | +set message "CONFLICT $fname" | |
| 97 | +set changes "EDIT"" | |
| 98 | +write_sEXTRA $fnarevious | |
| 99 | +test_update $testname $mesil_args ""}} { | |
| 100 | + fossil updateADD $fname" | |
| 101 | +set changes "" | |
| 102 | +write_seq_to_file $fname | |
| 103 | +fossil add $fname | |
| 104 | +fossil com -m "Remove $fname" | |
| 105 | +fossil up previous | |
| 106 | +test_update $testname $messaEQ_NO\n" | |
| 107 | +} | |
| 108 | + | |
| 109 | +# Make sure we are not in an open repository and initialize new repository | |
| 110 | +test_setup | |
| 111 | + | |
| 112 | +############################################################################### | |
| 113 | + | |
| 114 | +fossil update --verbose | |
| 115 | +test update-already-up-to-date { | |
| 116 | + [regexp {^-{79}\ncheckout: .*\nchanges: +None. Already up-to-date.$} $RESULT] | |
| 117 | +} | |
| 118 | + | |
| 119 | +# Remaining tests are carried out in the order update_cmd() performs checks. | |
| 120 | +# | |
| 121 | +# Common approach for tests below: | |
| 122 | +# 1. Set the testname | |
| 123 | +# 2. Set the file name, done by callin |
| --- a/test/update.test | |
| +++ b/test/update.test | |
| @@ -0,0 +1,123 @@ | |
| --- a/test/update.test | |
| +++ b/test/update.test | |
| @@ -0,0 +1,123 @@ | |
| 1 | # |
| 2 | # Copyright (c) 2024 Preben Guldnerg <[email protected]> |
| 3 | # |
| 4 | # This program is free software; you can redistribute it and/or |
| 5 | # modify it under the terms of the Simplified BSD License (also |
| 6 | # known as the "2-Clause License" or "FreeBSD License".) |
| 7 | # |
| 8 | # This program is distributed in the hope that it will be useful, |
| 9 | # but without any warranty; without even the implied warranty of |
| 10 | # merchantability or fitness for a particular purpose. |
| 11 | # |
| 12 | # Author contact information: |
| 13 | # [email protected] |
| 14 | # http://www.hwaci.com/drh/ |
| 15 | # |
| 16 | ############################################################################ |
| 17 | # |
| 18 | # Tests for the "update" command. |
| 19 | # |
| 20 | |
| 21 | # Track number of tests we have set up in test_update_setup. This helps ensure |
| 22 | # that generated files are ordered in `fossil update --verbose` mode. |
| 23 | set UPDATE_TEST 0 |
| 24 | |
| 25 | proc test_update_setup {desc} { |
| 26 | global UPDATE_TEST |
| 27 | incr UPDATE_TEST |
| 28 | fossil revert |
| 29 | fossil eben Guldnerg <[email protected]> |
| 30 | # |
| 31 | # This program is free software; you can redistribute it and/or |
| 32 | # modify it under the terms of the Simplified BSD License (also |
| 33 | # known as the "2-Clause License" or "FreeBSD License".) |
| 34 | # |
| 35 | # This program is distributed in the hope that it will be useful, |
| 36 | # but without any warranty; without even the implied warranty of |
| 37 | # merchantability or fitness for a particular purpose. |
| 38 | # |
| 39 | # Author contact information: |
| 40 | # [email protected] |
| 41 | # http://www.hwaci.com/drh/ |
| 42 | # |
| 43 | ############################################################################ |
| 44 | # |
| 45 | # Tests for the "update $testname $mesil_args ""}} { |
| 46 | fossil updateADD $fname" |
| 47 | set changes "" |
| 48 | write_seq_to_file $fname |
| 49 | fossil add $fname |
| 50 | fossil com -m "Remove $fname" |
| 51 | fossil up previous |
| 52 | test_update $testname $messaEQ_NO\n" |
| 53 | } |
| 54 | |
| 55 | # Make sure we are not in an open repository and initialize new repository |
| 56 | test_setup |
| 57 | |
| 58 | ############################################################################### |
| 59 | |
| 60 | fossil update --verbose |
| 61 | test update-already-up-to-date { |
| 62 | [regexp {^-{79}\ncheckout: .*\nchanges: +None. Already up-to-date.$} $RESULT] |
| 63 | } |
| 64 | |
| 65 | # Remaining tests are carried out in the order update_cmd() performs checks. |
| 66 | # |
| 67 | # Common approach for tests below: |
| 68 | # 1. Set the testname |
| 69 | # 2. Set the file name, done by calling update_setup |
| 70 | # 3. Set message and changes, the expected message message and subsequent changes |
| 71 | # 3. Optionally set up and commit a common base for the next steps |
| 72 | # 4. Commit a change to the repository (new tip) |
| 73 | # 5. Update to the previous version |
| 74 | # 6. Make changes |
| 75 | # 7. Call test_update to attempt and update to tip |
| 76 | |
| 77 | |
| 78 | set testname "conflict-standard" |
| 79 | set fname [test_update_setup $testname] |
| 80 | set message "CONFLICT $fname" |
| 81 | set changes "EDITED $fname" |
| 82 | write_seq_to_file $fname |
| 83 | fossil add $fname |
| 84 | fossil commit -m "Add $fname" |
| 85 | fossil up previous |
| 86 | write_seq_to_file $fname |
| 87 | fossil add $fname |
| 88 | test_update $testname $message $changes -expectError |
| 89 | |
| 90 | set testname "add-overwrites" |
| 91 | set fname [test_update_setup $testname] |
| 92 | set message "ADD $fname - overwrites an unmanaged file, original copy backed up as \"./$fname-original\"" |
| 93 | set changes "" |
| 94 | write_seq_to_file $fname |
| 95 | fossil aest_update_setup $testname] |
| 96 | set message "CONFLICT $fname" |
| 97 | set changes "EDIT"" |
| 98 | write_sEXTRA $fnarevious |
| 99 | test_update $testname $mesil_args ""}} { |
| 100 | fossil updateADD $fname" |
| 101 | set changes "" |
| 102 | write_seq_to_file $fname |
| 103 | fossil add $fname |
| 104 | fossil com -m "Remove $fname" |
| 105 | fossil up previous |
| 106 | test_update $testname $messaEQ_NO\n" |
| 107 | } |
| 108 | |
| 109 | # Make sure we are not in an open repository and initialize new repository |
| 110 | test_setup |
| 111 | |
| 112 | ############################################################################### |
| 113 | |
| 114 | fossil update --verbose |
| 115 | test update-already-up-to-date { |
| 116 | [regexp {^-{79}\ncheckout: .*\nchanges: +None. Already up-to-date.$} $RESULT] |
| 117 | } |
| 118 | |
| 119 | # Remaining tests are carried out in the order update_cmd() performs checks. |
| 120 | # |
| 121 | # Common approach for tests below: |
| 122 | # 1. Set the testname |
| 123 | # 2. Set the file name, done by callin |