uchicago-library / attachment-converter

Attachment Converter: tool for batch converting attachments in an email mailbox
GNU General Public License v2.0
8 stars 3 forks source link

Cram test the conversion shell scripts #79

Open bufordrat opened 1 year ago

bufordrat commented 1 year ago

Now that we have determined how run basic cram tests, the next step is to write some. For this issue, we'll focus on creating cram tests for our conversion shell scripts.

For each of the shell scripts in conversion-scripts, write a test which:

Adding conversion-scripts as a cram dependency

Since dune creates a .sandbox directory to run cram tests in whenever they are run, we will need to figure out how to get dune to copy conversion-scripts into the .sandbox directory as well. Configuring dune is always a funky adventure, but it seems likely that this will involve using the deps option in the stanza that defines the cram tests in cram-tests/dune.

For more information: https://dune.readthedocs.io/en/stable/tests.html#test-options

Once dune adds the conversion-scripts as a dependency within dune, it may also be necessary to add that directory to the path within the sandboxed environment? One simple thing we could try is to just add that directory inside the cram test, etc.

$ PATH=../conversion-scripts/:$PATH