tests/test-bdiff.py
changeset 30428 3743e5dbb824
parent 30427 ede7bc45bf0a
child 30429 38ed54888617
equal deleted inserted replaced
30427:ede7bc45bf0a 30428:3743e5dbb824
    76 testfixws(" \ta\r b\t\n", " a b\n", 0)
    76 testfixws(" \ta\r b\t\n", " a b\n", 0)
    77 testfixws("", "", 1)
    77 testfixws("", "", 1)
    78 testfixws("", "", 0)
    78 testfixws("", "", 0)
    79 
    79 
    80 print("done")
    80 print("done")
       
    81 
       
    82 print("Odd diff for a trivial change:")
       
    83 showdiff(
       
    84     ''.join('<%s\n-\n' % i for i in range(5)),
       
    85     ''.join('>%s\n-\n' % i for i in range(5)))
       
    86 
       
    87 print("Diff 1 to 3 lines - preference for adding / removing at the end of sequences:")
       
    88 showdiff('a\n', 'a\n' * 3)
       
    89 print("Diff 1 to 5 lines - preference for adding / removing at the end of sequences:")
       
    90 showdiff('a\n', 'a\n' * 5)
       
    91 print("Diff 3 to 1 lines - preference for adding / removing at the end of sequences:")
       
    92 showdiff('a\n' * 3, 'a\n')
       
    93 print("Diff 5 to 1 lines - this diff seems weird:")
       
    94 showdiff('a\n' * 5, 'a\n')