File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
example_problems/hello/submissions/compiler_error Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ # This should give COMPILER-ERROR on the default problem 'hello'.
2
+ #
3
+ # @EXPECTED_RESULTS@: COMPILER-ERROR
4
+
5
+ cat(" Missing closing bracket!\n "
Original file line number Diff line number Diff line change @@ -20,14 +20,16 @@ if [ -z "$ENTRY_POINT" ]; then
20
20
echo " Info: detected entry_point: $MAINSOURCE "
21
21
fi
22
22
23
- # No easy way to test R scripts for syntax
24
-
25
23
# Check if entry point is valid
26
24
if [ ! -r " $MAINSOURCE " ]; then
27
25
echo " Error: main source file '$MAINSOURCE ' is not readable" >&2
28
26
exit 1
29
27
fi
30
28
29
+ # Check syntax
30
+ Rscript -e " parse('" $@ " ')"
31
+ EXITCODE=$?
32
+ [ " $EXITCODE " -ne 0 ] && exit $EXITCODE
31
33
32
34
# Write executing script:
33
35
cat > " $DEST " << EOF
You can’t perform that action at this time.
0 commit comments