Skip to content

Commit

Permalink
added more tests for Grammar.View.
Browse files Browse the repository at this point in the history
  • Loading branch information
toolness committed Dec 27, 2011
1 parent 170993f commit 67699a6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions javascript/test/index.html
Expand Up @@ -24,17 +24,17 @@ <h2 id="qunit-userAgent"></h2>
};
var view = new Grammar.View();
var dogView = new Grammar.View(dog);
var string = "%(name)s poke[s] %(o_name_pos)s soul.";
var string = "%(name)s poke[s] %(o_name_pos)s soul with %(his)s paw.";

equal(view.parseString(string, view.makeGrammarDict(dog, cat)),
"the dog pokes the cat's soul.");
"the dog pokes the cat's soul with his paw.");
equal(view.parseString(string, view.makeGrammarDict(cat, dog)),
"the cat pokes the dog's soul.");
"the cat pokes the dog's soul with her paw.");

equal(dogView.parseString(string, dogView.makeGrammarDict(dog, cat)),
"you poke the cat's soul.");
"you poke the cat's soul with your paw.");
equal(dogView.parseString(string, dogView.makeGrammarDict(cat, dog)),
"the cat pokes your soul.");
"the cat pokes your soul with her paw.");
});

test("utils.extend()", function() {
Expand Down

0 comments on commit 67699a6

Please sign in to comment.