Add incremental test.

This commit is contained in:
Cyrus Najmabadi 2014-12-09 17:13:33 -08:00
parent 7f605332fc
commit fa86c88c47

View File

@ -338,5 +338,15 @@ module ts {
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
});
it('Strict mode 6',() => {
var source = "'use strict';\r\nfoo1();\r\nfoo2();\r\nfoo3();\r\nfoo4();\r\nfoo4();\r\nfoo6();\r\nfoo7();\r\nfoo8();\r\nfoo9();\r\n";
var index = source.indexOf('s');
var oldText = ScriptSnapshot.fromString(source);
var newTextAndChange = withChange(oldText, index, 6, "blahhh");
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 37);
});
});
}