jcrodriguez-dis / vpl-jail-system

Execution/jail server for VPL
GNU General Public License v3.0
21 stars 21 forks source link

Please add source code pattern match facility. #43

Open sparry0407 opened 3 years ago

sparry0407 commented 3 years ago

The idea here is to allow simple wildcard matching against source code to see if a student has (probably) used the construct they are being tested on.

all_source=/^\s*for\([^;]*;[^;]*;[^;]*\)/
any_source=/^\s*for\([^;]*;[^;]*;[^;]*\)/

The first example test would succeed only if all student source files matched The first example test would succeed if any student source files matched Possible additional aspects:

jcrodriguez-dis commented 3 years ago

Dear @sparry0407, thanks for your suggestion. We are working on new features for the I/O tests system that will include solutions for your need. While these new features arrive, you can use an easy workaround: write a shell script (e.g. testFeatuer.sh) that checks what do you want and output a text if the check pass (e.g. OK). Note this file must be included in "files to keep when running".

Case = Test if using "some" feature
Fail message = You don't use "some" feature
Program to run = testFeatuer.sh
Input =
Output = "OK"

Best regards, Juan Carlos Rodríguez

sparry0407 commented 3 years ago

This was obviously raised in the wrong project (vpl-xmlrpc-jail instead of moodle-mod_vpl; should I close this and #44 and re-open them on the main project?