diff options
Diffstat (limited to 'paper/lua-filters/track-changes/test-track-changes.sh')
-rw-r--r-- | paper/lua-filters/track-changes/test-track-changes.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/paper/lua-filters/track-changes/test-track-changes.sh b/paper/lua-filters/track-changes/test-track-changes.sh new file mode 100644 index 0000000..b7074ef --- /dev/null +++ b/paper/lua-filters/track-changes/test-track-changes.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +latex_result="$(cat -)" + +assert_contains () +{ + printf '%s' "$latex_result" | grep -qF "$1" - + if [ $? -ne 0 ]; then + printf 'Output does not contain `%s`.\n' "$1" >&2 + exit 1 + fi +} + +# whether we are using the change package +assert_contains <<EOF +\usepackage{changes} +EOF + +# Author colors +assert_contains '\definechangesauthor[name={JFK}, color=auth2]{JFK}' + +# Additions, notes, and deletions +assert_contains <<EOF +Here is a \note[id=JFK]{Why?}\hlnote{com\added[id=SWS]{m}ent with nest\deleted[id=FKA]{t}ed changes}. +EOF |