| | @@ -19,11 +19,11 @@ |
| 19 | 19 | # [email protected] |
| 20 | 20 | # http://www.hwaci.com/drh/ |
| 21 | 21 | # |
| 22 | 22 | ############################################################################ |
| 23 | 23 | # |
| 24 | | -# Tests of the delta mechanism. |
| 24 | +# Tests of the 3-way merge |
| 25 | 25 | # |
| 26 | 26 | |
| 27 | 27 | write_file_indented t1 { |
| 28 | 28 | 111 - This is line one of the demo program - 1111 |
| 29 | 29 | 222 - The second line program line in code - 2222 |
| | @@ -77,24 +77,26 @@ |
| 77 | 77 | 333 - This is a test of the merging algohm - 3333 |
| 78 | 78 | 444 - If all goes well, we will be pleased - 4444 |
| 79 | 79 | 555 - we think it well and other stuff too - 5555 |
| 80 | 80 | } |
| 81 | 81 | write_file_indented t23 { |
| 82 | | - >>>>>>>> BEGIN MERGE CONFLICT <<<<<<<< |
| 82 | + >>>>>>> BEGIN MERGE CONFLICT |
| 83 | 83 | 111 - This is line ONE of the demo program - 1111 |
| 84 | + ============================ |
| 84 | 85 | 111 - This is line one OF the demo program - 1111 |
| 85 | | - >>>>>>>>> END MERGE CONFLICT <<<<<<<<< |
| 86 | + <<<<<<< END MERGE CONFLICT |
| 86 | 87 | 222 - The second line program line in code - 2222 |
| 87 | 88 | 333 - This is a test of the merging algohm - 3333 |
| 88 | 89 | 444 - If all goes well, we will be pleased - 4444 |
| 89 | 90 | 555 - we think it well and other stuff too - 5555 |
| 90 | 91 | } |
| 91 | 92 | write_file_indented t32 { |
| 92 | | - >>>>>>>> BEGIN MERGE CONFLICT <<<<<<<< |
| 93 | + >>>>>>> BEGIN MERGE CONFLICT |
| 93 | 94 | 111 - This is line one OF the demo program - 1111 |
| 95 | + ============================ |
| 94 | 96 | 111 - This is line ONE of the demo program - 1111 |
| 95 | | - >>>>>>>>> END MERGE CONFLICT <<<<<<<<< |
| 97 | + <<<<<<< END MERGE CONFLICT |
| 96 | 98 | 222 - The second line program line in code - 2222 |
| 97 | 99 | 333 - This is a test of the merging algohm - 3333 |
| 98 | 100 | 444 - If all goes well, we will be pleased - 4444 |
| 99 | 101 | 555 - we think it well and other stuff too - 5555 |
| 100 | 102 | } |
| | @@ -156,18 +158,26 @@ |
| 156 | 158 | 333 - This is a test of the merging algohm - 3333 |
| 157 | 159 | 444 - If all goes well, we will be pleased - 4444 |
| 158 | 160 | 555 - we think it well and other stuff too - 5555 |
| 159 | 161 | } |
| 160 | 162 | write_file_indented t32 { |
| 163 | + >>>>>>> BEGIN MERGE CONFLICT |
| 164 | + ============================ |
| 161 | 165 | 000 - Zero lines added to the beginning of - 0000 |
| 166 | + 111 - This is line one of the demo program - 1111 |
| 167 | + <<<<<<< END MERGE CONFLICT |
| 162 | 168 | 222 - The second line program line in code - 2222 |
| 163 | 169 | 333 - This is a test of the merging algohm - 3333 |
| 164 | 170 | 444 - If all goes well, we will be pleased - 4444 |
| 165 | 171 | 555 - we think it well and other stuff too - 5555 |
| 166 | 172 | } |
| 167 | 173 | write_file_indented t23 { |
| 174 | + >>>>>>> BEGIN MERGE CONFLICT |
| 168 | 175 | 000 - Zero lines added to the beginning of - 0000 |
| 176 | + 111 - This is line one of the demo program - 1111 |
| 177 | + ============================ |
| 178 | + <<<<<<< END MERGE CONFLICT |
| 169 | 179 | 222 - The second line program line in code - 2222 |
| 170 | 180 | 333 - This is a test of the merging algohm - 3333 |
| 171 | 181 | 444 - If all goes well, we will be pleased - 4444 |
| 172 | 182 | 555 - we think it well and other stuff too - 5555 |
| 173 | 183 | } |
| | @@ -235,5 +245,136 @@ |
| 235 | 245 | } |
| 236 | 246 | fossil test-3 t1 t3 t2 a32 |
| 237 | 247 | test merge1-6.1 {[same_file t32 a32]} |
| 238 | 248 | fossil test-3 t1 t2 t3 a23 |
| 239 | 249 | test merge1-6.2 {[same_file t32 a23]} |
| 250 | + |
| 251 | +write_file_indented t1 { |
| 252 | + abcd |
| 253 | + efgh |
| 254 | + ijkl |
| 255 | + mnop |
| 256 | + qrst |
| 257 | + uvwx |
| 258 | + yzAB |
| 259 | + CDEF |
| 260 | + GHIJ |
| 261 | + KLMN |
| 262 | + OPQR |
| 263 | + STUV |
| 264 | + XYZ. |
| 265 | +} |
| 266 | +write_file_indented t2 { |
| 267 | + abcd |
| 268 | + efgh 2 |
| 269 | + ijkl 2 |
| 270 | + mnop 2 |
| 271 | + qrst |
| 272 | + uvwx |
| 273 | + yzAB 2 |
| 274 | + CDEF 2 |
| 275 | + GHIJ 2 |
| 276 | + KLMN |
| 277 | + OPQR |
| 278 | + STUV |
| 279 | + XYZ. |
| 280 | +} |
| 281 | +write_file_indented t3 { |
| 282 | + abcd |
| 283 | + efgh |
| 284 | + ijkl |
| 285 | + mnop 3 |
| 286 | + qrst 3 |
| 287 | + uvwx 3 |
| 288 | + yzAB 3 |
| 289 | + CDEF |
| 290 | + GHIJ |
| 291 | + KLMN |
| 292 | + OPQR |
| 293 | + STUV |
| 294 | + XYZ. |
| 295 | +} |
| 296 | +write_file_indented t23 { |
| 297 | + abcd |
| 298 | + >>>>>>> BEGIN MERGE CONFLICT |
| 299 | + efgh 2 |
| 300 | + ijkl 2 |
| 301 | + mnop 2 |
| 302 | + qrst |
| 303 | + uvwx |
| 304 | + yzAB 2 |
| 305 | + CDEF 2 |
| 306 | + GHIJ 2 |
| 307 | + ============================ |
| 308 | + efgh |
| 309 | + ijkl |
| 310 | + mnop 3 |
| 311 | + qrst 3 |
| 312 | + uvwx 3 |
| 313 | + yzAB 3 |
| 314 | + CDEF |
| 315 | + GHIJ |
| 316 | + <<<<<<< END MERGE CONFLICT |
| 317 | + KLMN |
| 318 | + OPQR |
| 319 | + STUV |
| 320 | + XYZ. |
| 321 | +} |
| 322 | +fossil test-3 t1 t2 t3 a23 |
| 323 | +test merge1-7.1 {[same_file t23 a23]} |
| 324 | + |
| 325 | +write_file_indented t2 { |
| 326 | + abcd |
| 327 | + efgh 2 |
| 328 | + ijkl 2 |
| 329 | + mnop |
| 330 | + qrst |
| 331 | + uvwx |
| 332 | + yzAB 2 |
| 333 | + CDEF 2 |
| 334 | + GHIJ 2 |
| 335 | + KLMN |
| 336 | + OPQR |
| 337 | + STUV |
| 338 | + XYZ. |
| 339 | +} |
| 340 | +write_file_indented t3 { |
| 341 | + abcd |
| 342 | + efgh |
| 343 | + ijkl |
| 344 | + mnop 3 |
| 345 | + qrst 3 |
| 346 | + uvwx 3 |
| 347 | + yzAB 3 |
| 348 | + CDEF |
| 349 | + GHIJ |
| 350 | + KLMN |
| 351 | + OPQR |
| 352 | + STUV |
| 353 | + XYZ. |
| 354 | +} |
| 355 | +write_file_indented t23 { |
| 356 | + abcd |
| 357 | + efgh 2 |
| 358 | + ijkl 2 |
| 359 | + >>>>>>> BEGIN MERGE CONFLICT |
| 360 | + mnop |
| 361 | + qrst |
| 362 | + uvwx |
| 363 | + yzAB 2 |
| 364 | + CDEF 2 |
| 365 | + GHIJ 2 |
| 366 | + ============================ |
| 367 | + mnop 3 |
| 368 | + qrst 3 |
| 369 | + uvwx 3 |
| 370 | + yzAB 3 |
| 371 | + CDEF |
| 372 | + GHIJ |
| 373 | + <<<<<<< END MERGE CONFLICT |
| 374 | + KLMN |
| 375 | + OPQR |
| 376 | + STUV |
| 377 | + XYZ. |
| 378 | +} |
| 379 | +fossil test-3 t1 t2 t3 a23 |
| 380 | +test merge1-7.2 {[same_file t23 a23]} |
| 240 | 381 | |