mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add self-test and modify tidy to accomodate the test
This commit is contained in:
parent
41bf86631b
commit
bcb4bd2f30
2 changed files with 7 additions and 2 deletions
|
@ -461,8 +461,8 @@ def rec_parse(current_path, current_node):
|
|||
|
||||
def check_manifest_dirs(config_file, print_text=True):
|
||||
if not os.path.exists(config_file):
|
||||
print("%s manifest file is required but was not found" % config_file)
|
||||
sys.exit(1)
|
||||
yield(config_file, 0, "%s manifest file is required but was not found" % config_file)
|
||||
return
|
||||
|
||||
# Load configs from include.ini
|
||||
with open(config_file) as content:
|
||||
|
|
|
@ -33,6 +33,11 @@ class CheckTidiness(unittest.TestCase):
|
|||
self.assertEqual("ignored directory './fake/dir' doesn't exist", errors.next()[2])
|
||||
self.assertNoMoreErrors(errors)
|
||||
|
||||
def test_wpt_manifest_checks(self):
|
||||
wrong_path = "/wrong/path.ini"
|
||||
errors = tidy.check_manifest_dirs(wrong_path)
|
||||
self.assertEqual("%s manifest file is required but was not found" % wrong_path, errors.next()[2])
|
||||
|
||||
def test_directory_checks(self):
|
||||
dirs = {
|
||||
os.path.join(base_path, "dir_check/webidl_plus"): ['webidl', 'test'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue