#!/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 <