From fb01f48c97e503e9515cd91e8388b6fd428a60bf Mon Sep 17 00:00:00 2001 From: David Majda Date: Fri, 20 Apr 2012 18:56:18 +0200 Subject: [PATCH] Jasmine: Convert tests of parser's "singleQuotedString" rule --- spec/parser.spec.js | 7 +++++++ test/parser-test.js | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/parser.spec.js b/spec/parser.spec.js index f97893c..a00534e 100644 --- a/spec/parser.spec.js +++ b/spec/parser.spec.js @@ -115,6 +115,13 @@ describe("PEG.js grammar parser", function() { }); }); + /* Canonical singleQuotedString is "'abcd'". */ + it("parses singleQuotedString", function() { + expect("start = ''" ).toParseAs(literalGrammar("")); + expect("start = 'a'" ).toParseAs(literalGrammar("a")); + expect("start = 'abc'").toParseAs(literalGrammar("abc")); + }); + /* Canonical singleQuotedCharacter is "a". */ it("parses singleQuotedCharacter", function() { expect("start = 'a'" ).toParseAs(literalGrammar("a")); diff --git a/test/parser-test.js b/test/parser-test.js index 8970daf..0867a2b 100644 --- a/test/parser-test.js +++ b/test/parser-test.js @@ -384,11 +384,4 @@ test("parses simpleDoubleQuotedCharacter", function() { parserDoesNotParse('start = "\u2029"'); }); -/* Canonical singleQuotedString is "'abcd'". */ -test("parses singleQuotedString", function() { - parserParses("start = ''", literalGrammar("")); - parserParses("start = 'a'", literalGrammar("a")); - parserParses("start = 'abc'", literalGrammar("abc")); -}); - })();