Skip to content

Commit

Permalink
Fixed RLS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Jan 19, 2011
1 parent 2e21b13 commit bd8a1b8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
2 changes: 0 additions & 2 deletions examples/rls.js
@@ -1,6 +1,4 @@
#!/usr/bin/env node


var start = (new Date()).getTime();
var yui3 = require('yui3');
yui3.rls({
Expand Down
4 changes: 4 additions & 0 deletions lib/yui3-rls.js
Expand Up @@ -70,6 +70,10 @@ exports.rls = function(YUI, config, fn) {
//Call the original YUI.include.
if (pFile) {
inc(file, function(err, data, info) {
if (err) {
console.log(err.stack);
return;
}
if (grab && parseContent) {
fileData[info.file] = info.data;
}
Expand Down
32 changes: 21 additions & 11 deletions tests/interface.js
Expand Up @@ -51,8 +51,9 @@ module.exports = {
yui3.rls({
m: 'yui,loader,dd,widget,autocomplete,gallery-yql,yui2-datatable',
v: '3.3.0',
parse: true,
gv: '2010.09.22',
'2in3v': '0.0.3'
'2in3v': '2.8.0'
}, function(js, css, data) {
assert.equal(js.length, 33);
assert.equal(css.length, 4);
Expand All @@ -64,8 +65,9 @@ module.exports = {
m: 'dd,widget,autocomplete,gallery-yql,yui2-datatable',
//env: 'node,attribute',
v: '3.3.0',
parse: true,
gv: '2010.09.22',
'2in3v': '0.0.3'//,
'2in3v': '2.8.0'//,
//filt: 'RAW',
}, function(js, css, data) {
assert.equal(js.length, 31);
Expand All @@ -79,8 +81,9 @@ module.exports = {
m: 'dd,widget,autocomplete,gallery-yql,yui2-datatable',
env: 'node,attribute',
v: '3.3.0',
parse: true,
gv: '2010.09.22',
'2in3v': '0.0.3'//,
'2in3v': '2.8.0'//,
//filt: 'RAW',
}, function(js, css, data) {
assert.equal(js.length, 26);
Expand All @@ -93,8 +96,9 @@ module.exports = {
m: 'dd,widget,autocomplete,gallery-yql,yui2-datatable',
env: 'node,attribute',
v: '3.3.0',
parse: true,
gv: '2010.09.22',
'2in3v': '0.0.3',
'2in3v': '2.8.0',
filt: 'RAW'
}, function(js, css, data) {
assert.equal(js.length, 26);
Expand All @@ -108,8 +112,9 @@ module.exports = {
m: 'dd,widget,autocomplete,gallery-yql,yui2-datatable',
env: 'node,attribute',
v: '3.3.0',
parse: true,
gv: '2010.09.22',
'2in3v': '0.0.3',
'2in3v': '2.8.0',
filt: 'MIN'
}, function(js, css, data) {
assert.equal(js.length, 26);
Expand All @@ -123,8 +128,9 @@ module.exports = {
m: 'dd,widget,autocomplete,gallery-yql,yui2-datatable',
env: 'node,attribute',
v: '3.3.0',
parse: true,
gv: '2010.09.22',
'2in3v': '0.0.3',
'2in3v': '2.8.0',
filt: 'DEBUG'
}, function(js, css, data) {
assert.equal(js.length, 26);
Expand All @@ -138,8 +144,9 @@ module.exports = {
m: 'dd,widget,autocomplete,gallery-yql,yui2-datatable',
env: 'node,attribute',
v: '3.3.0',
parse: true,
gv: '2010.09.22',
'2in3v': '0.0.3'
'2in3v': '2.8.0'
}, function(js, css, data) {
assert.equal(js.length, 26);
assert.equal(css.length, 4);
Expand All @@ -152,8 +159,9 @@ module.exports = {
m: 'dd,widget,gallery-yql,yui2-datatable',
env: 'node,attribute',
v: '3.2.0',
parse: true,
gv: '2010.09.22',
'2in3v': '0.0.3'
'2in3v': '2.8.0'
}, function(js, css, data) {
assert.equal(js.length, 15);
assert.equal(css.length, 2);
Expand All @@ -165,9 +173,10 @@ module.exports = {
yui3.rls({
m: 'dd,widget,gallery-yql,yui2-datatable',
env: 'node,attribute',
parse: true,
v: '3.2.0',
gv: '2010.09.22',
'2in3v': '0.0.3'
'2in3v': '2.8.0'
}, function(js, css, data) {
assert.equal(js.length, 15);
assert.equal(css.length, 2);
Expand All @@ -183,15 +192,16 @@ module.exports = {
yui3.rls({
m: 'dd,widget,gallery-yql,yui2-datatable',
env: 'node,attribute',
parse: true,
v: '3.2.0',
gv: '2010.09.22',
'2in3v': '0.0.2'
'2in3v': '2.8.0'
}, function(js, css, data) {
assert.equal(js.length, 15);
assert.equal(css.length, 2);
js.forEach(function(v) {
if (v.indexOf('yui3-2in3') > -1) {
assert.ok(v.indexOf('0.0.2') > 0);
assert.ok(v.indexOf('2.8.0') > 0);
}
});
assert.equal([].concat(js, css).length, Object.keys(data).length);
Expand Down

0 comments on commit bd8a1b8

Please sign in to comment.