mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 10:41:30 +00:00
Meta: Disallow importing ref tests with multiple match or mismatch links
Our internal test runner does not currently support this, so let's explicitly disallow it for now to avoid potential confusion.
This commit is contained in:
parent
e059ac6a1a
commit
9c63785d0f
Notes:
github-actions[bot]
2024-12-04 19:50:50 +00:00
Author: https://github.com/tcl3
Commit: 9c63785d0f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2754
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 4 additions and 0 deletions
|
@ -79,13 +79,17 @@ class TestTypeIdentifier(HTMLParser):
|
|||
self.url = url
|
||||
self.test_type = TestType.TEXT
|
||||
self.reference_path = None
|
||||
self.ref_test_link_found = False
|
||||
|
||||
def handle_starttag(self, tag, attrs):
|
||||
if tag == "link":
|
||||
attr_dict = dict(attrs)
|
||||
if attr_dict["rel"] == "match" or attr_dict["rel"] == "mismatch":
|
||||
if self.ref_test_link_found:
|
||||
raise RuntimeError("Ref tests with multiple match or mismatch links are not currently supported")
|
||||
self.test_type = TestType.REF
|
||||
self.reference_path = attr_dict["href"]
|
||||
self.ref_test_link_found = True
|
||||
|
||||
|
||||
def map_to_path(sources, is_resource=True, resource_path=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue