Verify that every test file which references a harness file using the
"includes" directive also contains at least one reference to a value
defined in the harness file.
To support this check, extend each harness file with a list of values
which it defines.
The command-line interface to Python's "unittest" module allows users to
run tests by name, e.g.
$ test.py TestLinter.test_foo
If the tests include a period, they cannot be referenced in this way.
Rename the tests to omit the filename extension so that they may be
referenced from the command-line in this way.
Prior to this commit, the tests for the linter partially depended on
project files. This coupling risks churn in the tests: if the needs of
the project change (e.g. a harness file is modified), then the linter
tests would need to be updated. It also made the tests more difficult to
understand because the input was both larger and more complicated than
necessary to exercise the relevant functionality.
Execute the tests in the context of the fixture directory and introduce
minimal support files that serve the same purpose as the corresponding
project files.
* Generation: Use Python 3-compatible imports.
* Generation: Use range() instead of xrange().
* Generation: Use list comprehensions instead of map().
* Generation: Explicitly use bytes in the Test class.
* Generation: Run unit tests on Python 3 as well.
the double dot gets only commits not in the left side of the double dot.
The right side assumes HEAD.
This will allow us to fetch the correct list of new or modified files in the current branch.
This makes it possible to run the script locally even if `TRAVIS_PULL_REQUEST` is not set.
Currently, it results in an error:
tools/scripts/ci_build.sh: line 2: [: !=: unary operator expected
Update the lint.py script to work with pip 10+ as pip.req was moved to
pip._internal.req in version 10 onwards and the existing code only works
on versions of pip under or equal to 9.0.3
The document fragments used by the ECMAScript specification do not
conform to any particular pattern beyond the grammar defined by the URL
standard [1]. Relax the linting rule to enforce a simplified version of
that grammar.
[1] https://url.spec.whatwg.org/#fragment-state
Early errors may result from parsing the source text of a test file, but
they may also result from parsing some other source text as referenced
through the ES2015 module syntax. The latter form of early error is not
necessarily detectable by ECMAScript parsers, however. Because of this,
the label "early" is not sufficiently precise for all Test262 consumers
to correctly interpret all tests.
Update the "phase" name of "early" to "parse" for all those negative
tests that describe errors resulting from parsing of the file's source
text directly. A forthcoming commit will update the remaining tests to
use a "phase" name that is more specific to module resolution.