#!/bin/sh

echo "${TEST_NAME} -- test whether all implementations are tested before following symlink"

set -- ${PYTHON_IMPLS}

if [ ${#} -lt 2 ]; then
	echo 'This test requires at least two Python implementations supported.' >&2
	do_exit 77
fi

FIRST=${1}
export EPYTHON=${2}

echo "first: ${FIRST}" >&2
echo "EPYTHON: ${EPYTHON}" >&2

write_impl "${FIRST}" "#!/usr/bin/env true" "-sym"
write_impl "${EPYTHON}" "#!/usr/bin/env false"
do_sym "${TEST_TMP}" "${TEST_TMP}-sym"

do_test "${TEST_TMP}-sym"
