Files
less.js/test/rhino/test-header.js
Doug Haber 9b3513b801 Split rhino and rhino version of lessc. This lets us have cleaner tests (since we don't need to include the test code in the rhino source). Also
sets the stage for sharing lessc code between lessc and rhino less (issue #14) and provides a hook so lesscss-java can have custom js.
2014-01-21 21:48:37 -05:00

15 lines
443 B
JavaScript

function initRhinoTest() {
process = { title: 'dummy' };
less.tree.functions.add = function (a, b) {
return new(less.tree.Dimension)(a.value + b.value);
};
less.tree.functions.increment = function (a) {
return new(less.tree.Dimension)(a.value + 1);
};
less.tree.functions._color = function (str) {
if (str.value === "evil red") { return new(less.tree.Color)("600"); }
};
}
initRhinoTest();