mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
Added relative urls tests.
This commit is contained in:
36
Gruntfile.js
36
Gruntfile.js
@@ -126,50 +126,58 @@ module.exports = function(grunt) {
|
||||
jasmine: {
|
||||
options: {
|
||||
keepRunner: true, //TODO meri: remove after it is done
|
||||
host: 'http://localhost:8081/',
|
||||
vendor: 'test/browser/common.js',
|
||||
template: 'test/browser/test-runner-template.tmpl'
|
||||
host: 'http://localhost:8081/',
|
||||
vendor: 'test/browser/common.js',
|
||||
template: 'test/browser/test-runner-template.tmpl'
|
||||
},
|
||||
main: {
|
||||
//src is used to build list of less files to compile
|
||||
//src is used to build list of less files to compile
|
||||
src: ['test/less/*.less', '!test/less/javascript.less', '!test/less/urls.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-main-options.js',
|
||||
options: {
|
||||
helpers: 'test/browser/runner-main-options.js',
|
||||
specs: 'test/browser/runner-main-spec.js',
|
||||
outfile: 'test/browser/test-runner-main.html'
|
||||
}
|
||||
},
|
||||
legacy: {
|
||||
src: ['test/less/legacy/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-legacy-options.js',
|
||||
options: {
|
||||
helpers: 'test/browser/runner-legacy-options.js',
|
||||
specs: 'test/browser/runner-legacy-spec.js',
|
||||
outfile: 'test/browser/test-runner-legacy.html'
|
||||
}
|
||||
},
|
||||
errors: {
|
||||
src: ['test/less/errors/*.less', '!test/less/errors/javascript-error.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-errors-options.js',
|
||||
options: {
|
||||
helpers: 'test/browser/runner-errors-options.js',
|
||||
specs: 'test/browser/runner-errors-spec.js',
|
||||
outfile: 'test/browser/test-runner-errors.html'
|
||||
}
|
||||
},
|
||||
noJsErrors: {
|
||||
src: ['test/less/no-js-errors/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-no-js-errors-options.js',
|
||||
options: {
|
||||
helpers: 'test/browser/runner-no-js-errors-options.js',
|
||||
specs: 'test/browser/runner-no-js-errors-spec.js',
|
||||
outfile: 'test/browser/test-runner-no-js-errors.html'
|
||||
}
|
||||
},
|
||||
browser: {
|
||||
src: ['test/browser/less/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-browser-options.js',
|
||||
options: {
|
||||
helpers: 'test/browser/runner-browser-options.js',
|
||||
specs: 'test/browser/runner-browser-spec.js',
|
||||
outfile: 'test/browser/test-runner-browser.html'
|
||||
}
|
||||
},
|
||||
relativeUrls: {
|
||||
src: ['test/browser/less/relative-urls/*.less'],
|
||||
options: {
|
||||
helpers: 'test/browser/runner-relative-urls-options.js',
|
||||
specs: 'test/browser/runner-relative-urls-spec.js',
|
||||
outfile: 'test/browser/test-runner-relative-urls.html'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
@import "http://localhost:8081/browser/less/imports/modify-this.css";
|
||||
@import "http://localhost:8081/test/browser/less/imports/modify-this.css";
|
||||
|
||||
@import "http://localhost:8081/browser/less/imports/modify-again.css";
|
||||
@import "http://localhost:8081/test/browser/less/imports/modify-again.css";
|
||||
.modify {
|
||||
my-url: url("http://localhost:8081/browser/less/imports/a.png");
|
||||
my-url: url("http://localhost:8081/test/browser/less/imports/a.png");
|
||||
}
|
||||
.modify {
|
||||
my-url: url("http://localhost:8081/browser/less/imports/b.png");
|
||||
my-url: url("http://localhost:8081/test/browser/less/imports/b.png");
|
||||
}
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium), url(http://localhost:8081/browser/less/relative-urls/fonts.svg#MyGeometricModern) format("svg");
|
||||
src: local(Futura-Medium), url(http://localhost:8081/test/browser/less/relative-urls/fonts.svg#MyGeometricModern) format("svg");
|
||||
}
|
||||
#shorthands {
|
||||
background: url("http://www.lesscss.org/spec.html") no-repeat 0 4px;
|
||||
}
|
||||
#misc {
|
||||
background-image: url(http://localhost:8081/browser/less/relative-urls/images/image.jpg);
|
||||
background-image: url(http://localhost:8081/test/browser/less/relative-urls/images/image.jpg);
|
||||
}
|
||||
#data-uri {
|
||||
background: url(data:image/png;charset=utf-8;base64,
|
||||
@@ -29,8 +29,8 @@
|
||||
background: transparent url('data:image/svg+xml, <svg version="1.1"><g></g></svg>');
|
||||
}
|
||||
.comma-delimited {
|
||||
background: url(http://localhost:8081/browser/less/relative-urls/bg.jpg) no-repeat, url(http://localhost:8081/browser/less/relative-urls/bg.png) repeat-x top left, url(http://localhost:8081/browser/less/relative-urls/bg);
|
||||
background: url(http://localhost:8081/test/browser/less/relative-urls/bg.jpg) no-repeat, url(http://localhost:8081/test/browser/less/relative-urls/bg.png) repeat-x top left, url(http://localhost:8081/test/browser/less/relative-urls/bg);
|
||||
}
|
||||
.values {
|
||||
url: url('http://localhost:8081/browser/less/relative-urls/Trebuchet');
|
||||
url: url('http://localhost:8081/test/browser/less/relative-urls/Trebuchet');
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@import ".././imports/urls.less";
|
||||
@import "http://localhost:8081/browser/less/imports/urls2.less";
|
||||
@import "http://localhost:8081/test/browser/less/imports/urls2.less";
|
||||
@font-face {
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
src: local(Futura-Medium),
|
||||
|
||||
3
test/browser/runner-relative-urls-options.js
Normal file
3
test/browser/runner-relative-urls-options.js
Normal file
@@ -0,0 +1,3 @@
|
||||
var less = {};
|
||||
less.relativeUrls = true;
|
||||
|
||||
3
test/browser/runner-relative-urls-spec.js
Normal file
3
test/browser/runner-relative-urls-spec.js
Normal file
@@ -0,0 +1,3 @@
|
||||
describe("less.js browser test - relative url's", function() {
|
||||
testLessEqualsInDocument();
|
||||
});
|
||||
Reference in New Issue
Block a user