diff --git a/harness/prove_rhino.t b/harness/prove_rhino.t deleted file mode 100644 index cf881a7..0000000 --- a/harness/prove_rhino.t +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -rhino harness/rhino_harness.js diff --git a/harness/rhino_harness.js b/harness/rhino_harness.js deleted file mode 100755 index c23d6e0..0000000 --- a/harness/rhino_harness.js +++ /dev/null @@ -1,24 +0,0 @@ -var path = 'lib'; -var testpath = 'tests'; - -var libs = [ - 'Test/TAP.js', - 'Test/TAP/Class.js', - 'Test/TAP/Runner.js' - ]; - -var tests = [ - '01_tap.t.js', - ]; - -for (i in libs) { - var lib = libs[i]; - load(path+'/'+lib); -} - -for (i in tests) { - var test = tests[i]; - var script = readFile(testpath+'/'+test); - t = eval(script); - t.run_tests(); -} diff --git a/scripts/addtoproject.sh b/scripts/addtoproject.sh deleted file mode 100755 index 6d9c675..0000000 --- a/scripts/addtoproject.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash - -usage() -{ - cat << HELPMSG -Usage: - add this library to a javascript project for you - $0 -d - - print this help - $0 -h -HELPMSG -} - -while getopts "d:h" OPTION -do - case $OPTION in - d) - DIRNAME=$OPTARG - ;; - h) - usage - exit 0 - ;; - ?) - usage - exit 1 - esac -done - -MYDIR=$(dirname $0) - -if [[ -z $DIRNAME ]] -then - echo "No -d option was present. You must provide a Project path."; - usage - exit 1 -fi - -echo "Setting up in project: ${DIRNAME}" - -#set up the directory structure -if [[ ! -d $DIRNAME/ext ]] -then - echo Making ${DIRNAME}/ext - mkdir $DIRNAME/ext -fi - -if [[ ! -d $DIRNAME/harness ]] -then - echo Making ${DIRNAME}/harness - mkdir $DIRNAME/harness -fi - -if [[ ! -d $DIRNAME/t || -d $DIRNAME/tests ]] -then - echo Making ${DIRNAME}/t - mkdir $DIRNAME/t -fi - -echo copy the files we need for initial setup -cp -r -f $MYDIR/../lib/Test $DIRNAME/ext/ -if [[ -d $DIRNAME/t ]] -then - echo copying TapHarness.html to $DIRNAME/t/ - cp -r -f $MYDIR/../tmpl/TapHarness.html $DIRNAME/t/ -elif [[ -d tests ]] -then - echo copying TapHarness.html to $DIRNAME/tests/ - cp -r -f $MYDIR/../tmpl/TapHarness.html $DIRNAME/tests/ -fi - -echo copying rhino harnesses to $DIRNAME/harness/ -cp -r -f $MYDIR/../tmpl/*rhino* $DIRNAME/harness/ - diff --git a/scripts/mkdist.sh b/scripts/mkdist.sh deleted file mode 100755 index 15fe0b5..0000000 --- a/scripts/mkdist.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!bash - -usage() -{ - cat << HELPMSG -Usage: - create a distribution directory with the specified version - $0 -d -v - - print this help - $0 -h -HELPMSG -} - -while getopts ":d:v:h" OPTION -do - case $OPTION in - d) - DIRNAME=$OPTARG - ;; - v) - VERSION=$OPTARG - ;; - h) - usage - exit 1 - ;; - ?) - usage - exit 1 - ;; - esac -done - -if [[ -z $DIRNAME ]] -then - usage - exit 1 -fi - -if [[ -z $VERSION ]] -then - usage - exit 1 -fi - -DIST="$DIRNAME-$VERSION" -ROOT="$(dirname $0)/.." -LIB="${ROOT}/lib"; -TLIB="${ROOT}/tests"; -SCRIPTS="Test/TAP.js Test/TAP/Class.js Test/TAP/Runner.js"; - -if [[ ! -d $DIST ]] -then - mkdir $DIST -else - rm -rf $DIST - mkdir $DIST -fi - -for s in $SCRIPTS -do - cat - $LIB/$s >> $DIST/test_tap.js < - - print this help - $0 -h -HELPMSG -} - -while getopts ":d:h" OPTION -do - case $OPTION in - d) - DIRNAME=$OPTARG - ;; - h) - usage - exit 1 - ;; - ?) - usage - exit 1 - ;; - esac -done - -shift $(($OPTIND - 1)) - -if [[ -z $DIRNAME ]] -then - echo 'Must provide a test directory' - usage - exit 1 -fi - -if [[ -z $1 ]] -then - echo 'Must provide a test name' - usage - exit 1 -fi - -TESTNAME=`echo $1 | tr '[:upper:]' '[:lower:]'`.t.js - -cat > $DIRNAME/$TESTNAME << TEST -(function() { - var t = new Test.TAP.Class(); - t.plan('no_plan'); - - t.setUp = function() { - }; - - t.testSomething = function() { - }; - - t.tearDown = function() { - }; - - return t; -})(); -TEST diff --git a/scripts/updateproject.sh b/scripts/updateproject.sh deleted file mode 100755 index da15057..0000000 --- a/scripts/updateproject.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -usage() -{ - cat << HELPMSG -Usage: - update this library in a javascript project for you - $0 -d - - print this help - $0 -h -HELPMSG -} - -while getopts "d:h" OPTION -do - case $OPTION in - d) - DIRNAME=$OPTARG - ;; - h) - usage - exit 0 - ;; - ?) - usage - exit 1 - esac -done - -MYDIR=$(dirname $0) - -if [[ -z $DIRNAME ]] -then - echo "No -d option was present. You must provide a Project path."; - usage - exit 1 -fi - -echo "Setting up in project: ${DIRNAME}" - -#set up the directory structure -if [[ ! -d $DIRNAME/ext ]] -then - mkdir $DIRNAME/ext -fi - -echo copying the javascript test libraries -cp -r -f $MYDIR/../lib/Test $DIRNAME/ext/ - -#now go back to where we started -cd $WORKING diff --git a/lib/Test/TAP/Class.js b/src/Class.js similarity index 100% rename from lib/Test/TAP/Class.js rename to src/Class.js diff --git a/lib/Test/TAP/Runner.js b/src/Runner.js similarity index 100% rename from lib/Test/TAP/Runner.js rename to src/Runner.js diff --git a/lib/Test/TAP.js b/src/TAP.js similarity index 100% rename from lib/Test/TAP.js rename to src/TAP.js diff --git a/lib/Test/TAPBrowser.js b/src/TAPBrowser.js similarity index 100% rename from lib/Test/TAPBrowser.js rename to src/TAPBrowser.js