diff options
author | Christoph Helma <helma@in-silico.ch> | 2019-06-05 17:28:10 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2019-06-05 17:28:10 +0200 |
commit | 9a217185e791d6abbe46549cd4e87c1d1a643c05 (patch) | |
tree | 1968aebd8a38acd7784e58d478e0f6c3fb08ab76 /paper/lua-filters/track-changes/test-track-changes.sh | |
parent | feb1f82356da50a1ebf63b1eda434c388ab009e1 (diff) |
first manuscript version
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 |