mirror of https://github.com/tc39/test262.git
Remove support for legacy `$INCLUDE` syntax
Although test files once expressed dependencies on external files using
a global `$INCLUDE` function, that pattern was removed in favor of
declarative meta-data [1].
Remove the associated logic from the Python runner and the browser.
[1] See commit d4354d14d5
.
This commit is contained in:
parent
f06791ea4b
commit
86c7e272a6
|
@ -173,12 +173,7 @@ function BrowserRunner() {
|
|||
include;
|
||||
|
||||
includes = test.includes;
|
||||
if (!includes || !(includes.length)) {
|
||||
// includes not specified via frontmatter; find all of the $INCLUDE statements
|
||||
includes = code.match(/\$INCLUDE\(([^\)]+)\)/g);
|
||||
}
|
||||
|
||||
if (includes !== null) {
|
||||
if (includes && includes.length) {
|
||||
// We have some includes, so loop through each include and
|
||||
// pull in the dependencies.
|
||||
for (var i = 0; i < includes.length; i++) {
|
||||
|
|
|
@ -277,7 +277,7 @@ class TestCase(object):
|
|||
def GetIncludeList(self):
|
||||
if self.testRecord.get('includes'):
|
||||
return self.testRecord['includes']
|
||||
return re.findall('\$INCLUDE\([\'"]([^\)]+)[\'"]\)', self.test)
|
||||
return []
|
||||
|
||||
def GetAdditionalIncludes(self):
|
||||
return '\n'.join([self.suite.GetInclude(include) for include in self.GetIncludeList()])
|
||||
|
|
Loading…
Reference in New Issue