#!/bin/bash
# SPDX-License-Identifier: GPL-3.0+
# Copyright (C) 2024 Western Digital Corporation or its affiliates.
#
# Test repeated test() run with set_conditions()

. tests/meta/rc

DESCRIPTION="repeat test()"

declare cond_set_index

set_conditions() {
	local index=$1

	if [[ -z $index ]]; then
		echo 2
		return
	fi

	cond_set_index=$index
	COND_DESC="condition set $index"
}

test() {
	echo "Running ${TEST_NAME}"
	echo "condition set $cond_set_index" >> "$FULL"
	echo "Test complete"
}
