Artifact 60194e41fa120b44f2a561b890f55ddba18aebe6:
- File test/merge2.test — part of check-in [6502627a3e] at 2011-02-08 12:52:37 on branch trunk — Exclude directories from file tests in the test suite. Fix an error in the release checklist. (user: drh size: 1311) [more...]
# # Copyright (c) 2006 D. Richard Hipp # # This program is free software; you can redistribute it and/or # modify it under the terms of the Simplified BSD License (also # known as the "2-Clause License" or "FreeBSD License".) # # This program is distributed in the hope that it will be useful, # but without any warranty; without even the implied warranty of # merchantability or fitness for a particular purpose. # # Author contact information: # drh@hwaci.com # http://www.hwaci.com/drh/ # ############################################################################ # # Tests of the delta mechanism. # set filelist [glob $testdir/*] foreach f $filelist { if {[file isdir $f]} continue set base [file root [file tail $f]] set f1 [read_file $f] write_file t1 $f1 for {set i 0} {$i<100} {incr i} { expr {srand($i*2)} write_file t2 [set f2 [random_changes $f1 2 4 0 0.1]] expr {srand($i*2+1)} write_file t3 [set f3 [random_changes $f1 2 4 2 0.1]] expr {srand($i*2+1)} write_file t23 [random_changes $f2 2 4 2 0.1] expr {srand($i*2)} write_file t32 [random_changes $f3 2 4 0 0.1] fossil test-3-way-merge t1 t2 t3 a23 test merge-$base-$i-23 {[same_file a23 t23]} fossil test-3-way-merge t1 t3 t2 a32 test merge-$base-$i-32 {[same_file a32 t32]} } }