#!/bin/sh export XDG_DATA_HOME="$PWD/tests/test-profiles" OUT= ERR= STATUS= assert_status() { if [ "$STATUS" != "$1" ]; then printf 'Bad status.\n\nexpected: %s\ngot: %s\n' "$1" "$STATUS" >&2 exit 1 fi } assert_empty_stderr() { if [ "$(cat "$ERR")" != '' ]; then echo "Expected STDERR ($ERR) to be empty, but has content:" >&2 cat "$ERR" >&2 exit 1 fi } assert_stdout() { if [ "$(cat "$OUT")" != "$1" ]; then echo "Bad STDOUT ($OUT), expected '$1', got:" >&2 cat "$OUT" >&2 exit 1 fi }