179 Commits

Author SHA1 Message Date
Ujjwal Sharma
fbd79b10a7 tools: update lint.py to work with pip 10+
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
2018-09-17 13:30:01 -04:00
Rick Waldron
ae925f6791 Lint: make esid check allow "%" (#1638) 2018-07-13 16:39:32 -04:00
jugglinmike
ac02aa57ff Relax linting rules for esid metadata (#1632)
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
2018-07-09 12:29:43 -04:00
Rick Waldron
7dc92154af Frontmatter: Adds top level "locale" attribute. Fixes gh-1515 (#1561) 2018-06-19 14:56:30 -04:00
Leo Balter
f87f744741
Avoid printing tests source in the lint script (#1602) 2018-06-18 21:09:55 -04:00
Rick Waldron
c686cc6099 Lint: disallow calls to verifyConfigurable and verifyProperty in same file 2018-06-07 22:38:36 -04:00
Valerie R Young
40883f4c6a Update filename character restriction in documention, linter and a few filenames 2018-05-11 22:19:01 -04:00
André Bargull
4daa3de9bf Make parseTestRecord.py python3 compatible 2018-04-24 09:52:57 -07:00
jugglinmike
7b01f9799f [generation] Tolerate unicode in source files (#1411) 2018-02-09 11:27:33 -05:00
Rick Waldron
50d840acea Lint: inflect for pluralizing 2018-01-11 10:20:37 -05:00
Rick Waldron
1a057550d8 tools/lint/lib/checks/esid.py: allow "sup-" 2018-01-10 17:32:37 -05:00
Rick Waldron
40cb228633 lint: accept frontmatter without esid, es6id. 2018-01-10 17:25:44 -05:00
Adrian Heine
0278a7d2a5 Add es[56]?id checks 2018-01-10 15:28:58 -05:00
Mike Pennisi
e6d674ef7a Rename negative test "phase" for module resolution 2018-01-05 15:17:51 -05:00
Mike Pennisi
136110378b Rename negative test "phase" for parsing
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.
2018-01-05 15:17:50 -05:00
Adrian Heine
8e7213db38 Remove unused constants in checks/features.py 2018-01-05 12:10:01 -05:00
Rick Waldron
5a791f37f4 tools/lint: install PyYAML if not available. Fixes gh-1286 2017-10-18 12:21:36 -04:00
⭐caitp⭐
b006e1c7c7 Add a little helper for convenience in testing changes (#1260) 2017-10-04 11:46:21 -04:00
Rick Waldron
e294b8004d Rename fixture and change actual test, because an empty "features" list is invalid anyway! 2017-09-08 13:05:21 -04:00
Rick Waldron
1df51ee19c Lint/test: update multiple includes test 2017-09-08 12:48:06 -04:00
Rick Waldron
62a73c0edd Lint: fix import order 2017-09-08 12:45:58 -04:00
Rick Waldron
f1d38f5b3d Lint: add missing return to CheckHarnessFeatures().run 2017-09-08 12:41:24 -04:00
Rick Waldron
c7a5d21bee Lint: fix CheckHarnessFeatures.comparison_result_lists initial condition checks order 2017-09-08 12:28:22 -04:00
Rick Waldron
65424be3ef Lint: harness features flag enforcement via linter 2017-09-08 12:24:48 -04:00
Leo Balter
ccaf340d85 silence the make.py clean command on Travis (#1194) 2017-08-23 13:45:33 -04:00
Mike Pennisi
53842533b7 Enforce use of throw stmt in early error tests
Previously, test consumers were encouraged to insert a `throw` statement
as the first statement of tests for early errors. This recommendation
made tests harder to consume, and as an optional transformation,
consumers may have ignored it or simply been unaware it was made. By
explicitly including such a `throw` statement, the tests become more
literal, making them easier to consume and more transparent in their
expectations.

Document expectation for all tests for early errors to include an
explicit `throw` statement. Extend linting script to verify that
contributors are automatically notified of violations and to ensure that
future contributions satisfy this expectation.
2017-06-28 11:24:36 -04:00
jugglinmike
66bd632bae Lint test features tag (#1060)
A recent commit introduced a document that enumerated acceptable values
for the test "features" metadata tag. However, this list was incomplete,
and maintaining it placed extra burden on the project owners.

Restructure the document into a machine-readable format. Add entries for
all previously-omitted values. Add in-line documentation with
recommendations for maintenance of the file. Extend the project's
linting tool to validate tests according to the document's contents.
2017-06-12 18:59:14 -03:00
André Bargull
dd1f55a3dc Allow to specify negative frontmatter values in templates files 2017-05-04 09:29:37 -07:00
jugglinmike
74954bfa91 Introduce automated validation for test format (#994)
This script is intended to identify common test file formatting errors
prior to their acceptance into the project. It is designed to support
future extensions for additional validation rules.
2017-05-01 12:04:05 -04:00
Leo Balter
6ab3b0901b Update deploy keys
* Update github-deploy-key

* Update deploy.sh
2017-04-24 15:11:02 -04:00
Mathias Bynens
a621155bcd Unify indentation and add .editorconfig (#973) 2017-04-13 10:37:32 -04:00
Leo Balter
d2ee888bf0 Improve readability for ci scripts (#966) 2017-04-11 14:00:07 -04:00
Mike Pennisi
da4e798e5b [generation] Prevent invalid transformation
In order to promote readability of the generated test material, the test
generation tool may insert whitespace if the context a given expanded
variable calls for it. Avoid inserting such whitespace within literal
values that span multiple lines.
2017-03-04 12:17:35 -05:00
Mike Pennisi
2915fe8527 Update test harness to support new negative format 2016-10-19 15:24:21 -04:00
Mike Pennisi
7f6e6d137d [generation] Parse and render new error format
Extend the test generation tool to emit the recently-modified format of
the "negative" meta-data. Update the effected test case files
accordingly.
2016-10-19 15:24:19 -04:00
jugglinmike
ba32580be5 Remove Python-based test runner (#748)
TC-39 agreed to remove this tool from the Test262 repository in May of
2016 [1]. It has since been re-published as a standalone project to
facilitate independent development by interested parties [2]. Remove it
from the Test262 repository.

[1] https://github.com/tc39/tc39-notes/blob/master/es7/2016-05/may-25.md
[2] https://github.com/test262-utils/test262-harness-py
2016-08-22 14:23:26 -07:00
Sam Saccone
cb4e1bcbe9 Switch to non-positional argument.
Since the argument is required, we mark it as so. Using this approach
gives the user a much nicer error message, as compared to just the "not
enough args" message.
2016-06-18 13:50:56 -07:00
jugglinmike
330cea98f5 [runner] Add support for "folding" block delimiter (#654) 2016-05-31 18:04:31 -04:00
Leo Balter
1e75730d5f Merge pull request #587 from bocoup/generation-annexb-fns
Add tests for Annex B "function in block" semantics (procedurally generated)
2016-05-31 17:45:48 -04:00
Mike Pennisi
eb1c382aa5 [generation] Preserve newlines in info tag 2016-04-26 16:13:30 -04:00
Mike Pennisi
3777273b5d [generation] Avoid generating trailing whitespace 2016-04-26 16:12:49 -04:00
Mike Pennisi
82051d8f6a [generation] Strip whitespace from generated YAML 2016-04-26 13:52:54 -04:00
jugglinmike
54fcbf7ae0 [generation] Support changing to existing files (#583)
When inspecting previously-generated files, a new `Test` instance should
be used. This avoids over-writing the in-memory representation of the
latest test, and allows previously-existing test files to be partially
updated according to subsequent changes in their respective source/case
files.
2016-04-25 12:20:23 -04:00
Mike Pennisi
613d33adbb [generation] Improve file creation heuristic
In expecting "case directories" to contain a sub-directory named
"default", the test generation tool is unable to generate tests for
features where a directory named "default" is not appropriate.

Modify the heuristic that identifies "case directories" to use a more
fundamental aspect (i.e. the existence of at least one "case" file).
2016-04-18 16:18:54 -04:00
Mike Pennisi
b0b41775e5 [generation] Expand "comments" in string literals
Extend test generation tool to recognize and expand interpolation
patterns within string literals.
2016-04-18 15:46:06 -04:00
Leo Balter
3723e7caeb Merge pull request #545 from bocoup/generation
Introduce test generation tool
2016-04-15 17:56:36 -04:00
Leo Balter
5357b1585b Merge pull request #504 from bocoup/explicit-async
Make asynchronous test configuration explicit
2016-03-17 15:28:08 -04:00
Mike Pennisi
c5b9716144 Introduce test generation tool 2016-03-16 14:39:44 -04:00
Mike Pennisi
b6a4910eb5 Console Runner: Formally Deprecate
Document the console runner's "deprecated" status. Move the
documentation to a less central location in the project's file hierarchy.
2016-02-19 10:49:15 -05:00
Mike Pennisi
3771cb3acc Revert "Enable parallel test execution in console runner"
This reverts commit 7ae29d49aedb82e9d13fca159057e4b37ce36f02.
2016-02-19 10:46:18 -05:00