-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement some sort of testing #4
Comments
Here's what I do for
e.g: # pseudo-code for run-test.sh
TESTNAME=$1
BASENAME=$( echo $1 | sed -e 's/\.md//g' -e 's/\.native//g' -e 's/\.html//g') # strip suffix
FLAGS=""
if [[ -f "$BASENAME.flags" ]] ; then
FLAGS=$(cat $BASENAME.flags)
fi
pandoc -t optex-writer-script.lua "$FLAGS" "$TESTNAME" -o "$BASENAME.tmp"
if [[ diff -u "$BASENAME.tex" "$BASENAME.tmp" > "$BASNAME-diff.tmp" ]] ; then
echo PASS: $TESTNAME
else
echo FAIL: $TESTNAME
cat $BASNAME-diff.tmp
fi |
Big picture concept:
Technical notes:
P.S: I put some general notes (not related to testing) here olsak/OpTeX#85 (comment) |
Thanks for your input, I am definitely going to implement something along the lines of what you described. I am currently thinking of giving the bats project a try, as to not reinvent the wheel when it comes to unit testing in bash. Concerning CI, it seems that it should be possible to get a full texlive distribution using GitHub actions, which would eliminate the need to install and setup texlive on every pipeline run. I have 0 experience with GitHub CI/CD (I've only ever used GitLab CI/CD), so there might be some surprises waiting for me, but as it looks now, it should be possible to run all tests via CI/CD. I've also read through your general notes and will implement some of those ideas in the future, but for now I will focus on testing and unsupported elements (such as span) 🙏 . |
I am unsure as to how to do this yet, maybe different input files in different formats
The text was updated successfully, but these errors were encountered: