#!/bin/bash

. ../init.sh

set -e

export ROOT=${as}/root
export Q_VDB=/

mktmpdir

test() {
	local num=$1; shift
	eval "$@" > list
	diff -u list ${as}/list${num}.good
	tend $? "$*"
}

# simple install check
test 01 "qlist -IC | grep -v CVS"

# simple files list
test 02 "qlist -C cpio"

# symlink verbose list
test 03 "qlist -C mtools -e -v"

# dir test
test 04 "qlist -C mtools -d"

# obj test
test 05 "qlist -C mtools -o"

# sym test
test 06 "qlist -C mtools -s"

# SLOT test
test 07 "qlist -ICSL | grep -v CVS"

cleantmpdir

end
