Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pdawyndt opened this issue Dec 2, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@pdawyndt
Copy link
Contributor

pdawyndt commented Dec 2, 2023

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:

  • content does not clutter test suite (especially problematic with large files)
  • input redirection becomes part of the description of the test instead of displaying stdin as a separate channel next to stdout or return
  • content does not clutter feedback table as we could also add file link there (especially beneficial for large files; also bypasses HTML-checking on this content)
  • may even allow to work with non-textual content linked to stdin

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 pdawyndt added the enhancement New feature or request label Dec 2, 2023
@pdawyndt
Copy link
Contributor Author

pdawyndt commented Dec 23, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant