--- trunk/tests/javascript.sh 2008/10/03 02:27:56 222 +++ trunk/tests/javascript.sh 2009/02/18 16:08:33 427 @@ -1,6 +1,6 @@ #!/bin/sh # javascript.sh - test various JavaScript constructs -# Copyright (C) 2007, 2008 siliconforks.com +# Copyright (C) 2007, 2008, 2009 siliconforks.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,10 +22,28 @@ export PATH=.:..:$PATH +if jscoverage-server --version | grep -q 'iconv\|MultiByteToWideChar' +then + character_encoding_support=yes +else + character_encoding_support=no +fi + rm -fr DIR -$VALGRIND jscoverage --encoding ISO-8859-1 javascript DIR +case "$character_encoding_support" in + yes) + $VALGRIND jscoverage --js-version 180 --encoding ISO-8859-1 javascript DIR + ;; + *) + $VALGRIND jscoverage --js-version=180 --exclude=javascript-iso-8859-1.js javascript DIR + ;; +esac for i in javascript/*.js do + if [ $character_encoding_support = no -a $i = javascript/javascript-iso-8859-1.js ] + then + continue + fi FILE=${i##javascript/} EXPECTED=javascript.expected/${FILE} ACTUAL=DIR/${FILE}