From fa65018b15c0089c20b927a7cec604dca9eaf706 Mon Sep 17 00:00:00 2001 From: David Majda Date: Fri, 20 Apr 2012 19:02:40 +0200 Subject: [PATCH] Jasmine: Convert tests of parser's "doubleQuotedString" 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 b6f1a21..cb03c88 100644 --- a/spec/parser.spec.js +++ b/spec/parser.spec.js @@ -115,6 +115,13 @@ describe("PEG.js grammar parser", function() { }); }); + /* Canonical doubleQuotedString is "\"abcd\"". */ + it("parses doubleQuotedString", function() { + expect('start = ""' ).toParseAs(literalGrammar("")); + expect('start = "a"' ).toParseAs(literalGrammar("a")); + expect('start = "abc"').toParseAs(literalGrammar("abc")); + }); + /* Canonical doubleQuotedCharacter is "a". */ it("parses doubleQuotedCharacter", function() { expect('start = "a"' ).toParseAs(literalGrammar("a")); diff --git a/test/parser-test.js b/test/parser-test.js index 4e0977b..953c99d 100644 --- a/test/parser-test.js +++ b/test/parser-test.js @@ -355,11 +355,4 @@ test("parses string", function() { parserParses('start "abcd"\n= "abcd"', namedRuleGrammar); }); -/* Canonical doubleQuotedString is "\"abcd\"". */ -test("parses doubleQuotedString", function() { - parserParses('start = ""', literalGrammar("")); - parserParses('start = "a"', literalGrammar("a")); - parserParses('start = "abc"', literalGrammar("abc")); -}); - })();