Fix bug where assets with a space in their path could not be bundled.

This commit is contained in:
Alexandre Gigliotti
2015-09-11 09:17:10 -07:00
parent f0b9b3cc1e
commit dad1267607
3 changed files with 10 additions and 2 deletions

1
test/fixtures/file space.txt vendored Normal file
View File

@@ -0,0 +1 @@
Test.

View File

@@ -159,5 +159,10 @@ describe('inlineHtml', function () {
var html = (source) => `<style> div { background-image: url('${source}'); }</style>`;
return expect(inline(html(url))).to.eventually.equal(html(uri));
});
it('handle assets with a space in their filename', function () {
var filename = path.resolve(__dirname, 'fixtures/file space.txt');
var uri = datauri(filename);
var html = (source) => `<style> div { background-image: url('${source}'); }</style>`;
return expect(inline(html(filename))).to.eventually.equal(html(uri));
});
});