-for TEST in $SAMPLE_TESTS ; do
- pstart "Checking on sample input $TEST: "
- if test-run && syntax-check ; then
- pend "OK"
- else
- FAILED=$(($FAILED+1))
- fi
-done
-pstart "Submiting... "
+if [ $TASK_TYPE == open-data ] ; then
+ [ -n "$2" ] || die "You need to specify test number for open data problems."
+ TEST=$2
+ pstart "Test case $TEST: "
+ open-locate
+ (
+ ln $SRCN $TDIR/$TEST.out
+ syntax-check
+ test-result 1 OK
+ ) || FAILED=1
+else
+ [ -z "$2" ] || die "Test number should be given only for open data problems."
+ locate-source
+ compile
+ for TEST in $SAMPLE_TESTS ; do
+ (
+ pstart "Checking on sample input $TEST: "
+ test-run
+ syntax-check
+ output-check
+ die "How could I get there? It's a buuuuug!"
+ ) || FAILED=$(($FAILED+1))
+ done
+fi
+