aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2007-04-28 12:04:25 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2007-04-28 12:04:25 +0000
commit87c9eb30b5bedb7fec2b8a3c5eb0ebed4468e888 (patch)
tree0f6394d2810be90d73102a991ea9b85687c8e671
parentbce08b0dbf948fbed214df14e66cb0d664d7fba8 (diff)
downloadpaludis-87c9eb30b5bedb7fec2b8a3c5eb0ebed4468e888.tar.gz
paludis-87c9eb30b5bedb7fec2b8a3c5eb0ebed4468e888.tar.xz
Fix environment test
-rw-r--r--ruby/environment_TEST.rb6
-rwxr-xr-xruby/environment_TEST_setup.sh15
2 files changed, 18 insertions, 3 deletions
diff --git a/ruby/environment_TEST.rb b/ruby/environment_TEST.rb
index cc809ce..e7626aa 100644
--- a/ruby/environment_TEST.rb
+++ b/ruby/environment_TEST.rb
@@ -113,9 +113,13 @@ module Paludis
def test_accept_license
assert env.accept_license('GPL-2', pde)
assert !env.accept_license('Failure', pde)
+
+ pde2 = PackageDatabaseEntry.new("foo/baz", "1.0", "testrepo")
+ assert env.accept_license('GPL-2', pde2)
+ assert env.accept_license('Failure', pde2)
end
- def test_accept_license
+ def test_accept_license_bad
assert_raise TypeError do
env.accept_keywords('license','a string')
end
diff --git a/ruby/environment_TEST_setup.sh b/ruby/environment_TEST_setup.sh
index 1e3dc12..1ee52e1 100755
--- a/ruby/environment_TEST_setup.sh
+++ b/ruby/environment_TEST_setup.sh
@@ -33,10 +33,11 @@ cat <<END > home/.paludis/package_unmask.conf
END
cat <<END > home/.paludis/licenses.conf
-*/* *
+foo/bar GPL-2
+foo/baz *
END
-mkdir -p testrepo/{eclass,distfiles,profiles/testprofile,foo/bar/files} || exit 1
+mkdir -p testrepo/{eclass,distfiles,profiles/testprofile,foo/bar/files,foo/baz/files} || exit 1
cd testrepo || exit 1
echo "testrepo" > profiles/repo_name || exit 1
cat <<END > profiles/categories || exit 1
@@ -70,6 +71,16 @@ IUSE=""
LICENSE="GPL-2"
KEYWORDS="~test"
END
+
+cat <<"END" > foo/baz/baz-1.0.ebuild || exit 1
+DESCRIPTION="Test package"
+HOMEPAGE="http://paludis.pioto.org/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test testtest testtesttest"
+END
cd ..
mkdir -p slaverepo/{eclass,distfiles,profiles/testprofile,foo/bar/files} || exit 1