Skip to content
This repository has been archived by the owner on Jun 15, 2019. It is now read-only.

Commit

Permalink
added failing test: fails when we have a grammar with indirect recurs…
Browse files Browse the repository at this point in the history
…ion A->B->A like we have now.
  • Loading branch information
GerHobbelt committed Jul 7, 2016
1 parent 1246dbb commit f49e214
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/all-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,21 @@ exports["test no brace action with surplus whitespace between rules"] = function
assert.deepEqual(lex.parse(lexgrammar), expected, "grammar should be parsed correctly");
};

`BR \r\n|\n|\r`

exports["test macro for commit SHA-1: 1246dbb75472cee8e4e91318cc5a0d4739a8fe12"] = function () {
var lexgrammar = 'BR \\r\\n|\\n|\\r\n%%\r\n{BR} %{\r\nreturn true;\r\n%}\r\n';
var expected = {
macros: {"BR": "\\r\\n|\\n|\\r"},
rules: [
["{BR}", "\r\nreturn true;\r\n"]
]
};

lexer_reset();
assert.deepEqual(lex.parse(lexgrammar), expected, "grammar should be parsed correctly");
};

exports["test windows line endings"] = function () {
var lexgrammar = '%%\r\n"["[^\\]]"]" %{\r\nreturn true;\r\n%}\r\n';
var expected = {
Expand Down

0 comments on commit f49e214

Please sign in to comment.