Skip to content

Commit f36afa4

Browse files
committed
Fix tests on Windows
1 parent 1e81535 commit f36afa4

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

src/vs/editor/test/browser/services/decorationRenderOptions.test.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -152,23 +152,12 @@ suite('Decoration Render Options', () => {
152152
if (platform.isWindows) {
153153
// windows file path (used as string)
154154
s.registerDecorationType('example', { gutterIconPath: URI.file('c:\\files\\miles\\more.png') });
155-
const sheet1 = readStyleSheet(styleSheet);
156-
assert(
157-
sheet1.indexOf('background: url(\'file:///c%3A/files/miles/more.png\') center center no-repeat;') > 0
158-
|| sheet1.indexOf('background: url("file:///c%3A/files/miles/more.png") center center no-repeat;') > 0
159-
|| sheet1.indexOf('background: url("file:///c:/files/miles/more.png") center center no-repeat;') > 0
160-
|| sheet1.indexOf('background-image: url("file:///c:/files/miles/more.png"); background-position: center center; background-repeat: no-repeat no-repeat;') > 0
161-
);
155+
assert(readStyleSheet(styleSheet).indexOf(`{background:url('file:///c:/files/miles/more.png') center center no-repeat;}`) > 0);
162156
s.removeDecorationType('example');
163157

164158
// single quote must always be escaped/encoded
165159
s.registerDecorationType('example', { gutterIconPath: URI.file('c:\\files\\foo\\b\'ar.png') });
166-
const sheet2 = readStyleSheet(styleSheet);
167-
assert(
168-
sheet2.indexOf('background: url(\'file:///Users/foo/b%27ar.png\') center center no-repeat;') > 0
169-
|| sheet2.indexOf('background: url("file:///Users/foo/b%27ar.png") center center no-repeat;') > 0
170-
|| sheet2.indexOf('background-image: url("file:///Users/foo/b%27ar.png"); background-position: center center; background-repeat: no-repeat no-repeat;') > 0
171-
);
160+
assert(readStyleSheet(styleSheet).indexOf(`{background:url('file:///c:/files/foo/b%27ar.png') center center no-repeat;}`) > 0);
172161
s.removeDecorationType('example');
173162
} else {
174163
// unix file path (used as string)

0 commit comments

Comments
 (0)