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:
Mike Pennisi 2015-06-18 12:06:20 -04:00
parent f06791ea4b
commit 86c7e272a6
2 changed files with 2 additions and 7 deletions

View File

@ -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++) {

View File

@ -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()])