Artifact 419c5c1aa7f65358008dca1190900e2f90f48950:
File
test/merge1.test
part of check-in
[dbda8d6ce9]
- Initial check-in of m1 sources.
by
drh on
2007-07-21 14:10:57.
0000: 23 0a 23 20 43 6f 70 79 72 69 67 68 74 20 28 63 #.# Copyright (c
0010: 29 20 32 30 30 36 20 44 2e 20 52 69 63 68 61 72 ) 2006 D. Richar
0020: 64 20 48 69 70 70 0a 23 0a 23 20 54 68 69 73 20 d Hipp.#.# This
0030: 70 72 6f 67 72 61 6d 20 69 73 20 66 72 65 65 20 program is free
0040: 73 6f 66 74 77 61 72 65 3b 20 79 6f 75 20 63 61 software; you ca
0050: 6e 20 72 65 64 69 73 74 72 69 62 75 74 65 20 69 n redistribute i
0060: 74 20 61 6e 64 2f 6f 72 0a 23 20 6d 6f 64 69 66 t and/or.# modif
0070: 79 20 69 74 20 75 6e 64 65 72 20 74 68 65 20 74 y it under the t
0080: 65 72 6d 73 20 6f 66 20 74 68 65 20 47 4e 55 20 erms of the GNU
0090: 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 0a 23 General Public.#
00a0: 20 4c 69 63 65 6e 73 65 20 76 65 72 73 69 6f 6e License version
00b0: 20 32 20 61 73 20 70 75 62 6c 69 73 68 65 64 20 2 as published
00c0: 62 79 20 74 68 65 20 46 72 65 65 20 53 6f 66 74 by the Free Soft
00d0: 77 61 72 65 20 46 6f 75 6e 64 61 74 69 6f 6e 2e ware Foundation.
00e0: 0a 23 0a 23 20 54 68 69 73 20 70 72 6f 67 72 61 .#.# This progra
00f0: 6d 20 69 73 20 64 69 73 74 72 69 62 75 74 65 64 m is distributed
0100: 20 69 6e 20 74 68 65 20 68 6f 70 65 20 74 68 61 in the hope tha
0110: 74 20 69 74 20 77 69 6c 6c 20 62 65 20 75 73 65 t it will be use
0120: 66 75 6c 2c 0a 23 20 62 75 74 20 57 49 54 48 4f ful,.# but WITHO
0130: 55 54 20 41 4e 59 20 57 41 52 52 41 4e 54 59 3b UT ANY WARRANTY;
0140: 20 77 69 74 68 6f 75 74 20 65 76 65 6e 20 74 68 without even th
0150: 65 20 69 6d 70 6c 69 65 64 20 77 61 72 72 61 6e e implied warran
0160: 74 79 20 6f 66 0a 23 20 4d 45 52 43 48 41 4e 54 ty of.# MERCHANT
0170: 41 42 49 4c 49 54 59 20 6f 72 20 46 49 54 4e 45 ABILITY or FITNE
0180: 53 53 20 46 4f 52 20 41 20 50 41 52 54 49 43 55 SS FOR A PARTICU
0190: 4c 41 52 20 50 55 52 50 4f 53 45 2e 20 20 53 65 LAR PURPOSE. Se
01a0: 65 20 74 68 65 20 47 4e 55 0a 23 20 47 65 6e 65 e the GNU.# Gene
01b0: 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 65 6e ral Public Licen
01c0: 73 65 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 se for more deta
01d0: 69 6c 73 2e 0a 23 20 0a 23 20 59 6f 75 20 73 68 ils..# .# You sh
01e0: 6f 75 6c 64 20 68 61 76 65 20 72 65 63 65 69 76 ould have receiv
01f0: 65 64 20 61 20 63 6f 70 79 20 6f 66 20 74 68 65 ed a copy of the
0200: 20 47 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 62 GNU General Pub
0210: 6c 69 63 0a 23 20 4c 69 63 65 6e 73 65 20 61 6c lic.# License al
0220: 6f 6e 67 20 77 69 74 68 20 74 68 69 73 20 6c 69 ong with this li
0230: 62 72 61 72 79 3b 20 69 66 20 6e 6f 74 2c 20 77 brary; if not, w
0240: 72 69 74 65 20 74 6f 20 74 68 65 0a 23 20 46 72 rite to the.# Fr
0250: 65 65 20 53 6f 66 74 77 61 72 65 20 46 6f 75 6e ee Software Foun
0260: 64 61 74 69 6f 6e 2c 20 49 6e 63 2e 2c 20 35 39 dation, Inc., 59
0270: 20 54 65 6d 70 6c 65 20 50 6c 61 63 65 20 2d 20 Temple Place -
0280: 53 75 69 74 65 20 33 33 30 2c 0a 23 20 42 6f 73 Suite 330,.# Bos
0290: 74 6f 6e 2c 20 4d 41 20 20 30 32 31 31 31 2d 31 ton, MA 02111-1
02a0: 33 30 37 2c 20 55 53 41 2e 0a 23 0a 23 20 41 75 307, USA..#.# Au
02b0: 74 68 6f 72 20 63 6f 6e 74 61 63 74 20 69 6e 66 thor contact inf
02c0: 6f 72 6d 61 74 69 6f 6e 3a 0a 23 20 20 20 64 72 ormation:.# dr
02d0: 68 40 68 77 61 63 69 2e 63 6f 6d 0a 23 20 20 20 h@hwaci.com.#
02e0: 68 74 74 70 3a 2f 2f 77 77 77 2e 68 77 61 63 69 http://www.hwaci
02f0: 2e 63 6f 6d 2f 64 72 68 2f 0a 23 0a 23 23 23 23 .com/drh/.#.####
0300: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0310: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0320: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0330: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0340: 23 23 23 23 23 23 23 23 0a 23 0a 23 20 54 65 73 ########.#.# Tes
0350: 74 73 20 6f 66 20 74 68 65 20 64 65 6c 74 61 20 ts of the delta
0360: 6d 65 63 68 61 6e 69 73 6d 2e 0a 23 0a 0a 77 72 mechanism..#..wr
0370: 69 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 ite_file_indente
0380: 64 20 74 31 20 7b 0a 20 20 31 31 31 20 2d 20 54 d t1 {. 111 - T
0390: 68 69 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 his is line one
03a0: 6f 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 of the demo prog
03b0: 72 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 ram - 1111. 222
03c0: 20 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 - The second li
03d0: 6e 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 ne program line
03e0: 69 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 in code - 2222.
03f0: 20 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 333 - This is a
0400: 20 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 test of the mer
0410: 67 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 ging algohm - 33
0420: 33 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 33. 444 - If al
0430: 6c 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 l goes well, we
0440: 77 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 will be pleased
0450: 2d 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 - 4444. 555 - w
0460: 65 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 e think it well
0470: 61 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 and other stuff
0480: 74 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 too - 5555.}.wri
0490: 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 te_file_indented
04a0: 20 74 32 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 t2 {. 111 - Th
04b0: 69 73 20 69 73 20 6c 69 6e 65 20 4f 4e 45 20 6f is is line ONE o
04c0: 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 f the demo progr
04d0: 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 am - 1111. 222
04e0: 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e - The second lin
04f0: 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 e program line i
0500: 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 n code - 2222.
0510: 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 333 - This is a
0520: 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 test of the merg
0530: 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 ing algohm - 333
0540: 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 3. 444 - If all
0550: 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 goes well, we w
0560: 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d ill be pleased -
0570: 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 4444. 555 - we
0580: 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 think it well a
0590: 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 nd other stuff t
05a0: 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 oo - 5555.}.writ
05b0: 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 e_file_indented
05c0: 74 33 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 69 t3 {. 111 - Thi
05d0: 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 6f 66 s is line one of
05e0: 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 61 the demo progra
05f0: 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 2d m - 1111. 222 -
0600: 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 The second line
0610: 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e program line in
0620: 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 code - 2222. 3
0630: 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 33 - This is a t
0640: 65 73 74 20 4f 46 20 54 48 45 20 6d 65 72 67 69 est OF THE mergi
0650: 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 ng algohm - 3333
0660: 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 . 444 - If all
0670: 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 goes well, we wi
0680: 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 ll be pleased -
0690: 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 4444. 555 - we
06a0: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
06b0: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
06c0: 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 65 o - 5555.}.write
06d0: 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 74 _file_indented t
06e0: 32 33 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 69 23 {. 111 - Thi
06f0: 73 20 69 73 20 6c 69 6e 65 20 4f 4e 45 20 6f 66 s is line ONE of
0700: 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 61 the demo progra
0710: 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 2d m - 1111. 222 -
0720: 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 The second line
0730: 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e program line in
0740: 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 code - 2222. 3
0750: 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 33 - This is a t
0760: 65 73 74 20 4f 46 20 54 48 45 20 6d 65 72 67 69 est OF THE mergi
0770: 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 ng algohm - 3333
0780: 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 . 444 - If all
0790: 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 goes well, we wi
07a0: 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 ll be pleased -
07b0: 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 4444. 555 - we
07c0: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
07d0: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
07e0: 6f 20 2d 20 35 35 35 35 0a 7d 0a 66 6f 73 73 69 o - 5555.}.fossi
07f0: 6c 20 74 65 73 74 2d 33 20 74 31 20 74 33 20 74 l test-3 t1 t3 t
0800: 32 20 61 33 32 0a 74 65 73 74 20 6d 65 72 67 65 2 a32.test merge
0810: 31 2d 31 2e 31 20 7b 5b 73 61 6d 65 5f 66 69 6c 1-1.1 {[same_fil
0820: 65 20 74 32 33 20 61 33 32 5d 7d 0a 66 6f 73 73 e t23 a32]}.foss
0830: 69 6c 20 74 65 73 74 2d 33 20 74 31 20 74 32 20 il test-3 t1 t2
0840: 74 33 20 61 32 33 0a 74 65 73 74 20 6d 65 72 67 t3 a23.test merg
0850: 65 31 2d 31 2e 32 20 7b 5b 73 61 6d 65 5f 66 69 e1-1.2 {[same_fi
0860: 6c 65 20 74 32 33 20 61 32 33 5d 7d 0a 0a 77 72 le t23 a23]}..wr
0870: 69 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 ite_file_indente
0880: 64 20 74 31 20 7b 0a 20 20 31 31 31 20 2d 20 54 d t1 {. 111 - T
0890: 68 69 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 his is line one
08a0: 6f 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 of the demo prog
08b0: 72 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 ram - 1111. 222
08c0: 20 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 - The second li
08d0: 6e 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 ne program line
08e0: 69 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 in code - 2222.
08f0: 20 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 333 - This is a
0900: 20 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 test of the mer
0910: 67 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 ging algohm - 33
0920: 33 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 33. 444 - If al
0930: 6c 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 l goes well, we
0940: 77 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 will be pleased
0950: 2d 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 - 4444. 555 - w
0960: 65 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 e think it well
0970: 61 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 and other stuff
0980: 74 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 too - 5555.}.wri
0990: 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 te_file_indented
09a0: 20 74 32 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 t2 {. 111 - Th
09b0: 69 73 20 69 73 20 6c 69 6e 65 20 4f 4e 45 20 6f is is line ONE o
09c0: 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 f the demo progr
09d0: 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 am - 1111. 222
09e0: 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e - The second lin
09f0: 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 e program line i
0a00: 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 n code - 2222.
0a10: 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 333 - This is a
0a20: 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 test of the merg
0a30: 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 ing algohm - 333
0a40: 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 3. 444 - If all
0a50: 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 goes well, we w
0a60: 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d ill be pleased -
0a70: 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 4444. 555 - we
0a80: 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 think it well a
0a90: 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 nd other stuff t
0aa0: 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 oo - 5555.}.writ
0ab0: 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 e_file_indented
0ac0: 74 33 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 69 t3 {. 111 - Thi
0ad0: 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 4f 46 s is line one OF
0ae0: 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 61 the demo progra
0af0: 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 2d m - 1111. 222 -
0b00: 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 The second line
0b10: 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e program line in
0b20: 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 code - 2222. 3
0b30: 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 33 - This is a t
0b40: 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 69 est of the mergi
0b50: 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 ng algohm - 3333
0b60: 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 . 444 - If all
0b70: 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 goes well, we wi
0b80: 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 ll be pleased -
0b90: 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 4444. 555 - we
0ba0: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
0bb0: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
0bc0: 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 65 o - 5555.}.write
0bd0: 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 74 _file_indented t
0be0: 32 33 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 69 23 {. 111 - Thi
0bf0: 73 20 69 73 20 6c 69 6e 65 20 4f 4e 45 20 4f 46 s is line ONE OF
0c00: 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 61 the demo progra
0c10: 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 2d m - 1111. 222 -
0c20: 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 The second line
0c30: 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e program line in
0c40: 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 code - 2222. 3
0c50: 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 33 - This is a t
0c60: 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 69 est of the mergi
0c70: 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 ng algohm - 3333
0c80: 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 . 444 - If all
0c90: 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 goes well, we wi
0ca0: 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 ll be pleased -
0cb0: 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 4444. 555 - we
0cc0: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
0cd0: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
0ce0: 6f 20 2d 20 35 35 35 35 0a 7d 0a 66 6f 73 73 69 o - 5555.}.fossi
0cf0: 6c 20 74 65 73 74 2d 33 20 74 31 20 74 33 20 74 l test-3 t1 t3 t
0d00: 32 20 61 33 32 0a 74 65 73 74 20 6d 65 72 67 65 2 a32.test merge
0d10: 31 2d 32 2e 31 20 7b 5b 73 61 6d 65 5f 66 69 6c 1-2.1 {[same_fil
0d20: 65 20 74 32 33 20 61 33 32 5d 7d 0a 66 6f 73 73 e t23 a32]}.foss
0d30: 69 6c 20 74 65 73 74 2d 33 20 74 31 20 74 32 20 il test-3 t1 t2
0d40: 74 33 20 61 32 33 0a 74 65 73 74 20 6d 65 72 67 t3 a23.test merg
0d50: 65 31 2d 32 2e 32 20 7b 5b 73 61 6d 65 5f 66 69 e1-2.2 {[same_fi
0d60: 6c 65 20 74 32 33 20 61 32 33 5d 7d 0a 0a 77 72 le t23 a23]}..wr
0d70: 69 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 ite_file_indente
0d80: 64 20 74 31 20 7b 0a 20 20 31 31 31 20 2d 20 54 d t1 {. 111 - T
0d90: 68 69 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 his is line one
0da0: 6f 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 of the demo prog
0db0: 72 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 ram - 1111. 222
0dc0: 20 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 - The second li
0dd0: 6e 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 ne program line
0de0: 69 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 in code - 2222.
0df0: 20 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 333 - This is a
0e00: 20 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 test of the mer
0e10: 67 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 ging algohm - 33
0e20: 33 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 33. 444 - If al
0e30: 6c 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 l goes well, we
0e40: 77 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 will be pleased
0e50: 2d 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 - 4444. 555 - w
0e60: 65 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 e think it well
0e70: 61 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 and other stuff
0e80: 74 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 too - 5555.}.wri
0e90: 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 te_file_indented
0ea0: 20 74 32 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 t2 {. 111 - Th
0eb0: 69 73 20 69 73 20 6c 69 6e 65 20 4f 4e 45 20 6f is is line ONE o
0ec0: 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 f the demo progr
0ed0: 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 am - 1111. 222
0ee0: 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e - The second lin
0ef0: 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 e program line i
0f00: 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 n code - 2222.
0f10: 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 333 - This is a
0f20: 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 test of the merg
0f30: 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 ing algohm - 333
0f40: 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 3. 444 - If all
0f50: 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 goes well, we w
0f60: 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d ill be pleased -
0f70: 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 4444. 555 - we
0f80: 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 think it well a
0f90: 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 nd other stuff t
0fa0: 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 oo - 5555.}.writ
0fb0: 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 e_file_indented
0fc0: 74 33 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 69 t3 {. 111 - Thi
0fd0: 73 20 69 73 20 6c 69 6e 65 20 4f 4e 45 20 6f 66 s is line ONE of
0fe0: 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 61 the demo progra
0ff0: 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 2d m - 1111. 222 -
1000: 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 The second line
1010: 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e program line in
1020: 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 code - 2222. 3
1030: 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 33 - This is a t
1040: 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 69 est of the mergi
1050: 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 ng algohm - 3333
1060: 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 . 444 - If all
1070: 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 goes well, we wi
1080: 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 ll be pleased -
1090: 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 4444. 555 - we
10a0: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
10b0: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
10c0: 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 65 o - 5555.}.write
10d0: 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 74 _file_indented t
10e0: 32 33 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 69 23 {. 111 - Thi
10f0: 73 20 69 73 20 6c 69 6e 65 20 4f 4e 45 20 6f 66 s is line ONE of
1100: 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 61 the demo progra
1110: 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 2d m - 1111. 222 -
1120: 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 The second line
1130: 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e program line in
1140: 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 code - 2222. 3
1150: 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 33 - This is a t
1160: 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 69 est of the mergi
1170: 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 ng algohm - 3333
1180: 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 . 444 - If all
1190: 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 goes well, we wi
11a0: 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 ll be pleased -
11b0: 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 4444. 555 - we
11c0: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
11d0: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
11e0: 6f 20 2d 20 35 35 35 35 0a 7d 0a 66 6f 73 73 69 o - 5555.}.fossi
11f0: 6c 20 74 65 73 74 2d 33 20 74 31 20 74 33 20 74 l test-3 t1 t3 t
1200: 32 20 61 33 32 0a 74 65 73 74 20 6d 65 72 67 65 2 a32.test merge
1210: 31 2d 33 2e 31 20 7b 5b 73 61 6d 65 5f 66 69 6c 1-3.1 {[same_fil
1220: 65 20 74 32 33 20 61 33 32 5d 7d 0a 66 6f 73 73 e t23 a32]}.foss
1230: 69 6c 20 74 65 73 74 2d 33 20 74 31 20 74 32 20 il test-3 t1 t2
1240: 74 33 20 61 32 33 0a 74 65 73 74 20 6d 65 72 67 t3 a23.test merg
1250: 65 31 2d 33 2e 32 20 7b 5b 73 61 6d 65 5f 66 69 e1-3.2 {[same_fi
1260: 6c 65 20 74 32 33 20 61 32 33 5d 7d 0a 0a 77 72 le t23 a23]}..wr
1270: 69 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 ite_file_indente
1280: 64 20 74 31 20 7b 0a 20 20 31 31 31 20 2d 20 54 d t1 {. 111 - T
1290: 68 69 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 his is line one
12a0: 6f 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 of the demo prog
12b0: 72 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 ram - 1111. 222
12c0: 20 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 - The second li
12d0: 6e 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 ne program line
12e0: 69 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 in code - 2222.
12f0: 20 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 333 - This is a
1300: 20 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 test of the mer
1310: 67 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 ging algohm - 33
1320: 33 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 33. 444 - If al
1330: 6c 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 l goes well, we
1340: 77 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 will be pleased
1350: 2d 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 - 4444. 555 - w
1360: 65 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 e think it well
1370: 61 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 and other stuff
1380: 74 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 too - 5555.}.wri
1390: 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 te_file_indented
13a0: 20 74 32 20 7b 0a 20 20 30 30 30 20 2d 20 5a 65 t2 {. 000 - Ze
13b0: 72 6f 20 6c 69 6e 65 73 20 61 64 64 65 64 20 74 ro lines added t
13c0: 6f 20 74 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 o the beginning
13d0: 6f 66 20 2d 20 30 30 30 30 0a 20 20 31 31 31 20 of - 0000. 111
13e0: 2d 20 54 68 69 73 20 69 73 20 6c 69 6e 65 20 6f - This is line o
13f0: 6e 65 20 6f 66 20 74 68 65 20 64 65 6d 6f 20 70 ne of the demo p
1400: 72 6f 67 72 61 6d 20 2d 20 31 31 31 31 0a 20 20 rogram - 1111.
1410: 32 32 32 20 2d 20 54 68 65 20 73 65 63 6f 6e 64 222 - The second
1420: 20 6c 69 6e 65 20 70 72 6f 67 72 61 6d 20 6c 69 line program li
1430: 6e 65 20 69 6e 20 63 6f 64 65 20 2d 20 32 32 32 ne in code - 222
1440: 32 0a 20 20 33 33 33 20 2d 20 54 68 69 73 20 69 2. 333 - This i
1450: 73 20 61 20 74 65 73 74 20 6f 66 20 74 68 65 20 s a test of the
1460: 6d 65 72 67 69 6e 67 20 61 6c 67 6f 68 6d 20 2d merging algohm -
1470: 20 33 33 33 33 0a 20 20 34 34 34 20 2d 20 49 66 3333. 444 - If
1480: 20 61 6c 6c 20 67 6f 65 73 20 77 65 6c 6c 2c 20 all goes well,
1490: 77 65 20 77 69 6c 6c 20 62 65 20 70 6c 65 61 73 we will be pleas
14a0: 65 64 20 2d 20 34 34 34 34 0a 20 20 35 35 35 20 ed - 4444. 555
14b0: 2d 20 77 65 20 74 68 69 6e 6b 20 69 74 20 77 65 - we think it we
14c0: 6c 6c 20 61 6e 64 20 6f 74 68 65 72 20 73 74 75 ll and other stu
14d0: 66 66 20 74 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a ff too - 5555.}.
14e0: 77 72 69 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e write_file_inden
14f0: 74 65 64 20 74 33 20 7b 0a 20 20 32 32 32 20 2d ted t3 {. 222 -
1500: 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 The second line
1510: 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e program line in
1520: 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 code - 2222. 3
1530: 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 33 - This is a t
1540: 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 69 est of the mergi
1550: 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 ng algohm - 3333
1560: 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 . 444 - If all
1570: 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 goes well, we wi
1580: 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 ll be pleased -
1590: 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 4444. 555 - we
15a0: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
15b0: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
15c0: 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 65 o - 5555.}.write
15d0: 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 74 _file_indented t
15e0: 33 32 20 7b 0a 20 20 30 30 30 20 2d 20 5a 65 72 32 {. 000 - Zer
15f0: 6f 20 6c 69 6e 65 73 20 61 64 64 65 64 20 74 6f o lines added to
1600: 20 74 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 6f the beginning o
1610: 66 20 2d 20 30 30 30 30 0a 20 20 32 32 32 20 2d f - 0000. 222 -
1620: 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 The second line
1630: 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e program line in
1640: 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 code - 2222. 3
1650: 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 33 - This is a t
1660: 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 69 est of the mergi
1670: 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 ng algohm - 3333
1680: 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 . 444 - If all
1690: 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 goes well, we wi
16a0: 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 ll be pleased -
16b0: 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 4444. 555 - we
16c0: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
16d0: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
16e0: 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 65 o - 5555.}.write
16f0: 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 74 _file_indented t
1700: 32 33 20 7b 0a 20 20 30 30 30 20 2d 20 5a 65 72 23 {. 000 - Zer
1710: 6f 20 6c 69 6e 65 73 20 61 64 64 65 64 20 74 6f o lines added to
1720: 20 74 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 6f the beginning o
1730: 66 20 2d 20 30 30 30 30 0a 20 20 32 32 32 20 2d f - 0000. 222 -
1740: 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 The second line
1750: 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e program line in
1760: 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 code - 2222. 3
1770: 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 33 - This is a t
1780: 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 69 est of the mergi
1790: 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 ng algohm - 3333
17a0: 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 . 444 - If all
17b0: 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 goes well, we wi
17c0: 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 ll be pleased -
17d0: 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 4444. 555 - we
17e0: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
17f0: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
1800: 6f 20 2d 20 35 35 35 35 0a 7d 0a 66 6f 73 73 69 o - 5555.}.fossi
1810: 6c 20 74 65 73 74 2d 33 20 74 31 20 74 33 20 74 l test-3 t1 t3 t
1820: 32 20 61 33 32 0a 74 65 73 74 20 6d 65 72 67 65 2 a32.test merge
1830: 31 2d 34 2e 31 20 7b 5b 73 61 6d 65 5f 66 69 6c 1-4.1 {[same_fil
1840: 65 20 74 33 32 20 61 33 32 5d 7d 0a 66 6f 73 73 e t32 a32]}.foss
1850: 69 6c 20 74 65 73 74 2d 33 20 74 31 20 74 32 20 il test-3 t1 t2
1860: 74 33 20 61 32 33 0a 74 65 73 74 20 6d 65 72 67 t3 a23.test merg
1870: 65 31 2d 34 2e 32 20 7b 5b 73 61 6d 65 5f 66 69 e1-4.2 {[same_fi
1880: 6c 65 20 74 32 33 20 61 32 33 5d 7d 0a 0a 77 72 le t23 a23]}..wr
1890: 69 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 ite_file_indente
18a0: 64 20 74 31 20 7b 0a 20 20 31 31 31 20 2d 20 54 d t1 {. 111 - T
18b0: 68 69 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 his is line one
18c0: 6f 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 of the demo prog
18d0: 72 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 ram - 1111. 222
18e0: 20 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 - The second li
18f0: 6e 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 ne program line
1900: 69 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 in code - 2222.
1910: 20 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 333 - This is a
1920: 20 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 test of the mer
1930: 67 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 ging algohm - 33
1940: 33 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 33. 444 - If al
1950: 6c 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 l goes well, we
1960: 77 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 will be pleased
1970: 2d 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 - 4444. 555 - w
1980: 65 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 e think it well
1990: 61 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 and other stuff
19a0: 74 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 too - 5555.}.wri
19b0: 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 te_file_indented
19c0: 20 74 32 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 t2 {. 111 - Th
19d0: 69 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 6f is is line one o
19e0: 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 f the demo progr
19f0: 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 am - 1111. 222
1a00: 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e - The second lin
1a10: 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 e program line i
1a20: 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 n code - 2222.
1a30: 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 333 - This is a
1a40: 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 test of the merg
1a50: 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 ing algohm - 333
1a60: 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 3. 444 - If all
1a70: 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 goes well, we w
1a80: 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d ill be pleased -
1a90: 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 4444. 555 - we
1aa0: 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 think it well a
1ab0: 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 nd other stuff t
1ac0: 6f 6f 20 2d 20 35 35 35 35 0a 20 20 36 36 36 20 oo - 5555. 666
1ad0: 2d 20 45 78 74 72 61 20 6c 69 6e 65 20 61 74 20 - Extra line at
1ae0: 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 66 the end of the f
1af0: 69 6c 65 20 77 69 20 2d 20 36 36 36 36 0a 7d 0a ile wi - 6666.}.
1b00: 77 72 69 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e write_file_inden
1b10: 74 65 64 20 74 33 20 7b 0a 20 20 32 32 32 20 2d ted t3 {. 222 -
1b20: 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 The second line
1b30: 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e program line in
1b40: 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 code - 2222. 3
1b50: 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 33 - This is a t
1b60: 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 69 est of the mergi
1b70: 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 ng algohm - 3333
1b80: 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 . 444 - If all
1b90: 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 goes well, we wi
1ba0: 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 ll be pleased -
1bb0: 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 4444. 555 - we
1bc0: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
1bd0: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
1be0: 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 65 o - 5555.}.write
1bf0: 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 74 _file_indented t
1c00: 33 32 20 7b 0a 20 20 32 32 32 20 2d 20 54 68 65 32 {. 222 - The
1c10: 20 73 65 63 6f 6e 64 20 6c 69 6e 65 20 70 72 6f second line pro
1c20: 67 72 61 6d 20 6c 69 6e 65 20 69 6e 20 63 6f 64 gram line in cod
1c30: 65 20 2d 20 32 32 32 32 0a 20 20 33 33 33 20 2d e - 2222. 333 -
1c40: 20 54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 This is a test
1c50: 6f 66 20 74 68 65 20 6d 65 72 67 69 6e 67 20 61 of the merging a
1c60: 6c 67 6f 68 6d 20 2d 20 33 33 33 33 0a 20 20 34 lgohm - 3333. 4
1c70: 34 34 20 2d 20 49 66 20 61 6c 6c 20 67 6f 65 73 44 - If all goes
1c80: 20 77 65 6c 6c 2c 20 77 65 20 77 69 6c 6c 20 62 well, we will b
1c90: 65 20 70 6c 65 61 73 65 64 20 2d 20 34 34 34 34 e pleased - 4444
1ca0: 0a 20 20 35 35 35 20 2d 20 77 65 20 74 68 69 6e . 555 - we thin
1cb0: 6b 20 69 74 20 77 65 6c 6c 20 61 6e 64 20 6f 74 k it well and ot
1cc0: 68 65 72 20 73 74 75 66 66 20 74 6f 6f 20 2d 20 her stuff too -
1cd0: 35 35 35 35 0a 20 20 36 36 36 20 2d 20 45 78 74 5555. 666 - Ext
1ce0: 72 61 20 6c 69 6e 65 20 61 74 20 74 68 65 20 65 ra line at the e
1cf0: 6e 64 20 6f 66 20 74 68 65 20 66 69 6c 65 20 77 nd of the file w
1d00: 69 20 2d 20 36 36 36 36 0a 7d 0a 66 6f 73 73 69 i - 6666.}.fossi
1d10: 6c 20 74 65 73 74 2d 33 20 74 31 20 74 33 20 74 l test-3 t1 t3 t
1d20: 32 20 61 33 32 0a 74 65 73 74 20 6d 65 72 67 65 2 a32.test merge
1d30: 31 2d 35 2e 31 20 7b 5b 73 61 6d 65 5f 66 69 6c 1-5.1 {[same_fil
1d40: 65 20 74 33 32 20 61 33 32 5d 7d 0a 66 6f 73 73 e t32 a32]}.foss
1d50: 69 6c 20 74 65 73 74 2d 33 20 74 31 20 74 32 20 il test-3 t1 t2
1d60: 74 33 20 61 32 33 0a 74 65 73 74 20 6d 65 72 67 t3 a23.test merg
1d70: 65 31 2d 35 2e 32 20 7b 5b 73 61 6d 65 5f 66 69 e1-5.2 {[same_fi
1d80: 6c 65 20 74 33 32 20 61 32 33 5d 7d 0a 0a 77 72 le t32 a23]}..wr
1d90: 69 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 ite_file_indente
1da0: 64 20 74 31 20 7b 0a 20 20 31 31 31 20 2d 20 54 d t1 {. 111 - T
1db0: 68 69 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 his is line one
1dc0: 6f 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 of the demo prog
1dd0: 72 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 ram - 1111. 222
1de0: 20 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 - The second li
1df0: 6e 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 ne program line
1e00: 69 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 in code - 2222.
1e10: 20 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 333 - This is a
1e20: 20 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 test of the mer
1e30: 67 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 ging algohm - 33
1e40: 33 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 33. 444 - If al
1e50: 6c 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 l goes well, we
1e60: 77 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 will be pleased
1e70: 2d 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 - 4444. 555 - w
1e80: 65 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 e think it well
1e90: 61 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 and other stuff
1ea0: 74 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 too - 5555.}.wri
1eb0: 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 te_file_indented
1ec0: 20 74 32 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 t2 {. 111 - Th
1ed0: 69 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 6f is is line one o
1ee0: 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 f the demo progr
1ef0: 61 6d 20 2d 20 31 31 31 31 0a 20 20 33 33 33 20 am - 1111. 333
1f00: 2d 20 54 68 69 73 20 69 73 20 61 20 74 65 73 74 - This is a test
1f10: 20 6f 66 20 74 68 65 20 6d 65 72 67 69 6e 67 20 of the merging
1f20: 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 0a 20 20 algohm - 3333.
1f30: 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 67 6f 65 444 - If all goe
1f40: 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 6c 6c 20 s well, we will
1f50: 62 65 20 70 6c 65 61 73 65 64 20 2d 20 34 34 34 be pleased - 444
1f60: 34 0a 20 20 35 35 35 20 2d 20 77 65 20 74 68 69 4. 555 - we thi
1f70: 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e 64 20 6f nk it well and o
1f80: 74 68 65 72 20 73 74 75 66 66 20 74 6f 6f 20 2d ther stuff too -
1f90: 20 35 35 35 35 0a 7d 0a 77 72 69 74 65 5f 66 69 5555.}.write_fi
1fa0: 6c 65 5f 69 6e 64 65 6e 74 65 64 20 74 33 20 7b le_indented t3 {
1fb0: 0a 20 20 31 31 31 20 2d 20 54 68 69 73 20 69 73 . 111 - This is
1fc0: 20 6c 69 6e 65 20 6f 6e 65 20 6f 66 20 74 68 65 line one of the
1fd0: 20 64 65 6d 6f 20 70 72 6f 67 72 61 6d 20 2d 20 demo program -
1fe0: 31 31 31 31 0a 20 20 32 32 32 20 2d 20 54 68 65 1111. 222 - The
1ff0: 20 73 65 63 6f 6e 64 20 6c 69 6e 65 20 70 72 6f second line pro
2000: 67 72 61 6d 20 6c 69 6e 65 20 69 6e 20 63 6f 64 gram line in cod
2010: 65 20 2d 20 32 32 32 32 0a 20 20 33 33 33 20 2d e - 2222. 333 -
2020: 20 54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 This is a test
2030: 6f 66 20 74 68 65 20 6d 65 72 67 69 6e 67 20 61 of the merging a
2040: 6c 67 6f 68 6d 20 2d 20 33 33 33 33 0a 20 20 35 lgohm - 3333. 5
2050: 35 35 20 2d 20 77 65 20 74 68 69 6e 6b 20 69 74 55 - we think it
2060: 20 77 65 6c 6c 20 61 6e 64 20 6f 74 68 65 72 20 well and other
2070: 73 74 75 66 66 20 74 6f 6f 20 2d 20 35 35 35 35 stuff too - 5555
2080: 0a 7d 0a 77 72 69 74 65 5f 66 69 6c 65 5f 69 6e .}.write_file_in
2090: 64 65 6e 74 65 64 20 74 33 32 20 7b 0a 20 20 31 dented t32 {. 1
20a0: 31 31 20 2d 20 54 68 69 73 20 69 73 20 6c 69 6e 11 - This is lin
20b0: 65 20 6f 6e 65 20 6f 66 20 74 68 65 20 64 65 6d e one of the dem
20c0: 6f 20 70 72 6f 67 72 61 6d 20 2d 20 31 31 31 31 o program - 1111
20d0: 0a 20 20 33 33 33 20 2d 20 54 68 69 73 20 69 73 . 333 - This is
20e0: 20 61 20 74 65 73 74 20 6f 66 20 74 68 65 20 6d a test of the m
20f0: 65 72 67 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 erging algohm -
2100: 33 33 33 33 0a 20 20 35 35 35 20 2d 20 77 65 20 3333. 555 - we
2110: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
2120: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
2130: 6f 20 2d 20 35 35 35 35 0a 7d 0a 66 6f 73 73 69 o - 5555.}.fossi
2140: 6c 20 74 65 73 74 2d 33 20 74 31 20 74 33 20 74 l test-3 t1 t3 t
2150: 32 20 61 33 32 0a 74 65 73 74 20 6d 65 72 67 65 2 a32.test merge
2160: 31 2d 36 2e 31 20 7b 5b 73 61 6d 65 5f 66 69 6c 1-6.1 {[same_fil
2170: 65 20 74 33 32 20 61 33 32 5d 7d 0a 66 6f 73 73 e t32 a32]}.foss
2180: 69 6c 20 74 65 73 74 2d 33 20 74 31 20 74 32 20 il test-3 t1 t2
2190: 74 33 20 61 32 33 0a 74 65 73 74 20 6d 65 72 67 t3 a23.test merg
21a0: 65 31 2d 36 2e 32 20 7b 5b 73 61 6d 65 5f 66 69 e1-6.2 {[same_fi
21b0: 6c 65 20 74 33 32 20 61 32 33 5d 7d 0a 0a 23 20 le t32 a23]}..#
21c0: 31 32 33 34 35 36 37 38 39 20 31 32 33 34 35 36 123456789 123456
21d0: 37 38 39 20 31 32 33 34 35 36 37 38 39 20 31 32 789 123456789 12
21e0: 33 34 35 36 37 38 39 20 31 32 33 34 35 36 37 38 3456789 12345678
21f0: 39 20 31 32 33 34 35 36 37 38 39 20 0a 77 72 69 9 123456789 .wri
2200: 74 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 te_file_indented
2210: 20 74 31 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 t1 {. 111 - Th
2220: 69 73 20 69 73 20 6c 69 6e 65 20 6f 6e 65 20 6f is is line one o
2230: 66 20 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 f the demo progr
2240: 61 6d 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 am - 1111. 222
2250: 2d 20 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e - The second lin
2260: 65 20 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 e program line i
2270: 6e 20 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 n code - 2222.
2280: 33 33 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 333 - This is a
2290: 74 65 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 test of the merg
22a0: 69 6e 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 ing algohm - 333
22b0: 33 0a 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 3. 444 - If all
22c0: 20 67 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 goes well, we w
22d0: 69 6c 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d ill be pleased -
22e0: 20 34 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 4444. 555 - we
22f0: 20 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 think it well a
2300: 6e 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 nd other stuff t
2310: 6f 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 oo - 5555.}.writ
2320: 65 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 e_file_indented
2330: 74 32 20 7b 0a 20 20 32 32 32 20 2d 20 54 68 65 t2 {. 222 - The
2340: 20 73 65 63 6f 6e 64 20 6c 69 6e 65 20 70 72 6f second line pro
2350: 67 72 61 6d 20 6c 69 6e 65 20 69 6e 20 63 6f 64 gram line in cod
2360: 65 20 2d 20 32 32 32 32 0a 20 20 33 33 33 20 2d e - 2222. 333 -
2370: 20 54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 This is a test
2380: 6f 66 20 54 48 52 45 45 20 72 67 69 6e 67 20 61 of THREE rging a
2390: 6c 67 6f 68 6d 20 2d 20 33 33 33 33 0a 20 20 34 lgohm - 3333. 4
23a0: 34 34 20 2d 20 49 66 20 61 6c 6c 20 67 6f 65 73 44 - If all goes
23b0: 20 77 65 6c 6c 2c 20 77 65 20 77 69 6c 6c 20 62 well, we will b
23c0: 65 20 70 6c 65 61 73 65 64 20 2d 20 34 34 34 34 e pleased - 4444
23d0: 0a 20 20 31 31 31 20 2d 20 54 68 69 73 20 69 73 . 111 - This is
23e0: 20 6c 69 6e 65 20 6f 6e 65 20 6f 66 20 74 68 65 line one of the
23f0: 20 64 65 6d 6f 20 70 72 6f 67 72 61 6d 20 2d 20 demo program -
2400: 31 31 31 31 0a 20 20 35 35 35 20 2d 20 77 65 20 1111. 555 - we
2410: 74 68 69 6e 6b 20 69 74 20 77 65 6c 6c 20 61 6e think it well an
2420: 64 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f d other stuff to
2430: 6f 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 65 o - 5555.}.write
2440: 5f 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 74 _file_indented t
2450: 33 20 7b 0a 20 20 31 31 31 20 2d 20 54 68 69 73 3 {. 111 - This
2460: 20 69 73 20 6c 69 6e 65 20 4f 4e 45 4f 4e 45 20 is line ONEONE
2470: 74 68 65 20 64 65 6d 6f 20 70 72 6f 67 72 61 6d the demo program
2480: 20 2d 20 31 31 31 31 0a 20 20 32 32 32 20 2d 20 - 1111. 222 -
2490: 54 68 65 20 73 65 63 6f 6e 64 20 6c 69 6e 65 20 The second line
24a0: 70 72 6f 67 72 61 6d 20 6c 69 6e 65 20 69 6e 20 program line in
24b0: 63 6f 64 65 20 2d 20 32 32 32 32 0a 20 20 33 33 code - 2222. 33
24c0: 33 20 2d 20 54 68 69 73 20 69 73 20 61 20 74 65 3 - This is a te
24d0: 73 74 20 6f 66 20 74 68 65 20 6d 65 72 67 69 6e st of the mergin
24e0: 67 20 61 6c 67 6f 68 6d 20 2d 20 33 33 33 33 0a g algohm - 3333.
24f0: 20 20 34 34 34 20 2d 20 49 66 20 61 6c 6c 20 67 444 - If all g
2500: 6f 65 73 20 77 65 6c 6c 2c 20 77 65 20 77 69 6c oes well, we wil
2510: 6c 20 62 65 20 70 6c 65 61 73 65 64 20 2d 20 34 l be pleased - 4
2520: 34 34 34 0a 20 20 35 35 35 20 2d 20 77 65 20 74 444. 555 - we t
2530: 68 69 6e 6b 20 69 74 20 46 49 56 45 46 49 56 45 hink it FIVEFIVE
2540: 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f 6f other stuff too
2550: 20 2d 20 35 35 35 35 0a 7d 0a 77 72 69 74 65 5f - 5555.}.write_
2560: 66 69 6c 65 5f 69 6e 64 65 6e 74 65 64 20 74 33 file_indented t3
2570: 32 20 7b 0a 20 20 32 32 32 20 2d 20 54 68 65 20 2 {. 222 - The
2580: 73 65 63 6f 6e 64 20 6c 69 6e 65 20 70 72 6f 67 second line prog
2590: 72 61 6d 20 6c 69 6e 65 20 69 6e 20 63 6f 64 65 ram line in code
25a0: 20 2d 20 32 32 32 32 0a 20 20 33 33 33 20 2d 20 - 2222. 333 -
25b0: 54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 6f This is a test o
25c0: 66 20 54 48 52 45 45 20 72 67 69 6e 67 20 61 6c f THREE rging al
25d0: 67 6f 68 6d 20 2d 20 33 33 33 33 0a 20 20 34 34 gohm - 3333. 44
25e0: 34 20 2d 20 49 66 20 61 6c 6c 20 67 6f 65 73 20 4 - If all goes
25f0: 77 65 6c 6c 2c 20 77 65 20 77 69 6c 6c 20 62 65 well, we will be
2600: 20 70 6c 65 61 73 65 64 20 2d 20 34 34 34 34 0a pleased - 4444.
2610: 20 20 31 31 31 20 2d 20 54 68 69 73 20 69 73 20 111 - This is
2620: 6c 69 6e 65 20 4f 4e 45 4f 4e 45 20 74 68 65 20 line ONEONE the
2630: 64 65 6d 6f 20 70 72 6f 67 72 61 6d 20 2d 20 31 demo program - 1
2640: 31 31 31 0a 20 20 35 35 35 20 2d 20 77 65 20 74 111. 555 - we t
2650: 68 69 6e 6b 20 69 74 20 46 49 56 45 46 49 56 45 hink it FIVEFIVE
2660: 20 6f 74 68 65 72 20 73 74 75 66 66 20 74 6f 6f other stuff too
2670: 20 2d 20 35 35 35 35 0a 7d 0a 66 6f 73 73 69 6c - 5555.}.fossil
2680: 20 74 65 73 74 2d 33 20 74 31 20 74 33 20 74 32 test-3 t1 t3 t2
2690: 20 61 33 32 0a 74 65 73 74 20 6d 65 72 67 65 31 a32.test merge1
26a0: 2d 36 2e 31 20 7b 5b 73 61 6d 65 5f 66 69 6c 65 -6.1 {[same_file
26b0: 20 74 33 32 20 61 33 32 5d 7d 0a t32 a32]}.