mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 06:20:23 -06:00
Add incremental test.
This commit is contained in:
parent
9d457701cc
commit
a268cbf2d8
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user