aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-20 11:22:48 +0200
committerDanilo M. <danix@danix.xyz>2026-10-20 11:22:48 +0200
commitd548e6c7f9d6cdc84f0f019c27b3abeb7419e042 (patch)
tree37859659a413746a2edf777cc856605f2ca87f96 /tests
parentcc8ea76af30a9e285d3784d5de51f6d1a85afbd5 (diff)
downloadsb-builder-d548e6c7f9d6cdc84f0f019c27b3abeb7419e042.tar.gz
sb-builder-d548e6c7f9d6cdc84f0f019c27b3abeb7419e042.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_upstream.py4
1 files changed, 3 insertions, 1 deletions
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"}