From d548e6c7f9d6cdc84f0f019c27b3abeb7419e042 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 20 Oct 2026 11:22:48 +0200 Subject: Upstream versions with '-' as '_', as mkhint stored them '-' is illegal in a SlackBuild version, so dated tags like exploitdb's 2026-10-14 are packaged 2026_10_14 and showed as outdated forever. Co-Authored-By: Claude Opus 5.5 --- tests/test_upstream.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_upstream.py b/tests/test_upstream.py index 38cba54..3c64660 100644 --- a/tests/test_upstream.py +++ b/tests/test_upstream.py @@ -37,6 +37,7 @@ from sb_builder import upstream # noqa: E402 app = QApplication.instance() or QApplication([]) LOG = "\n".join([ '{"name": "borgbackup", "version": "1.4.5", "event": "updated", "level": "info"}', + '{"name": "exploitdb", "version": "2026-10-14", "event": "updated", "level": "info"}', '{"name": "bogus", "event": "unexpected error happened", "error": "HTTPError(404)", "level": "error"}', '{"name": "bogus", "event": "no-result", "error": "later", "level": "error"}', 'not json', @@ -71,7 +72,8 @@ class UpstreamTest(unittest.TestCase): self.assertEqual(tomllib.load(f)["__config__"], {"keyfile": keys}) def test_parse_log(self): - self.assertEqual(upstream.parse_log(LOG), ({"borgbackup": "1.4.5"}, {"bogus": "HTTPError(404)"})) + self.assertEqual(upstream.parse_log(LOG), ({"borgbackup": "1.4.5", "exploitdb": "2026_10_14"}, + {"bogus": "HTTPError(404)"})) def test_state(self): names = {"a", "b", "c"} -- cgit v1.2.3