[Git][reproducible-builds/diffoscope][master] Make test_ps.test_text_diff pass with ghostscript 9.26.

Mattia Rizzolo gitlab at salsa.debian.org
Tue Feb 12 15:14:42 CET 2019


Mattia Rizzolo pushed to branch master at Reproducible Builds / diffoscope


Commits:
de05b148 by Mattia Rizzolo at 2019-02-12T14:14:18Z
Make test_ps.test_text_diff pass with ghostscript 9.26.

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


2 changed files:

- tests/comparators/test_ps.py
- tests/data/ps_text_expected_diff


Changes:

=====================================
tests/comparators/test_ps.py
=====================================
@@ -24,7 +24,7 @@ from diffoscope.comparators.ps import PsFile
 
 from ..utils.data import load_fixture, get_data
 from ..utils.tools import skip_unless_tools_exist, \
-    skip_unless_tool_is_at_most, skip_unless_tool_is_at_least
+    skip_unless_tool_is_at_least
 from ..utils.nonexisting import assert_non_existing
 
 
@@ -57,11 +57,11 @@ def test_internal_diff(differences):
     assert differences.unified_diff == expected_diff
 
 
- at skip_unless_tool_is_at_most('ps2ascii', ps2ascii_version, '9.21')
- at skip_unless_tool_is_at_least('ps2ascii', ps2ascii_version, '9.21')
+ at skip_unless_tool_is_at_least('ps2ascii', ps2ascii_version, '9.26')
 def test_text_diff(differences):
+    computed_diff = differences.details[0].unified_diff.replace('\r\n', '\n')
     expected_diff = get_data('ps_text_expected_diff')
-    assert differences.details[0].unified_diff == expected_diff
+    assert computed_diff == expected_diff
 
 
 @skip_unless_tools_exist('ps2ascii')


=====================================
tests/data/ps_text_expected_diff
=====================================
@@ -1,7 +1,4 @@
-@@ -1,5 +1,5 @@
- 
- 
--Today's date: February 28, 2016
-+Today's date: February 27, 2016
- 
- 1
+@@ -1,2 +1,2 @@
+-                Today’s date: February 28, 2016
++                Today’s date: February 27, 2016
+                                1



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/de05b148daabb894a97ba1d8d307b0215e9a753c

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/de05b148daabb894a97ba1d8d307b0215e9a753c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20190212/30066b1b/attachment.html>


More information about the rb-commits mailing list