#!/bin/bash
set -eu

TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework-without-repo

setupenvironment

buildpackage 'simple-package'
buildpackage 'conflicting-package-one'

testpkgnotinstalled 'simple-package' 'conflicting-package-one'
aptgetinstallpackage 'simple-package'
msgmsg 'Installed package "simple-package"'
aptgetinstallpackage 'conflicting-package-one'
msgmsg 'Installed package "conflicting-package-one"'
testpkginstalled 'simple-package' 'conflicting-package-one'
testsuccess aptget -y remove 'simple-package'
testpkgnotinstalled 'simple-package'
testpkginstalled 'conflicting-package-one'
testsuccess aptget -y remove 'conflicting-package-one'
testpkgnotinstalled 'simple-package' 'conflicting-package-one'
