dodona-edu / universal-judge

Universal judge for educational software testing
https://docs.dodona.be/en/tested
MIT License
9 stars 5 forks source link

Fetch stdin from file as an alternative to inlining it into test suite #479

Open pdawyndt opened 10 months ago

pdawyndt commented 10 months ago

As an alternative to inlining content linked to the stdin channel into the test suite, we could also feed that content from a file. This would have several advantages:

I would definitely also use the alternative of inlining (short) stdin content in the test suite. When it comes to the feedback table, we might even consider different ways to represent short/long content fed to the stdin channel (show entirely or link to file that can be downloaded). This could follow the way it is specified in the test suite (inline/file) by default, and might even be overruled using a parameter (auto/inline/file).

Example use case: exercise "Wandelende vingers" (reeks 07) of the "Computergebruik" repository.

$ wandelingen "qwertyuytresdftyuiokn" < woordenboek.txt
queen
question
pdawyndt commented 9 months ago

Now that we use HERE-docs for inlining stdin, this is just an alternative with files redirected to stdin. In case of file-based stdin, we could always use the command line description, even if there are no arguments.