[Reproducible-commits] [diffoscope] 03/05: Add a test for --max-diff-block-lines
Jérémy Bobbio
lunar at moszumanska.debian.org
Thu Sep 24 09:38:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository diffoscope.
commit 1e64bb52f4e8285a05c8d0690de4565fba1d6135
Author: Jérémy Bobbio <lunar at debian.org>
Date: Thu Sep 24 09:20:40 2015 +0000
Add a test for --max-diff-block-lines
---
tests/test_difference.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/test_difference.py b/tests/test_difference.py
index c7528fb..d4c8c0e 100644
--- a/tests/test_difference.py
+++ b/tests/test_difference.py
@@ -28,3 +28,10 @@ def test_too_much_input_for_diff(monkeypatch):
too_long_text_b = StringIO("b\n" * 21)
difference = Difference.from_text_readers(too_long_text_a, too_long_text_b, 'a', 'b')
assert '[ Too much input for diff ]' in difference.unified_diff
+
+def test_too_long_diff_block_lines(monkeypatch):
+ monkeypatch.setattr(Config, 'max_diff_block_lines', 10)
+ too_long_text_a = StringIO("a\n" * 21)
+ too_long_text_b = StringIO("b\n" * 21)
+ difference = Difference.from_text_readers(too_long_text_a, too_long_text_b, 'a', 'b')
+ assert '[ 11 lines removed ]' in difference.unified_diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the Reproducible-commits
mailing list