From 900551d040ae7dbc312015583ce65fc2150da94c Mon Sep 17 00:00:00 2001 From: liushuyu Date: Mon, 4 Dec 2023 21:00:43 -0700 Subject: [PATCH] tests: add a test to test the file name extraction strategy --- tests/test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test.py b/tests/test.py index 01f4fe2..cb1de22 100644 --- a/tests/test.py +++ b/tests/test.py @@ -104,6 +104,9 @@ def test_parse_url(self): self.assertEqual(info.url, 'https://github.com/AOSC-Dev/acbs#title') self.assertEqual(info.revision, 'a2e5eff') self.assertEqual(info.chksum, ('none', '')) + info = parse_url_schema('tbl::use-url-name=true::https://example.com/test.tar.gz;p=123?test=ok#fragment', 'sha256::123') + self.assertEqual(info.type, 'tarball') + self.assertEqual(info.source_name, 'test.tar.gz') def test_parse_new_spec(self): acbs.parser.arch = 'none'