mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
Meta: Enforce doctypes on layout tests
This commit is contained in:
parent
e6dabdcebe
commit
3ab14f5595
|
|
@ -5,13 +5,20 @@ import re
|
|||
import subprocess
|
||||
import sys
|
||||
|
||||
# FIXME: Include Layout tests in general.
|
||||
# They are currently deferred to a later PR to make review easier for now.
|
||||
RE_RELEVANT_FILE = re.compile("^Tests/LibWeb/(Ref|Screenshot|Text)/(.(?!wpt-import/))*\\.html$")
|
||||
RE_RELEVANT_FILE = re.compile("^Tests/LibWeb/(Layout|Ref|Screenshot|Text)/(.(?!wpt-import/))*\\.html$")
|
||||
# Exclude files with encodings that would cause python to error out.
|
||||
# FIXME: Ideally, these should be supported.
|
||||
EXCLUDED_FILES = [
|
||||
"Tests/LibWeb/Layout/input/html-encoding-detection-crash.html",
|
||||
"Tests/LibWeb/Layout/input/utf-16-be-xhtml-file-should-decode-correctly.html",
|
||||
]
|
||||
RE_DOCTYPE = re.compile("^<!doctype .*>", re.IGNORECASE)
|
||||
|
||||
|
||||
def should_check_file(filename):
|
||||
if filename in EXCLUDED_FILES:
|
||||
return False
|
||||
|
||||
return RE_RELEVANT_FILE.match(filename) is not None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user