1 |
#!/bin/sh |
#!/bin/sh |
2 |
# fatal.sh - test various fatal errors |
# fatal.sh - test various fatal errors |
3 |
# Copyright (C) 2007, 2008 siliconforks.com |
# Copyright (C) 2007, 2008, 2009, 2010 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 |
18 |
|
|
19 |
set -e |
set -e |
20 |
|
|
21 |
trap 'rm -fr DIR OUT ERR' 1 2 3 15 |
trap 'rm -fr DIR DIR2 OUT ERR' 1 2 3 15 |
22 |
|
|
23 |
export PATH=.:..:$PATH |
export PATH=.:..:$PATH |
24 |
|
|
25 |
rm -fr DIR |
rm -fr DIR DIR2 |
26 |
|
|
27 |
$VALGRIND jscoverage javascript-xml DIR > OUT 2> ERR && exit 1 |
$VALGRIND jscoverage javascript-xml DIR > OUT 2> ERR && exit 1 |
28 |
test ! -s OUT |
test ! -s OUT |
38 |
|
|
39 |
rm -fr DIR |
rm -fr DIR |
40 |
|
|
41 |
|
$VALGRIND jscoverage javascript-setter DIR > OUT 2> ERR && exit 1 |
42 |
|
test ! -s OUT |
43 |
|
test -s ERR |
44 |
|
diff --strip-trailing-cr javascript-setter.expected.err ERR |
45 |
|
|
46 |
|
rm -fr DIR |
47 |
|
|
48 |
$VALGRIND jscoverage 1 2 3 > OUT 2> ERR && exit 1 |
$VALGRIND jscoverage 1 2 3 > OUT 2> ERR && exit 1 |
49 |
test ! -s OUT |
test ! -s OUT |
50 |
test -s ERR |
test -s ERR |
101 |
# diff --strip-trailing-cr destination-is-existing-directory.expected.err ERR |
# diff --strip-trailing-cr destination-is-existing-directory.expected.err ERR |
102 |
rm -fr bar |
rm -fr bar |
103 |
|
|
104 |
rm -fr DIR OUT ERR |
rm -fr DIR DIR2 OUT ERR |