Skip to content

Commit

Permalink
Chore: add test case for escaped quote url in css
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinyaigeek committed Mar 6, 2022
1 parent ea56294 commit 7e8ae38
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/core/integration-tests/test/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,27 @@ describe('css', () => {
);
});

it('should handle the dependency imported with url() includes escaped quote', async () => {
let b = await bundle(
path.join(__dirname, '/integration/css-url-escaped-quote/index.css'),
);
assertBundles(b, [
{
name: 'index.css',
assets: ['index.css'],
},
{
type: 'png',
assets: ['f"oo.png'],
},
]);
let css = await outputFS.readFile(
path.join(distDir, 'index.css'),
'utf8',
);
assert(css.includes('url("f\\"oo'));
});

it('should remap locations in diagnostics using the input source map', async () => {
let fixture = path.join(
__dirname,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.escaped-quote {
background: url(./f\"oo.png);
}

0 comments on commit 7e8ae38

Please sign in to comment.