#!/bin/sh
#
# Simple smoketest of unrar extraction

setUp() {
	dd if=/dev/urandom of=clam.exe bs=1 count=544
	./misc/tarar.pike archive.rar clam.exe
	rm -f clam.exe
}

tearDown() {
	rm -f archive.tar clam.exe
}

testList() {
	unrar-free --list archive.rar
	assertEquals "Status code" $? 0
}

testExtract() {
	unrar-free --extract archive.rar
	assertEquals "Status code" $? 0
	assertTrue "File exists" "[ -e clam.exe ]"
}

. /usr/bin/shunit2
