]>
git.ipfire.org Git - thirdparty/systemd.git/blob - test/units/assert.sh
2 # SPDX-License-Identifier: LGPL-2.1-or-later
4 # utility functions for shell tests
13 if [[ $rc -ne 0 ]]; then
14 echo "FAIL: command '$*' failed with exit code $rc" >&2
23 if [[ "${1?}" != "${2?}" ]]; then
24 echo "FAIL: expected: '$2' actual: '$1'" >&2
32 if ! [[ "${2?}" =~
${1?} ]]; then
33 echo "FAIL: '$1' not found in:" >&2
42 if [[ "${2?}" =~
${1?} ]]; then
43 echo "FAIL: '$1' found in:" >&2
57 assert_eq
"$rc" "$exp"