Skip to content

Commit

Permalink
window module was missing from concatenated env.rhino.js
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcher committed Feb 8, 2010
1 parent 0e1bc1c commit 914a054
Show file tree
Hide file tree
Showing 10 changed files with 1,305 additions and 54 deletions.
83 changes: 50 additions & 33 deletions bin/test-jquery.sh
@@ -1,52 +1,69 @@
#!/bin/sh

# Usage: test-jquery.sh [version]
# Currently supported versions: 1.3.2, 1.3.1, and 1.2.6
# Currently supported versions: 1.4.1, 1.3.2, 1.3.1, and 1.2.6
#
# This script will check out the jQuery development tree from Subversion if necessary,
# massage the testing scripts as necessary, copy our latest version of env.js into place,
# and then run the test scripts.
# This script will check out the jQuery development tree from Subversion
# or github if necessary, massage the testing scripts as necessary, copy
# our latest version of env.js into place, and then run the test scripts.


if [ -n "$2" ]; then
echo 'debug'
if [ -n "$2" ]; then VERSION="$2"; else VERSION="1.3.2"; fi
if [ -n "$2" ]; then VERSION="$2"; else VERSION="1.4.1"; fi
DEBUG=1
else
echo 'jquery'
if [ -n "$1" ]; then VERSION="$1"; else VERSION="1.3.2"; fi
if [ -n "$1" ]; then VERSION="$1"; else VERSION="1.4.1"; fi
DEBUG=0
fi

JQUERY_DIR="test/vendor/jQuery/$VERSION";

ant concat

if [ ! -d "$JQUERY_DIR" ]; then
svn export http://jqueryjs.googlecode.com/svn/tags/$VERSION/ $JQUERY_DIR
case "$VERSION" in
"1.3.2")
rm -rf "$JQUERY_DIR/test/qunit"
svn export -r6173 http://jqueryjs.googlecode.com/svn/trunk/qunit $JQUERY_DIR/test/qunit
;;
"1.3.1")
rm -rf "$JQUERY_DIR/test/qunit"
svn export -r6133 http://jqueryjs.googlecode.com/svn/trunk/qunit $JQUERY_DIR/test/qunit
;;
esac
fi
#ant

cp dist/env.rhino.js $JQUERY_DIR/build/runtest/env.js
cp dist/env-js.jar $JQUERY_DIR/build/js.jar
cp bin/jquery-$VERSION-test.js $JQUERY_DIR/build/runtest/test.js

if [ $DEBUG -eq 1 ]; then
echo 'enabling rhino debugger'
perl -pi~ -e "s/^JAR(.*)(-jar.*|-cp.*)/JAR\1 -cp \\$\{BUILD_DIR}\/js.jar org.mozilla.javascript.tools.debugger.Main -opt -1/" $JQUERY_DIR/Makefile;
else
echo 'running with rhino'
perl -pi~ -e "s/^JAR(.*)(-jar.*|-cp.*)/JAR\1 -cp \\$\{BUILD_DIR}\/js.jar org.mozilla.javascript.tools.envjs.Main -opt -1/" $JQUERY_DIR/Makefile;
fi
case "$VERSION" in
"1.3.2")
svn export http://jqueryjs.googlecode.com/svn/tags/$VERSION/ $JQUERY_DIR
rm -rf "$JQUERY_DIR/test/qunit"
svn export -r6173 http://jqueryjs.googlecode.com/svn/trunk/qunit $JQUERY_DIR/test/qunit
;;
"1.3.1")
if [ ! -d "$JQUERY_DIR" ]; then
svn export http://jqueryjs.googlecode.com/svn/tags/$VERSION/ $JQUERY_DIR
rm -rf "$JQUERY_DIR/test/qunit"
svn export -r6133 http://jqueryjs.googlecode.com/svn/trunk/qunit $JQUERY_DIR/test/qunit
fi
;;
"1.4.1")
if [ ! -d "$JQUERY_DIR" ]; then
echo 'cloning jquery 1.4.1 repo'
git clone git://github.com/jquery/jquery.git $JQUERY_DIR
cd $JQUERY_DIR
git branch jquery-1.4.1 1.4.1
git checkout jquery-1.4.1
make
cd -
fi
echo 'running jquery 1.4.1 tests'
java -jar rhino/js.jar -opt -1 bin/jquery-1.4.1-test.js
echo 'completed jquery 1.4.1 tests'
;;
esac

#cp dist/env.rhino.js $JQUERY_DIR/build/runtest/env.js
#cp dist/env-js.jar $JQUERY_DIR/build/js.jar
#cp bin/jquery-$VERSION-test.js $JQUERY_DIR/build/runtest/test.js

#if [ $DEBUG -eq 1 ]; then
# echo 'enabling rhino debugger'
# perl -pi~ -e "s/^JAR(.*)(-jar.*|-cp.*)/JAR\1 -cp \\$\{BUILD_DIR}\/js.jar org.mozilla.javascript.tools.debugger.Main/" $JQUERY_DIR/Makefile;
#else
# echo 'running with rhino'
# perl -pi~ -e "s/^JAR(.*)(-jar.*|-cp.*)/JAR\1 -jar \\$\{BUILD_DIR}\/js.jar/" $JQUERY_DIR/Makefile;
# java -jar rhino/js.jar bin/
#fi

cd $JQUERY_DIR
make runtest
#cd $JQUERY_DIR
#make runtest
2 changes: 1 addition & 1 deletion build.xml
Expand Up @@ -629,7 +629,7 @@
<fileset dir="${DIST_DIR}" includes="html.js" />
<fileset dir="${DIST_DIR}" includes="xhr.js" />
<fileset dir="${DIST_DIR}" includes="parser.js" />
<fileset dir="${DIST_DIR}" includes="window" />
<fileset dir="${DIST_DIR}" includes="window.js" />
<fileset dir="${DIST_DIR}" includes="console.js" />
</concat>
<echo message="${ENV_DIST} built." />
Expand Down

0 comments on commit 914a054

Please sign in to comment.