~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge3.py

  • Committer: Matt Nordhoff
  • Date: 2009-04-04 02:50:01 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4256.
  • Revision ID: mnordhoff@mattnordhoff.com-20090404025001-z1403k0tatmc8l91
Merge bzr.dev, fixing conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
18
from bzrlib.tests import TestCaseInTempDir, TestCase
28
28
# common base
29
29
TZU = split_lines("""     The Nameless is the origin of Heaven and Earth;
30
30
     The named is the mother of all things.
31
 
     
 
31
 
32
32
     Therefore let there always be non-being,
33
33
       so we may see their subtlety,
34
34
     And let there always be being,
59
59
     The name that can be named is not the eternal name.
60
60
     The Nameless is the origin of Heaven and Earth;
61
61
     The named is the mother of all things.
62
 
     
 
62
 
63
63
     Therefore let there always be non-being,
64
64
       so we may see their subtlety,
65
65
     And let there always be being,
67
67
     The two are the same,
68
68
     But after they are produced,
69
69
       they have different names.
70
 
     
 
70
 
71
71
       -- The Way of Lao-Tzu, tr. Wing-tsit Chan
72
72
 
73
73
""")
85
85
       they have different names.
86
86
<<<<<<< LAO
87
87
=======
88
 
     
 
88
 
89
89
       -- The Way of Lao-Tzu, tr. Wing-tsit Chan
90
90
 
91
91
>>>>>>> TAO
132
132
        self.assertEquals(list(m3.merge_groups()),
133
133
                          [('a', ['aaa', 'bbb']),
134
134
                           ('unchanged', ['zz'])])
135
 
        
 
135
 
136
136
    def test_null_insert(self):
137
137
        m3 = Merge3([],
138
138
                    ['aaa', 'bbb'],
223
223
                            mid_marker='--',
224
224
                            end_marker='>>')
225
225
        self.assertEquals(''.join(ml), 'aaa\n222\nbbb\n')
226
 
        
 
226
 
227
227
 
228
228
    def test_insert_clash(self):
229
229
        """Both try to insert lines in the same place."""
357
357
        this_text = ("a\n"*10+"b\n" * 10).splitlines(True)
358
358
        other_text = ("a\n"*10+"c\n"+"b\n" * 8 + "c\n").splitlines(True)
359
359
        m3 = Merge3(base_text, other_text, this_text)
360
 
        m_lines = m3.merge_lines('OTHER', 'THIS', reprocess=True, 
 
360
        m_lines = m3.merge_lines('OTHER', 'THIS', reprocess=True,
361
361
                                 base_marker='|||||||')
362
362
        self.assertRaises(CantReprocessAndShowBase, list, m_lines)
363
363