tests/helper/test-case.js

Branch


Log

Author Commit Date CI Message
Michael Schmidt 5333e281 2021-10-19T19:34:41 Added regex coverage (#3138)
Michael Schmidt 2e834c8c 2021-10-19T14:59:04 Tests: Added `.html.test` files for replace `.js` language tests (#3148)
Michael Schmidt ae8888a0 2021-10-19T14:55:03 Tests: Added `TestCaseFile` class and generalized `runTestCase` (#3147)
Michael Schmidt 99f3ddcd 2021-06-13T22:00:43 Tests: Automatically normalize line ends (#2934)
Michael Schmidt 212dc1c6 2021-05-25T12:46:45 ESLint: Added curly rule (#2901)
Michael Schmidt b03e7eb0 2021-04-17T22:30:39 ESLint: Added semi rule (#2836)
Michael Schmidt 9cae4461 2021-04-17T22:26:40 ESLint: Added quotes rule (#2835)
Michael Schmidt 4c8b855d 2021-04-03T11:06:21 Tests: Added `--insert` and `--update` parameters to language test (#2809)
Michael Schmidt 8bfcc819 2020-11-21T01:17:39 Tests: Better pretty print (#2600) This is a major improvement for the pretty-printer. The main change is that `TokenStreamTransformer.prettyprint` now takes a Prism token stream instead of a simplified token stream. This means that it has a lot more information to work with and it uses that information. It mostly behaves like the old pretty-printer with 3 main differences: 1. Tokens that contain a nested token stream that only contains a single string are printed as one line. Example: `["namespace", ["java"]]` 2. The pretty-printer can now glue tokens together so that they are printed in a single line. Example: `["number", "100"], ["operator", ".."], ["number", "100"]` 3. Line breaks in the input code may now cause empty lines in the output. Previously, only blank strings containing more at least 2 line breaks produce empty lines. This helps readability as it groups tokens together.
Michael Schmidt bafab634 2020-08-17T16:22:21 Tests: Added an option to accept the actual token stream (#2515)
Michael Schmidt 681adeef 2020-06-28T03:16:17 Add extra newlines in pretty token streams (#2070) The formatter for the simplified token streams of our test cases will now emit extra (empty) newlines if the tested code also has an empty line at those positions.
Michael Schmidt 583e7eb5 2020-06-28T01:39:28 Tests: Always pretty-print token streams (#2421)
Michael Schmidt 4ff555be 2020-06-28T01:34:29 Added JSDoc (#1782)
Simran 007c9af4 2019-09-18T18:32:47 Tests: Simplified error message format (#2056) The error messages will now only contain the actual token stream the failed test and a full path of the test file plus the line and column number of the position of the first difference between the expected token stream and the actual token stream.
Michael Schmidt e864d518 2019-08-29T23:24:17 Core: Fixed greedy targeting bug (#1932) The `target` parameter defines the token which causes rematching. Rematching is done by recursively calling `matchGrammar` where `target` will be the current token name. The rematching is done if either a match was found or we reached the target token, whatever comes first. The bug is that a token is identified by its name. But the name alone doesn't uniquely identify a token in a grammar because many tokens can have the same name (array). This fixes this bug.
Michael Schmidt 832a9643 2019-03-10T21:30:58 Refactored tests (#1795) This refactors all test related JS files.
Michael Schmidt 9ea6d600 2019-03-10T18:55:23 Tests: Pretty-printed token stream (#1801) This adds support for pretty-printed token streams in the output of error messages.
Golmote 46e6f0c0 2018-04-05T08:51:43 Test suite: Fix indentation in test-case.js
Golmote 5f9c078a 2018-03-25T13:46:42 Make ERB, Handlebars, PHP and Smarty highlight properly in NodeJS (#1367)
Golmote 2b8321d3 2018-03-20T08:37:58 JSX: Add support for plain text inside tags (#1357) * JSX: Add support for plain text inside tags * JSX: Use a "plain-text" token to identify plain text * TSX: Add support for plain text * Fix test after merge
Andreas Rohner 0a00d7f7 2017-02-10T17:10:19 Fix the PHP language This patch is an attempt to fix the PHP language, when it is combined with markup. The problem is, that markup has a higher priority than all other tokens. This leads to weird errors, where HTML tags are highlighted inside of comments #197. One solution to this was to set the `greedy` flag for the comment token, but this leads to far worse errors like #1097. This patch should fix both issues #197 and #1097, by switching the grammar to markup on the fly. One potential problem is, that it relies on the `<?php` tag to detect if markup is present. So if a PHP file contains only markup and no PHP code at all, the result will look broken.
thesave dfc19413 2016-11-09T01:57:46 Add support for the Jolie language (#1014) * Added component for the Jolie language * Added Jolie among the supported components * update for merge - revised jolie component - added tests - added code example - minified with `gulp` * fixes * fixes * fixed Jolie html file example and highlight for punctuation * fixed indentation in test html file and added comma as punctuation
Golmote c1a0c1bd 2016-07-11T20:37:47 Added TestCase.runTestsWithHooks + add missing tests. Updated documentation for test suite.
Golmote a896f0a6 2015-08-30T16:06:37 Drastically increased the number of dashes (from 4 to 10) required for separations in test files, to prevent conflicts with languages syntax.
Golmote 791dad0d 2015-08-27T20:57:37 Tests: Increase the minimum number of dashes for the separation + fix test-suite page to match the actual behaviour.
Golmote d1b2e206 2015-08-19T00:19:45 Fix test runner: it must use the last language by default
Jannik Zschiesche a13c87b9 2015-07-26T14:27:38 Added support for specifying the main language to load in test cases You can add an exclamation mark anywhere in the name to load it as main language. If you do not specify anything, the first entry is used as main language css+markup! --> markup is main language css+markup --> css is main language
Jannik Zschiesche 1e0b8d9d 2015-07-26T14:08:47 Fixed code style issues
Jannik Zschiesche 3a3cd268 2015-07-15T19:35:07 Extract simplification of token stream Pull the token stream transformation out of the test case into its own component.
Jannik Zschiesche 9ce5838a 2015-07-14T10:51:35 Catch JSON parse error to provide a unified error reporting in the test runner
Jannik Zschiesche 9619d4cb 2015-07-14T10:46:57 Implement support for simplifying nested token streams
Jannik Zschiesche 09898e8e 2015-06-13T16:37:07 Support language inclusion tests By using composed language names "language+language2+language3" you can test language inclusion or do integration tests.
Jannik Zschiesche be5e037b 2015-06-13T15:12:21 Added support for test case comments
Jannik Zschiesche d1f90520 2015-06-01T20:39:11 Implemented test runner