Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: tests/test_differ.py

Issue 29922555: Issue 7059 - Modify fldiff so it can handle multiple files (Closed) Base URL: https://hg.adblockplus.org/python-abp
Left Patch Set: Address comments on PS2 Created Oct. 29, 2018, 8 p.m.
Right Patch Set: Address comments on PS4 Created Oct. 31, 2018, 7:11 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « tests/test_diff_script.py ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 # This file is part of Adblock Plus <https://adblockplus.org/>, 1 # This file is part of Adblock Plus <https://adblockplus.org/>,
2 # Copyright (C) 2006-present eyeo GmbH 2 # Copyright (C) 2006-present eyeo GmbH
3 # 3 #
4 # Adblock Plus is free software: you can redistribute it and/or modify 4 # Adblock Plus is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 3 as 5 # it under the terms of the GNU General Public License version 3 as
6 # published by the Free Software Foundation. 6 # published by the Free Software Foundation.
7 # 7 #
8 # Adblock Plus is distributed in the hope that it will be useful, 8 # Adblock Plus is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 ! Please report any unblocked adverts or problems 49 ! Please report any unblocked adverts or problems
50 ! in the forums (https://forums.lanik.us/) 50 ! in the forums (https://forums.lanik.us/)
51 ! or via e-mail (easylist.subscription@gmail.com). 51 ! or via e-mail (easylist.subscription@gmail.com).
52 ! 52 !
53 !-----------------------General advert blocking filters-----------------------! 53 !-----------------------General advert blocking filters-----------------------!
54 ! *** easylist:easylist/easylist_general_block.txt *** 54 ! *** easylist:easylist/easylist_general_block.txt ***
55 &act=ads_ 55 &act=ads_
56 &ad_box_ 56 &ad_box_
57 &ad_channel=\U000000a3 57 &ad_channel=\U000000a3
58 test 58 test
59 &test_
59 ''' 60 '''
60 61
61 62
62 EXPECTED = '''[Adblock Plus Diff] 63 EXPECTED = '''[Adblock Plus Diff]
63 ! Diff-URL: https://easylist-downloads.adblockplus.org/easylist/diffs/123.txt 64 ! Diff-URL: https://easylist-downloads.adblockplus.org/easylist/diffs/123.txt
64 ! Expires: 65 ! Expires:
65 ! Version: 123 66 ! Version: 123
66 - &ad.vid=$~xmlhttprequest 67 - &ad.vid=$~xmlhttprequest
67 + &ad_channel=\U000000a3 68 + &ad_channel=\U000000a3
69 + &test_
68 ''' 70 '''
69 71
70 72
71 def test_differ(): 73 def test_differ():
72 exp = set(EXPECTED.splitlines()) 74 exp = set(EXPECTED.splitlines())
73 gen = set(render_diff(BASE.splitlines(), LATEST.splitlines())) 75 gen = set(render_diff(BASE.splitlines(), LATEST.splitlines()))
74 assert(gen == exp) 76 assert(gen == exp)
LEFTRIGHT

Powered by Google App Engine
This is Rietveld