Add incremental test.

This commit is contained in:
Cyrus Najmabadi
2014-12-09 16:51:55 -08:00
parent a268cbf2d8
commit 2497d9abdf

View File

@@ -187,5 +187,15 @@ module ts {
var newTextAndChange = withInsert(oldText, semicolonIndex, "/");
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
it('Regular expression 2',() => {
var source = "class C { public foo1() { ; } public foo2() { return 1/;} public foo3() { } }";
var semicolonIndex = source.indexOf(";");
var oldText = ScriptSnapshot.fromString(source);
var newTextAndChange = withInsert(oldText, semicolonIndex, "/");
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
});
}