diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-10-10 12:12:18 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-10-10 12:12:18 -0700 |
commit | 68288994493ee3ab56d0baf24ec3d0449330ccf5 (patch) | |
tree | e9fe07e69476fbd7a4232a8e9e558a34a87aeacb /pym/portage/tests | |
parent | 960792b9fd0e11b16efdc0b538231288b8727862 (diff) | |
download | portage-68288994493ee3ab56d0baf24ec3d0449330ccf5.tar.gz portage-68288994493ee3ab56d0baf24ec3d0449330ccf5.tar.bz2 portage-68288994493ee3ab56d0baf24ec3d0449330ccf5.zip |
Atom: support *_beta* wildcard, bug #437872
Diffstat (limited to 'pym/portage/tests')
-rw-r--r-- | pym/portage/tests/dep/testAtom.py | 6 | ||||
-rw-r--r-- | pym/portage/tests/dep/test_best_match_to_list.py | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/pym/portage/tests/dep/testAtom.py b/pym/portage/tests/dep/testAtom.py index 094538dab..948166d8e 100644 --- a/pym/portage/tests/dep/testAtom.py +++ b/pym/portage/tests/dep/testAtom.py @@ -1,4 +1,4 @@ -# Copyright 2006, 2010 Gentoo Foundation +# Copyright 2006-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from portage.tests import TestCase @@ -24,6 +24,10 @@ class TestAtom(TestCase): ('=*', '*/*', '*9999*', None, None, None), True, False ), ( "=*/*-*9999*:0::repo_name", ('=*', '*/*', '*9999*', '0', None, 'repo_name'), True, True ), + ( "=*/*-*_beta*", + ('=*', '*/*', '*_beta*', None, None, None), True, False ), + ( "=*/*-*_beta*:0::repo_name", + ('=*', '*/*', '*_beta*', '0', None, 'repo_name'), True, True ), ( "sys-apps/*", (None, 'sys-apps/*', None, None, None, None), True, False ), ( "*/portage", diff --git a/pym/portage/tests/dep/test_best_match_to_list.py b/pym/portage/tests/dep/test_best_match_to_list.py index 8a1403828..0ea834238 100644 --- a/pym/portage/tests/dep/test_best_match_to_list.py +++ b/pym/portage/tests/dep/test_best_match_to_list.py @@ -1,5 +1,5 @@ # test_best_match_to_list.py -- Portage Unit Testing Functionality -# Copyright 2010-2011 Gentoo Foundation +# Copyright 2010-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from itertools import permutations @@ -40,6 +40,10 @@ class Test_best_match_to_list(TestCase): [Atom("=dev-libs/A-1:0"), Atom("dev-libs/*", allow_wildcard=True)], True), ("dev-libs/A-4.9999-r1", [Atom("dev-libs/*", allow_wildcard=True), Atom("=*/*-*9999*", allow_wildcard=True)], \ [Atom("=*/*-*9999*", allow_wildcard=True), Atom("dev-libs/*", allow_wildcard=True)], True), + ("dev-libs/A-4_beta-r1", [Atom("dev-libs/*", allow_wildcard=True), Atom("=*/*-*_beta*", allow_wildcard=True)], \ + [Atom("=*/*-*_beta*", allow_wildcard=True), Atom("dev-libs/*", allow_wildcard=True)], True), + ("dev-libs/A-4_beta1-r1", [Atom("dev-libs/*", allow_wildcard=True), Atom("=*/*-*_beta*", allow_wildcard=True)], \ + [Atom("=*/*-*_beta*", allow_wildcard=True), Atom("dev-libs/*", allow_wildcard=True)], True), ("dev-libs/A-1:0", [Atom("dev-*/*", allow_wildcard=True), Atom("dev-*/*:0", allow_wildcard=True),\ Atom("dev-libs/A"), Atom("<=dev-libs/A-2"), Atom("dev-libs/A:0"), \ Atom("=dev-libs/A-1*"), Atom("~dev-libs/A-1"), Atom("=dev-libs/A-1")], \ |