Add incremental test.

This commit is contained in:
Cyrus Najmabadi 2014-12-09 16:50:31 -08:00
parent 9d457701cc
commit a268cbf2d8

View File

@ -177,5 +177,15 @@ module ts {
var newTextAndChange = withDelete(oldText, index, "+ 1".length);
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
it('Regular expression 1', () => {
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);
});
});
}