mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
label service: more tests
This commit is contained in:
@@ -77,7 +77,6 @@ function hasDriveLetter(path: string): boolean {
|
||||
return !!(isWindows && path && path[2] === ':');
|
||||
}
|
||||
|
||||
|
||||
class ResourceLabelFormattersHandler implements IWorkbenchContribution {
|
||||
constructor(@ILabelService labelService: ILabelService) {
|
||||
resourceLabelFormattersExtPoint.setHandler(extensions => {
|
||||
|
||||
@@ -84,7 +84,16 @@ suite('URI Label', () => {
|
||||
separator: '/'
|
||||
}
|
||||
});
|
||||
labelService.registerFormatter({
|
||||
scheme: 'vscode',
|
||||
authority: 'mi*',
|
||||
formatting: {
|
||||
label: 'third',
|
||||
separator: '/'
|
||||
}
|
||||
});
|
||||
|
||||
// Make sure the most specific authority is picked
|
||||
const uri1 = URI.parse('vscode://microsoft.com/1/2/3/4/5');
|
||||
assert.equal(labelService.getUriLabel(uri1, { relative: false }), 'second');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user