#!/bin/sh

. ./common

Expect_num_variations () {
	Mount ${1}

	N="$(for X in $(seq 500); do Get_entries; echo; done | sort -u | wc -l)"

	if test ${N} ${2}
	then
		Fail "${1} ${3} (saw ${N} variations)"
	fi
	Unmount
}

Expect_num_variations --shuffle-dirents=yes "= 1" \
	"should always return the same result"

Expect_num_variations --shuffle-dirents=no "!= 1" \
	"should not always return the same result"
