1 |
#!/bin/sh |
#!/bin/sh |
2 |
# javascript.sh - test various JavaScript constructs |
# javascript.sh - test various JavaScript constructs |
3 |
# Copyright (C) 2007 siliconforks.com |
# Copyright (C) 2007, 2008 siliconforks.com |
4 |
# |
# |
5 |
# This program is free software; you can redistribute it and/or modify |
# This program is free software; you can redistribute it and/or modify |
6 |
# it under the terms of the GNU General Public License as published by |
# it under the terms of the GNU General Public License as published by |
23 |
export PATH=.:..:$PATH |
export PATH=.:..:$PATH |
24 |
|
|
25 |
rm -fr DIR |
rm -fr DIR |
26 |
$VALGRIND jscoverage javascript DIR |
$VALGRIND jscoverage --encoding ISO-8859-1 javascript DIR |
27 |
for i in javascript/*.expected.js |
for i in javascript/*.js |
28 |
do |
do |
29 |
EXPECTED=$i |
FILE=${i##javascript/} |
30 |
ACTUAL=$EXPECTED |
EXPECTED=javascript.expected/${FILE} |
31 |
ACTUAL=${ACTUAL%%.expected.js} |
ACTUAL=DIR/${FILE} |
|
ACTUAL=${ACTUAL##javascript/} |
|
|
ACTUAL=DIR/${ACTUAL}.js |
|
32 |
diff -u -r --strip-trailing-cr $EXPECTED $ACTUAL |
diff -u -r --strip-trailing-cr $EXPECTED $ACTUAL |
33 |
done |
done |
34 |
|
|