forked from jeresig/env-js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
window module was missing from concatenated env.rhino.js
- Loading branch information
thatcher
committed
Feb 8, 2010
1 parent
0e1bc1c
commit 914a054
Showing
10 changed files
with
1,305 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.