mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
Add slim test to asset_hash. WRT #1503
This commit is contained in:
parent
5f9820dc63
commit
45ba4bb0d4
2 changed files with 626 additions and 0 deletions
|
@ -76,6 +76,15 @@ Feature: Assets get a file hash appended to their and references to them are upd
|
|||
And I should see 'images/100px-5fd6fb90.jpg'
|
||||
And I should see 'images/100px-1242c368.png'
|
||||
|
||||
Scenario: Hashed assets work with Slim
|
||||
Given the Server is running at "asset-hash-app"
|
||||
When I go to "/slim.html"
|
||||
Then I should see 'href="apple-touch-icon.png"'
|
||||
And I should see 'href="stylesheets/site-50eaa978.css"'
|
||||
And I should see 'src="javascripts/application-1d8d5276.js"'
|
||||
And I should see 'src="images/100px-5fd6fb90.jpg"'
|
||||
And I should see 'srcset="images/100px-5fd6fb90.jpg 1x, images/200px-c11eb203.jpg 2x, images/300px-59adce76.jpg 3x"'
|
||||
|
||||
Scenario: Enabling an asset host still produces hashed files and references
|
||||
Given the Server is running at "asset-hash-host-app"
|
||||
When I go to "/"
|
||||
|
|
617
middleman-core/fixtures/asset-hash-app/source/slim.html.slim
Normal file
617
middleman-core/fixtures/asset-hash-app/source/slim.html.slim
Normal file
|
@ -0,0 +1,617 @@
|
|||
---
|
||||
directory_index: false
|
||||
---
|
||||
|
||||
- content_for :head do
|
||||
title
|
||||
| The Middleman!
|
||||
|
||||
h2
|
||||
| Image url:
|
||||
|
||||
img src="#{image_path('100px.jpg')}" srcset="#{image_path('100px.jpg')} 1x, #{image_path('200px.jpg')} 2x, #{image_path('300px.jpg')} 3x"
|
||||
|
||||
h2
|
||||
| Ignored path:
|
||||
|
||||
link rel="apple-touch-icon" href="apple-touch-icon.png"
|
||||
|
||||
h2
|
||||
| Autogenerated tests:
|
||||
p
|
||||
| images/100px.jpg
|
||||
p
|
||||
| /images/100px.jpg
|
||||
p
|
||||
| ../images/100px.jpg
|
||||
p
|
||||
| ../../images/100px.jpg
|
||||
p
|
||||
| ../../../images/100px.jpg
|
||||
p
|
||||
| http://example.com/images/100px.jpg
|
||||
p
|
||||
| aimages/100px.jpga
|
||||
p
|
||||
| 1images/100px.jpg1
|
||||
p
|
||||
| .images/100px.jpg.
|
||||
p
|
||||
| -images/100px.jpg-
|
||||
p
|
||||
| _images/100px.jpg_
|
||||
p
|
||||
| 'images/100px.jpg'
|
||||
p
|
||||
| '/images/100px.jpg'
|
||||
p
|
||||
| '../images/100px.jpg'
|
||||
p
|
||||
| '../../images/100px.jpg'
|
||||
p
|
||||
| '../../../images/100px.jpg'
|
||||
p
|
||||
| 'http://example.com/images/100px.jpg'
|
||||
p
|
||||
| 'aimages/100px.jpga'
|
||||
p
|
||||
| '1images/100px.jpg1'
|
||||
p
|
||||
| '.images/100px.jpg.'
|
||||
p
|
||||
| '-images/100px.jpg-'
|
||||
p
|
||||
| '_images/100px.jpg_'
|
||||
p
|
||||
| "images/100px.jpg"
|
||||
p
|
||||
| "/images/100px.jpg"
|
||||
p
|
||||
| "../images/100px.jpg"
|
||||
p
|
||||
| "../../images/100px.jpg"
|
||||
p
|
||||
| "../../../images/100px.jpg"
|
||||
p
|
||||
| "http://example.com/images/100px.jpg"
|
||||
p
|
||||
| "aimages/100px.jpga"
|
||||
p
|
||||
| "1images/100px.jpg1"
|
||||
p
|
||||
| ".images/100px.jpg."
|
||||
p
|
||||
| "-images/100px.jpg-"
|
||||
p
|
||||
| "_images/100px.jpg_"
|
||||
p
|
||||
| <img src=images/100px.jpg />
|
||||
p
|
||||
| <img src=/images/100px.jpg />
|
||||
p
|
||||
| <img src=../images/100px.jpg />
|
||||
p
|
||||
| <img src=../../images/100px.jpg />
|
||||
p
|
||||
| <img src=../../../images/100px.jpg />
|
||||
p
|
||||
| <img src=http://example.com/images/100px.jpg />
|
||||
p
|
||||
| <img src=aimages/100px.jpga />
|
||||
p
|
||||
| <img src=1images/100px.jpg1 />
|
||||
p
|
||||
| <img src=.images/100px.jpg. />
|
||||
p
|
||||
| <img src=-images/100px.jpg- />
|
||||
p
|
||||
| <img src=_images/100px.jpg_ />
|
||||
p
|
||||
| <img src='images/100px.jpg' />
|
||||
p
|
||||
| <img src='/images/100px.jpg' />
|
||||
p
|
||||
| <img src='../images/100px.jpg' />
|
||||
p
|
||||
| <img src='../../images/100px.jpg' />
|
||||
p
|
||||
| <img src='../../../images/100px.jpg' />
|
||||
p
|
||||
| <img src='http://example.com/images/100px.jpg' />
|
||||
p
|
||||
| <img src='aimages/100px.jpga' />
|
||||
p
|
||||
| <img src='1images/100px.jpg1' />
|
||||
p
|
||||
| <img src='.images/100px.jpg.' />
|
||||
p
|
||||
| <img src='-images/100px.jpg-' />
|
||||
p
|
||||
| <img src='_images/100px.jpg_' />
|
||||
p
|
||||
| <img src="images/100px.jpg" />
|
||||
p
|
||||
| <img src="/images/100px.jpg" />
|
||||
p
|
||||
| <img src="../images/100px.jpg" />
|
||||
p
|
||||
| <img src="../../images/100px.jpg" />
|
||||
p
|
||||
| <img src="../../../images/100px.jpg" />
|
||||
p
|
||||
| <img src="http://example.com/images/100px.jpg" />
|
||||
p
|
||||
| <img src="aimages/100px.jpga" />
|
||||
p
|
||||
| <img src="1images/100px.jpg1" />
|
||||
p
|
||||
| <img src=".images/100px.jpg." />
|
||||
p
|
||||
| <img src="-images/100px.jpg-" />
|
||||
p
|
||||
| <img src="_images/100px.jpg_" />
|
||||
p
|
||||
| background-image:url(images/100px.jpg);
|
||||
p
|
||||
| background-image:url(/images/100px.jpg);
|
||||
p
|
||||
| background-image:url(../images/100px.jpg);
|
||||
p
|
||||
| background-image:url(../../images/100px.jpg);
|
||||
p
|
||||
| background-image:url(../../../images/100px.jpg);
|
||||
p
|
||||
| background-image:url(http://example.com/images/100px.jpg);
|
||||
p
|
||||
| background-image:url(aimages/100px.jpga);
|
||||
p
|
||||
| background-image:url(1images/100px.jpg1);
|
||||
p
|
||||
| background-image:url(.images/100px.jpg.);
|
||||
p
|
||||
| background-image:url(-images/100px.jpg-);
|
||||
p
|
||||
| background-image:url(_images/100px.jpg_);
|
||||
p
|
||||
| background-image:url('images/100px.jpg');
|
||||
p
|
||||
| background-image:url('/images/100px.jpg');
|
||||
p
|
||||
| background-image:url('../images/100px.jpg');
|
||||
p
|
||||
| background-image:url('../../images/100px.jpg');
|
||||
p
|
||||
| background-image:url('../../../images/100px.jpg');
|
||||
p
|
||||
| background-image:url('http://example.com/images/100px.jpg');
|
||||
p
|
||||
| background-image:url('aimages/100px.jpga');
|
||||
p
|
||||
| background-image:url('1images/100px.jpg1');
|
||||
p
|
||||
| background-image:url('.images/100px.jpg.');
|
||||
p
|
||||
| background-image:url('-images/100px.jpg-');
|
||||
p
|
||||
| background-image:url('_images/100px.jpg_');
|
||||
p
|
||||
| background-image:url("images/100px.jpg");
|
||||
p
|
||||
| background-image:url("/images/100px.jpg");
|
||||
p
|
||||
| background-image:url("../images/100px.jpg");
|
||||
p
|
||||
| background-image:url("../../images/100px.jpg");
|
||||
p
|
||||
| background-image:url("../../../images/100px.jpg");
|
||||
p
|
||||
| background-image:url("http://example.com/images/100px.jpg");
|
||||
p
|
||||
| background-image:url("aimages/100px.jpga");
|
||||
p
|
||||
| background-image:url("1images/100px.jpg1");
|
||||
p
|
||||
| background-image:url(".images/100px.jpg.");
|
||||
p
|
||||
| background-image:url("-images/100px.jpg-");
|
||||
p
|
||||
| background-image:url("_images/100px.jpg_");
|
||||
|
||||
p
|
||||
| images/100px.png
|
||||
p
|
||||
| /images/100px.png
|
||||
p
|
||||
| ../images/100px.png
|
||||
p
|
||||
| ../../images/100px.png
|
||||
p
|
||||
| ../../../images/100px.png
|
||||
p
|
||||
| http://example.com/images/100px.png
|
||||
p
|
||||
| aimages/100px.pnga
|
||||
p
|
||||
| 1images/100px.png1
|
||||
p
|
||||
| .images/100px.png.
|
||||
p
|
||||
| -images/100px.png-
|
||||
p
|
||||
| _images/100px.png_
|
||||
p
|
||||
| 'images/100px.png'
|
||||
p
|
||||
| '/images/100px.png'
|
||||
p
|
||||
| '../images/100px.png'
|
||||
p
|
||||
| '../../images/100px.png'
|
||||
p
|
||||
| '../../../images/100px.png'
|
||||
p
|
||||
| 'http://example.com/images/100px.png'
|
||||
p
|
||||
| 'aimages/100px.pnga'
|
||||
p
|
||||
| '1images/100px.png1'
|
||||
p
|
||||
| '.images/100px.png.'
|
||||
p
|
||||
| '-images/100px.png-'
|
||||
p
|
||||
| '_images/100px.png_'
|
||||
p
|
||||
| "images/100px.png"
|
||||
p
|
||||
| "/images/100px.png"
|
||||
p
|
||||
| "../images/100px.png"
|
||||
p
|
||||
| "../../images/100px.png"
|
||||
p
|
||||
| "../../../images/100px.png"
|
||||
p
|
||||
| "http://example.com/images/100px.png"
|
||||
p
|
||||
| "aimages/100px.pnga"
|
||||
p
|
||||
| "1images/100px.png1"
|
||||
p
|
||||
| ".images/100px.png."
|
||||
p
|
||||
| "-images/100px.png-"
|
||||
p
|
||||
| "_images/100px.png_"
|
||||
p
|
||||
| <img src=images/100px.png />
|
||||
p
|
||||
| <img src=/images/100px.png />
|
||||
p
|
||||
| <img src=../images/100px.png />
|
||||
p
|
||||
| <img src=../../images/100px.png />
|
||||
p
|
||||
| <img src=../../../images/100px.png />
|
||||
p
|
||||
| <img src=http://example.com/images/100px.png />
|
||||
p
|
||||
| <img src=aimages/100px.pnga />
|
||||
p
|
||||
| <img src=1images/100px.png1 />
|
||||
p
|
||||
| <img src=.images/100px.png. />
|
||||
p
|
||||
| <img src=-images/100px.png- />
|
||||
p
|
||||
| <img src=_images/100px.png_ />
|
||||
p
|
||||
| <img src='images/100px.png' />
|
||||
p
|
||||
| <img src='/images/100px.png' />
|
||||
p
|
||||
| <img src='../images/100px.png' />
|
||||
p
|
||||
| <img src='../../images/100px.png' />
|
||||
p
|
||||
| <img src='../../../images/100px.png' />
|
||||
p
|
||||
| <img src='http://example.com/images/100px.png' />
|
||||
p
|
||||
| <img src='aimages/100px.pnga' />
|
||||
p
|
||||
| <img src='1images/100px.png1' />
|
||||
p
|
||||
| <img src='.images/100px.png.' />
|
||||
p
|
||||
| <img src='-images/100px.png-' />
|
||||
p
|
||||
| <img src='_images/100px.png_' />
|
||||
p
|
||||
| <img src="images/100px.png" />
|
||||
p
|
||||
| <img src="/images/100px.png" />
|
||||
p
|
||||
| <img src="../images/100px.png" />
|
||||
p
|
||||
| <img src="../../images/100px.png" />
|
||||
p
|
||||
| <img src="../../../images/100px.png" />
|
||||
p
|
||||
| <img src="http://example.com/images/100px.png" />
|
||||
p
|
||||
| <img src="aimages/100px.pnga" />
|
||||
p
|
||||
| <img src="1images/100px.png1" />
|
||||
p
|
||||
| <img src=".images/100px.png." />
|
||||
p
|
||||
| <img src="-images/100px.png-" />
|
||||
p
|
||||
| <img src="_images/100px.png_" />
|
||||
p
|
||||
| background-image:url(images/100px.png);
|
||||
p
|
||||
| background-image:url(/images/100px.png);
|
||||
p
|
||||
| background-image:url(../images/100px.png);
|
||||
p
|
||||
| background-image:url(../../images/100px.png);
|
||||
p
|
||||
| background-image:url(../../../images/100px.png);
|
||||
p
|
||||
| background-image:url(http://example.com/images/100px.png);
|
||||
p
|
||||
| background-image:url(aimages/100px.pnga);
|
||||
p
|
||||
| background-image:url(1images/100px.png1);
|
||||
p
|
||||
| background-image:url(.images/100px.png.);
|
||||
p
|
||||
| background-image:url(-images/100px.png-);
|
||||
p
|
||||
| background-image:url(_images/100px.png_);
|
||||
p
|
||||
| background-image:url('images/100px.png');
|
||||
p
|
||||
| background-image:url('/images/100px.png');
|
||||
p
|
||||
| background-image:url('../images/100px.png');
|
||||
p
|
||||
| background-image:url('../../images/100px.png');
|
||||
p
|
||||
| background-image:url('../../../images/100px.png');
|
||||
p
|
||||
| background-image:url('http://example.com/images/100px.png');
|
||||
p
|
||||
| background-image:url('aimages/100px.pnga');
|
||||
p
|
||||
| background-image:url('1images/100px.png1');
|
||||
p
|
||||
| background-image:url('.images/100px.png.');
|
||||
p
|
||||
| background-image:url('-images/100px.png-');
|
||||
p
|
||||
| background-image:url('_images/100px.png_');
|
||||
p
|
||||
| background-image:url("images/100px.png");
|
||||
p
|
||||
| background-image:url("/images/100px.png");
|
||||
p
|
||||
| background-image:url("../images/100px.png");
|
||||
p
|
||||
| background-image:url("../../images/100px.png");
|
||||
p
|
||||
| background-image:url("../../../images/100px.png");
|
||||
p
|
||||
| background-image:url("http://example.com/images/100px.png");
|
||||
p
|
||||
| background-image:url("aimages/100px.pnga");
|
||||
p
|
||||
| background-image:url("1images/100px.png1");
|
||||
p
|
||||
| background-image:url(".images/100px.png.");
|
||||
p
|
||||
| background-image:url("-images/100px.png-");
|
||||
p
|
||||
| background-image:url("_images/100px.png_");
|
||||
|
||||
p
|
||||
| images/100px.gif
|
||||
p
|
||||
| /images/100px.gif
|
||||
p
|
||||
| ../images/100px.gif
|
||||
p
|
||||
| ../../images/100px.gif
|
||||
p
|
||||
| ../../../images/100px.gif
|
||||
p
|
||||
| http://example.com/images/100px.gif
|
||||
p
|
||||
| aimages/100px.gifa
|
||||
p
|
||||
| 1images/100px.gif1
|
||||
p
|
||||
| .images/100px.gif.
|
||||
p
|
||||
| -images/100px.gif-
|
||||
p
|
||||
| _images/100px.gif_
|
||||
p
|
||||
| 'images/100px.gif'
|
||||
p
|
||||
| '/images/100px.gif'
|
||||
p
|
||||
| '../images/100px.gif'
|
||||
p
|
||||
| '../../images/100px.gif'
|
||||
p
|
||||
| '../../../images/100px.gif'
|
||||
p
|
||||
| 'http://example.com/images/100px.gif'
|
||||
p
|
||||
| 'aimages/100px.gifa'
|
||||
p
|
||||
| '1images/100px.gif1'
|
||||
p
|
||||
| '.images/100px.gif.'
|
||||
p
|
||||
| '-images/100px.gif-'
|
||||
p
|
||||
| '_images/100px.gif_'
|
||||
p
|
||||
| "images/100px.gif"
|
||||
p
|
||||
| "/images/100px.gif"
|
||||
p
|
||||
| "../images/100px.gif"
|
||||
p
|
||||
| "../../images/100px.gif"
|
||||
p
|
||||
| "../../../images/100px.gif"
|
||||
p
|
||||
| "http://example.com/images/100px.gif"
|
||||
p
|
||||
| "aimages/100px.gifa"
|
||||
p
|
||||
| "1images/100px.gif1"
|
||||
p
|
||||
| ".images/100px.gif."
|
||||
p
|
||||
| "-images/100px.gif-"
|
||||
p
|
||||
| "_images/100px.gif_"
|
||||
p
|
||||
| <img src=images/100px.gif />
|
||||
p
|
||||
| <img src=/images/100px.gif />
|
||||
p
|
||||
| <img src=../images/100px.gif />
|
||||
p
|
||||
| <img src=../../images/100px.gif />
|
||||
p
|
||||
| <img src=../../../images/100px.gif />
|
||||
p
|
||||
| <img src=http://example.com/images/100px.gif />
|
||||
p
|
||||
| <img src=aimages/100px.gifa />
|
||||
p
|
||||
| <img src=1images/100px.gif1 />
|
||||
p
|
||||
| <img src=.images/100px.gif. />
|
||||
p
|
||||
| <img src=-images/100px.gif- />
|
||||
p
|
||||
| <img src=_images/100px.gif_ />
|
||||
p
|
||||
| <img src='images/100px.gif' />
|
||||
p
|
||||
| <img src='/images/100px.gif' />
|
||||
p
|
||||
| <img src='../images/100px.gif' />
|
||||
p
|
||||
| <img src='../../images/100px.gif' />
|
||||
p
|
||||
| <img src='../../../images/100px.gif' />
|
||||
p
|
||||
| <img src='http://example.com/images/100px.gif' />
|
||||
p
|
||||
| <img src='aimages/100px.gifa' />
|
||||
p
|
||||
| <img src='1images/100px.gif1' />
|
||||
p
|
||||
| <img src='.images/100px.gif.' />
|
||||
p
|
||||
| <img src='-images/100px.gif-' />
|
||||
p
|
||||
| <img src='_images/100px.gif_' />
|
||||
p
|
||||
| <img src="images/100px.gif" />
|
||||
p
|
||||
| <img src="/images/100px.gif" />
|
||||
p
|
||||
| <img src="../images/100px.gif" />
|
||||
p
|
||||
| <img src="../../images/100px.gif" />
|
||||
p
|
||||
| <img src="../../../images/100px.gif" />
|
||||
p
|
||||
| <img src="http://example.com/images/100px.gif" />
|
||||
p
|
||||
| <img src="aimages/100px.gifa" />
|
||||
p
|
||||
| <img src="1images/100px.gif1" />
|
||||
p
|
||||
| <img src=".images/100px.gif." />
|
||||
p
|
||||
| <img src="-images/100px.gif-" />
|
||||
p
|
||||
| <img src="_images/100px.gif_" />
|
||||
p
|
||||
| background-image:url(images/100px.gif);
|
||||
p
|
||||
| background-image:url(/images/100px.gif);
|
||||
p
|
||||
| background-image:url(../images/100px.gif);
|
||||
p
|
||||
| background-image:url(../../images/100px.gif);
|
||||
p
|
||||
| background-image:url(../../../images/100px.gif);
|
||||
p
|
||||
| background-image:url(http://example.com/images/100px.gif);
|
||||
p
|
||||
| background-image:url(aimages/100px.gifa);
|
||||
p
|
||||
| background-image:url(1images/100px.gif1);
|
||||
p
|
||||
| background-image:url(.images/100px.gif.);
|
||||
p
|
||||
| background-image:url(-images/100px.gif-);
|
||||
p
|
||||
| background-image:url(_images/100px.gif_);
|
||||
p
|
||||
| background-image:url('images/100px.gif');
|
||||
p
|
||||
| background-image:url('/images/100px.gif');
|
||||
p
|
||||
| background-image:url('../images/100px.gif');
|
||||
p
|
||||
| background-image:url('../../images/100px.gif');
|
||||
p
|
||||
| background-image:url('../../../images/100px.gif');
|
||||
p
|
||||
| background-image:url('http://example.com/images/100px.gif');
|
||||
p
|
||||
| background-image:url('aimages/100px.gifa');
|
||||
p
|
||||
| background-image:url('1images/100px.gif1');
|
||||
p
|
||||
| background-image:url('.images/100px.gif.');
|
||||
p
|
||||
| background-image:url('-images/100px.gif-');
|
||||
p
|
||||
| background-image:url('_images/100px.gif_');
|
||||
p
|
||||
| background-image:url("images/100px.gif");
|
||||
p
|
||||
| background-image:url("/images/100px.gif");
|
||||
p
|
||||
| background-image:url("../images/100px.gif");
|
||||
p
|
||||
| background-image:url("../../images/100px.gif");
|
||||
p
|
||||
| background-image:url("../../../images/100px.gif");
|
||||
p
|
||||
| background-image:url("http://example.com/images/100px.gif");
|
||||
p
|
||||
| background-image:url("aimages/100px.gifa");
|
||||
p
|
||||
| background-image:url("1images/100px.gif1");
|
||||
p
|
||||
| background-image:url(".images/100px.gif.");
|
||||
p
|
||||
| background-image:url("-images/100px.gif-");
|
||||
p
|
||||
| background-image:url("_images/100px.gif_");
|
||||
|
Loading…
Reference in a new issue