#!/bin/sh
#
# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
# SPDX-License-Identifier: BSD-2-Clause


if [ -z "$FCHECK_TEST_OPT" ] || [ -z "$FCHECK_TEST_PREFIX" ]; then
	echo 'Missing FCHECK_TEST_OPT or FCHECK_TEST_PREFIX' 1>&2
	exit 7
fi
if [ "$FCHECK_TEST_PREFIX" = 'EmptyPrefix' ]; then
	FCHECK_TEST_PREFIX=
fi
if [ "$1" = "$FCHECK_TEST_OPT" ]; then
	echo "${FCHECK_TEST_PREFIX}{{#each simple.features}}{{@key}}={{this}} {{/each}}another"
elif [ "${1#-}" != "$1" ]; then
	echo 'Usage: feature --features or feature non-opt-args' 1>&2
	exit 1
elif [ "$FCHECK_TEST_PREFIX" != 'something' ]; then
	echo 'something'
else
	echo 'nothing'
fi
