|
|
|
@ -594,7 +594,7 @@ describe("compiler pass |generateBytecode|", function() {
|
|
|
|
|
]));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("non-empty non-inverted case-sensitive", function() {
|
|
|
|
|
describe("non-inverted case-sensitive", function() {
|
|
|
|
|
it("defines correct constants", function() {
|
|
|
|
|
expect(pass).toChangeAST('start = [a]', constsDetails([
|
|
|
|
|
'/^[a]/',
|
|
|
|
@ -603,7 +603,7 @@ describe("compiler pass |generateBytecode|", function() {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("non-empty inverted case-sensitive", function() {
|
|
|
|
|
describe("inverted case-sensitive", function() {
|
|
|
|
|
it("defines correct constants", function() {
|
|
|
|
|
expect(pass).toChangeAST('start = [^a]', constsDetails([
|
|
|
|
|
'/^[^a]/',
|
|
|
|
@ -612,7 +612,7 @@ describe("compiler pass |generateBytecode|", function() {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("non-empty non-inverted case-insensitive", function() {
|
|
|
|
|
describe("non-inverted case-insensitive", function() {
|
|
|
|
|
it("defines correct constants", function() {
|
|
|
|
|
expect(pass).toChangeAST('start = [a]i', constsDetails([
|
|
|
|
|
'/^[a]/i',
|
|
|
|
@ -621,7 +621,7 @@ describe("compiler pass |generateBytecode|", function() {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("non-empty complex", function() {
|
|
|
|
|
describe("complex", function() {
|
|
|
|
|
it("defines correct constants", function() {
|
|
|
|
|
expect(pass).toChangeAST('start = [ab-def-hij-l]', constsDetails([
|
|
|
|
|
'/^[ab-def-hij-l]/',
|
|
|
|
@ -629,24 +629,6 @@ describe("compiler pass |generateBytecode|", function() {
|
|
|
|
|
]));
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("empty non-inverted", function() {
|
|
|
|
|
it("defines correct constants", function() {
|
|
|
|
|
expect(pass).toChangeAST('start = []', constsDetails([
|
|
|
|
|
'/^(?!)/',
|
|
|
|
|
'peg$classExpectation([], false, false)'
|
|
|
|
|
]));
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("empty inverted", function() {
|
|
|
|
|
it("defines correct constants", function() {
|
|
|
|
|
expect(pass).toChangeAST('start = [^]', constsDetails([
|
|
|
|
|
'/^[\\S\\s]/',
|
|
|
|
|
'peg$classExpectation([], true, false)'
|
|
|
|
|
]));
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("for any", function() {
|
|
|
|
|