本文整理汇总了TypeScript中vs/editor/test/browser/testCommand.testCommand函数的典型用法代码示例。如果您正苦于以下问题:TypeScript testCommand函数的具体用法?TypeScript testCommand怎么用?TypeScript testCommand使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了testCommand函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: testLineCommentCommand
function testLineCommentCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
let outerMode = new OuterMode({ lineComment: '//', blockComment: ['/*', '*/'] });
let innerMode = new InnerMode({ lineComment: null, blockComment: ['{/*', '*/}'] });
testCommand(
lines,
outerMode.getLanguageIdentifier(),
selection,
(sel) => new LineCommentCommand(sel, 4, Type.Toggle),
expectedLines,
expectedSelection
);
innerMode.dispose();
outerMode.dispose();
}
开发者ID:burhandodhy,项目名称:azuredatastudio,代码行数:14,代码来源:lineCommentCommand.test.ts
示例2: testBlockCommentCommand
function testBlockCommentCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
let mode = new CommentMode({ lineComment: '!@#', blockComment: ['<0', '0>'] });
testCommand(lines, mode.getLanguageIdentifier(), selection, (sel) => new BlockCommentCommand(sel), expectedLines, expectedSelection);
mode.dispose();
}
开发者ID:AllureFer,项目名称:vscode,代码行数:5,代码来源:blockCommentCommand.test.ts
示例3: testDeleteLinesCommand
function testDeleteLinesCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
testCommand(lines, null, selection, (sel) => DeleteLinesCommand.createFromSelection(sel), expectedLines, expectedSelection);
}
开发者ID:SeanKilleen,项目名称:vscode,代码行数:3,代码来源:deleteLinesCommand.test.ts
示例4: testFormatCommand
function testFormatCommand(lines: string[], selection: Selection, edits: ISingleEditOperation[], expectedLines: string[], expectedSelection: Selection): void {
testCommand(lines, null, selection, (sel) => new EditOperationsCommand(edits, sel), expectedLines, expectedSelection);
}
开发者ID:costincaraivan,项目名称:vscode,代码行数:3,代码来源:formatCommand.test.ts
示例5: testCopyLinesUpCommand
function testCopyLinesUpCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
testCommand(lines, null, selection, (sel) => new CopyLinesCommand(sel, false), expectedLines, expectedSelection);
}
开发者ID:AlexxNica,项目名称:sqlopsstudio,代码行数:3,代码来源:copyLinesCommand.test.ts
示例6: testMoveCaretRightCommand
function testMoveCaretRightCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
testCommand(lines, null, selection, (sel) => new MoveCaretCommand(sel, false), expectedLines, expectedSelection);
}
开发者ID:AlexxNica,项目名称:sqlopsstudio,代码行数:3,代码来源:moveCarretCommand.test.ts
示例7: testSortLinesAscendingCommand
function testSortLinesAscendingCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void {
testCommand(lines, null, selection, (sel) => new SortLinesCommand(sel, false), expectedLines, expectedSelection);
}
开发者ID:DonJayamanne,项目名称:vscode,代码行数:3,代码来源:sortLinesCommand.test.ts
示例8: testIndentationToSpacesCommand
function testIndentationToSpacesCommand(lines: string[], selection: Selection, tabSize: number, expectedLines: string[], expectedSelection: Selection): void {
testCommand(lines, null, selection, (sel) => new IndentationToSpacesCommand(sel, tabSize), expectedLines, expectedSelection);
}
开发者ID:AllureFer,项目名称:vscode,代码行数:3,代码来源:indentation.test.ts
注:本文中的vs/editor/test/browser/testCommand.testCommand函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论