Skip to content
Permalink
Browse files
Added additional changes to the test suite.
  • Loading branch information
jeresig committed Aug 14, 2006
1 parent 7448c61 commit 76ac10ed1f53d5166e18461e0d1bb98ceabe1e84
Showing with 38 additions and 455 deletions.
  1. +38 −0 build/test/test.js
  2. +0 −86 build/test/tests/basic.html
  3. +0 −57 build/test/tests/css1.html
  4. +0 −66 build/test/tests/css2.html
  5. +0 −79 build/test/tests/css3.html
  6. +0 −66 build/test/tests/custom.html
  7. +0 −30 build/test/tests/prereq.html
  8. +0 −71 build/test/tests/xpath.html
@@ -0,0 +1,38 @@
load( "build/js/writeFile.js", "build/js/parse.js" );

var dir = arguments[1];

var indexFile = readFile( "build/test/index.html" );
var testFile = readFile( "build/test/test.html" );
var files = {};

var jq = parse( readFile( arguments[0] ) );

for ( var i = 0; i < jq.length; i++ ) {
if ( jq[i].tests.length > 0 ) {

var count = 1;
while ( files[ jq[i].name + count ] ) { count++; }
var name = jq[i].name + count;

var myFile = testFile
.replace( /{TITLE}/g, jq[i].name )
.replace( /{NUM}/g, jq[i].tests.length )
.replace( /{TESTS}/g, jq[i].tests.join("\n") );

var fileName = "tests/" + name + ".js";

//writeFile( dir + "/" + fileName, myFile );
writeFile( dir + "/" + fileName, jq[i].tests.join("\n") );

files[ fileName ] = 1;
}
}

var fileString = "";
for ( var i in files ) {
if ( fileString ) fileString += ", ";
fileString += "'" + i + "'";
}

writeFile( dir + "/index.html", indexFile.replace( /{FILES}/g, fileString ) );

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 76ac10e

Please sign in to comment.