mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-12 01:48:33 -05:00
More tests
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
//// for (var of in of) { }
|
||||
|
||||
var c = classification;
|
||||
verify.syntacticClassificationsAre(
|
||||
c.keyword("for"),
|
||||
c.punctuation("("),
|
||||
c.keyword("var"),
|
||||
c.text("of"),
|
||||
c.keyword("in"),
|
||||
c.text("of"),
|
||||
c.punctuation(")"),
|
||||
c.punctuation("{"),
|
||||
c.punctuation("}")
|
||||
);
|
||||
@@ -0,0 +1,18 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
//// for (var of; of; of) { }
|
||||
|
||||
var c = classification;
|
||||
verify.syntacticClassificationsAre(
|
||||
c.keyword("for"),
|
||||
c.punctuation("("),
|
||||
c.keyword("var"),
|
||||
c.text("of"),
|
||||
c.punctuation(";"),
|
||||
c.text("of"),
|
||||
c.punctuation(";"),
|
||||
c.text("of"),
|
||||
c.punctuation(")"),
|
||||
c.punctuation("{"),
|
||||
c.punctuation("}")
|
||||
);
|
||||
@@ -430,5 +430,20 @@ class D { }\r\n\
|
||||
comment(">>>>>>> Branch - a"),
|
||||
finalEndOfLineState(ts.EndOfLineState.Start));
|
||||
});
|
||||
|
||||
it("'of' keyword", function () {
|
||||
testLexicalClassification("for (var of of of) { }",
|
||||
ts.EndOfLineState.Start,
|
||||
keyword("for"),
|
||||
punctuation("("),
|
||||
keyword("var"),
|
||||
keyword("of"),
|
||||
keyword("of"),
|
||||
keyword("of"),
|
||||
punctuation(")"),
|
||||
punctuation("{"),
|
||||
punctuation("}"),
|
||||
finalEndOfLineState(ts.EndOfLineState.Start));
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user