aboutsummaryrefslogtreecommitdiff
path: root/boca-1.5.0/doc/problemexamples/problemtemplate/tests/c
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2012-08-08 17:52:19 +0000
committercassiopc <cassiopc@gmail.com>2012-08-08 17:52:19 +0000
commit5d4eca5257a60c5f1de043fdf3f67e0a9df011f4 (patch)
tree6d4ec6ffe1b6490be4120c0f06ae6cdabca41dd8 /boca-1.5.0/doc/problemexamples/problemtemplate/tests/c
parentf8c7c32e3ea6417ccf04309ec521b39a0c20414d (diff)
downloadboca-5d4eca5257a60c5f1de043fdf3f67e0a9df011f4.tar.gz
boca-5d4eca5257a60c5f1de043fdf3f67e0a9df011f4.zip
many small bug fixes
Diffstat (limited to 'boca-1.5.0/doc/problemexamples/problemtemplate/tests/c')
-rwxr-xr-xboca-1.5.0/doc/problemexamples/problemtemplate/tests/c17
1 files changed, 13 insertions, 4 deletions
diff --git a/boca-1.5.0/doc/problemexamples/problemtemplate/tests/c b/boca-1.5.0/doc/problemexamples/problemtemplate/tests/c
index d7d0411..de0a9c5 100755
--- a/boca-1.5.0/doc/problemexamples/problemtemplate/tests/c
+++ b/boca-1.5.0/doc/problemexamples/problemtemplate/tests/c
@@ -4,6 +4,7 @@
# and the script files that are included in the problem package
cat > test.c <<EOF
+#include<stdio.h>
int main() {
char s[100];
scanf("%s", s);
@@ -17,11 +18,19 @@ EOF
TL=2
REP=10
-../compile/c test.c test.exe TL
-../run/c test.exe test.in TL REP
-output=`cat stdout0`
-if [ "$output" != "inputdata" ]; then
+chmod 755 ../compile/c
+../compile/c test.c test.exe $TL
+chmod 755 ../run/c
+../run/c test.exe test.in $TL $REP
+if [ -r stdout0 ]; then
+ output=`cat stdout0`
+ if [ "$output" != "inputdata" ]; then
+ echo "ERROR"
+ exit 1
+ fi
+else
echo "ERROR"
exit 1
fi
+echo "TEST PASSED"
exit 0