@@ -123,18 +123,18 @@ suite('Labels', () => {
123123 assert . strictEqual ( labels . template ( '${value} Foo${separator}Bar' , { value : 'something' , separator : { label : ' - ' } } ) , 'something FooBar' ) ;
124124
125125 // // real world example (macOS)
126- let t = '${activeEditorName }${separator}${rootName}' ;
127- assert . strictEqual ( labels . template ( t , { activeEditorName : '' , rootName : '' , separator : { label : ' - ' } } ) , '' ) ;
128- assert . strictEqual ( labels . template ( t , { activeEditorName : '' , rootName : 'root' , separator : { label : ' - ' } } ) , 'root' ) ;
129- assert . strictEqual ( labels . template ( t , { activeEditorName : 'markdown.txt' , rootName : 'root' , separator : { label : ' - ' } } ) , 'markdown.txt - root' ) ;
126+ let t = '${activeEditorShort }${separator}${rootName}' ;
127+ assert . strictEqual ( labels . template ( t , { activeEditorShort : '' , rootName : '' , separator : { label : ' - ' } } ) , '' ) ;
128+ assert . strictEqual ( labels . template ( t , { activeEditorShort : '' , rootName : 'root' , separator : { label : ' - ' } } ) , 'root' ) ;
129+ assert . strictEqual ( labels . template ( t , { activeEditorShort : 'markdown.txt' , rootName : 'root' , separator : { label : ' - ' } } ) , 'markdown.txt - root' ) ;
130130
131131 // // real world example (other)
132- t = '${dirty}${activeEditorName }${separator}${rootName}${separator}${appName}' ;
133- assert . strictEqual ( labels . template ( t , { dirty : '' , activeEditorName : '' , rootName : '' , appName : '' , separator : { label : ' - ' } } ) , '' ) ;
134- assert . strictEqual ( labels . template ( t , { dirty : '' , activeEditorName : '' , rootName : '' , appName : 'Visual Studio Code' , separator : { label : ' - ' } } ) , 'Visual Studio Code' ) ;
135- assert . strictEqual ( labels . template ( t , { dirty : '' , activeEditorName : 'Untitled-1' , rootName : '' , appName : 'Visual Studio Code' , separator : { label : ' - ' } } ) , 'Untitled-1 - Visual Studio Code' ) ;
136- assert . strictEqual ( labels . template ( t , { dirty : '' , activeEditorName : '' , rootName : 'monaco' , appName : 'Visual Studio Code' , separator : { label : ' - ' } } ) , 'monaco - Visual Studio Code' ) ;
137- assert . strictEqual ( labels . template ( t , { dirty : '' , activeEditorName : 'somefile.txt' , rootName : 'monaco' , appName : 'Visual Studio Code' , separator : { label : ' - ' } } ) , 'somefile.txt - monaco - Visual Studio Code' ) ;
138- assert . strictEqual ( labels . template ( t , { dirty : '* ' , activeEditorName : 'somefile.txt' , rootName : 'monaco' , appName : 'Visual Studio Code' , separator : { label : ' - ' } } ) , '* somefile.txt - monaco - Visual Studio Code' ) ;
132+ t = '${dirty}${activeEditorShort }${separator}${rootName}${separator}${appName}' ;
133+ assert . strictEqual ( labels . template ( t , { dirty : '' , activeEditorShort : '' , rootName : '' , appName : '' , separator : { label : ' - ' } } ) , '' ) ;
134+ assert . strictEqual ( labels . template ( t , { dirty : '' , activeEditorShort : '' , rootName : '' , appName : 'Visual Studio Code' , separator : { label : ' - ' } } ) , 'Visual Studio Code' ) ;
135+ assert . strictEqual ( labels . template ( t , { dirty : '' , activeEditorShort : 'Untitled-1' , rootName : '' , appName : 'Visual Studio Code' , separator : { label : ' - ' } } ) , 'Untitled-1 - Visual Studio Code' ) ;
136+ assert . strictEqual ( labels . template ( t , { dirty : '' , activeEditorShort : '' , rootName : 'monaco' , appName : 'Visual Studio Code' , separator : { label : ' - ' } } ) , 'monaco - Visual Studio Code' ) ;
137+ assert . strictEqual ( labels . template ( t , { dirty : '' , activeEditorShort : 'somefile.txt' , rootName : 'monaco' , appName : 'Visual Studio Code' , separator : { label : ' - ' } } ) , 'somefile.txt - monaco - Visual Studio Code' ) ;
138+ assert . strictEqual ( labels . template ( t , { dirty : '* ' , activeEditorShort : 'somefile.txt' , rootName : 'monaco' , appName : 'Visual Studio Code' , separator : { label : ' - ' } } ) , '* somefile.txt - monaco - Visual Studio Code' ) ;
139139 } ) ;
140140} ) ;
0 commit comments