示例#1
0
    def test_unidiff_mixed( self ):

        from Products.CMFSetup.differ import unidiff

        diff_lines = unidiff( ONE_FOUR, ZERO_FOUR.splitlines() )
        diff_text = '\n'.join( diff_lines )
        self.assertEqual( diff_text, DIFF_TEXT )
示例#2
0
    def test_unidiff_ignore_blanks(self):

        from Products.CMFSetup.differ import unidiff

        double_spaced = ONE_FOUR.replace('\n', '\n\n')
        diff_lines = unidiff(double_spaced,
                             ZERO_FOUR.splitlines(),
                             ignore_blanks=True)

        diff_text = '\n'.join(diff_lines)
        self.assertEqual(diff_text, DIFF_TEXT)
示例#3
0
    def test_unidiff_ignore_blanks( self ):

        from Products.CMFSetup.differ import unidiff

        double_spaced = ONE_FOUR.replace( '\n', '\n\n' )
        diff_lines = unidiff( double_spaced
                            , ZERO_FOUR.splitlines()
                            , ignore_blanks=True
                            )

        diff_text = '\n'.join( diff_lines )
        self.assertEqual( diff_text, DIFF_TEXT )