[Git][reproducible-builds/diffoscope][master] Support OCaml versions 4.11, 4.12 and 4.13. (Closes: Debian:#1002678)

Chris Lamb (@lamby) gitlab at salsa.debian.org
Wed Dec 29 11:06:53 UTC 2021



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
0cba1b1f by Chris Lamb at 2021-12-29T11:06:26+00:00
Support OCaml versions 4.11, 4.12 and 4.13. (Closes: Debian:#1002678)

- - - - -


2 changed files:

- tests/comparators/test_ocaml.py
- tests/data/ocaml_expected_diff


Changes:

=====================================
tests/comparators/test_ocaml.py
=====================================
@@ -23,7 +23,7 @@ from diffoscope.comparators.ocaml import OcamlInterfaceFile
 from diffoscope.comparators.binary import FilesystemFile
 from diffoscope.comparators.utils.specialize import specialize
 
-from ..utils.data import assert_diff
+from ..utils.data import assert_diff_startswith
 from ..utils.tools import skip_unless_tool_is_at_least
 from ..utils.nonexisting import assert_non_existing
 
@@ -56,7 +56,7 @@ def ocaml_version():
     return out.decode("utf-8").split()[-1]
 
 
- at skip_unless_tool_is_at_least("ocamlobjinfo", ocaml_version, "4.12")
+ at skip_unless_tool_is_at_least("ocamlobjinfo", ocaml_version, "4.11")
 def test_identification(cmi1):
     assert isinstance(cmi1, OcamlInterfaceFile)
 
@@ -66,17 +66,17 @@ def differences(cmi1, cmi2):
     return cmi1.compare(cmi2).details
 
 
- at skip_unless_tool_is_at_least("ocamlobjinfo", ocaml_version, "4.12")
+ at skip_unless_tool_is_at_least("ocamlobjinfo", ocaml_version, "4.11")
 def test_no_differences(cmi1):
     difference = cmi1.compare(cmi1)
     assert difference is None
 
 
- at skip_unless_tool_is_at_least("ocamlobjinfo", ocaml_version, "4.12")
+ at skip_unless_tool_is_at_least("ocamlobjinfo", ocaml_version, "4.11")
 def test_diff(differences):
-    assert_diff(differences[0], "ocaml_expected_diff")
+    assert_diff_startswith(differences[0], "ocaml_expected_diff")
 
 
- at skip_unless_tool_is_at_least("ocamlobjinfo", ocaml_version, "4.12")
+ at skip_unless_tool_is_at_least("ocamlobjinfo", ocaml_version, "4.11")
 def test_compare_non_existing(monkeypatch, cmi1):
     assert_non_existing(monkeypatch, cmi1, has_null_source=False)


=====================================
tests/data/ocaml_expected_diff
=====================================
@@ -2,7 +2,3 @@
 -Unit name: Test1
 +Unit name: Test2
  Interfaces imported:
--	69a7449a2ee894ef85f1a4d8645e8051	Test1
-+	187969740b6c403b926a8d81613601ae	Test2
- 	4b04b4eda19aa722df365141895fb347	Stdlib
- 	b6c6694955e10001aed267571104a961	CamlinternalFormatBasics



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

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/0cba1b1f10cf0ec68aa726cbe1d196401f49df36
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/20211229/8ba3d24d/attachment.htm>


More information about the rb-commits mailing list