diff options
Diffstat (limited to 'doc/problemexamples')
| -rwxr-xr-x | doc/problemexamples/problemtemplate/tests/c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/problemexamples/problemtemplate/tests/c b/doc/problemexamples/problemtemplate/tests/c index de0a9c5..1988cbd 100755 --- a/doc/problemexamples/problemtemplate/tests/c +++ b/doc/problemexamples/problemtemplate/tests/c @@ -3,6 +3,9 @@ # This file performs a test of the autojudge system. It can run whatever you feel important to test the autojudge # and the script files that are included in the problem package +mkdir -p testdir +cd testdir + cat > test.c <<EOF #include<stdio.h> int main() { @@ -18,10 +21,10 @@ EOF TL=2 REP=10 -chmod 755 ../compile/c -../compile/c test.c test.exe $TL -chmod 755 ../run/c -../run/c test.exe test.in $TL $REP +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 @@ -33,4 +36,5 @@ else exit 1 fi echo "TEST PASSED" +cd .. exit 0 |