diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-07-06 17:13:14 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-07-06 17:13:14 +0000 |
commit | 0945359fcc47f2f95880ea4fa659d103dc4818f4 (patch) | |
tree | 3b09de468b82593a87c09c73f2c1d9d37e4cd8b0 /eclass | |
parent | Update patch for FreeMiNT by Alan Hourihane, bug #498412, drop darwin keyword... (diff) | |
download | gentoo-2-0945359fcc47f2f95880ea4fa659d103dc4818f4.tar.gz gentoo-2-0945359fcc47f2f95880ea4fa659d103dc4818f4.tar.bz2 gentoo-2-0945359fcc47f2f95880ea4fa659d103dc4818f4.zip |
Add tests for _python_impl_supported.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rwxr-xr-x | eclass/tests/python-utils-r1.sh | 28 |
2 files changed, 25 insertions, 8 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index be44c1ee54f0..d39b6c4fef1c 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1312 2014/07/06 14:41:17 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1313 2014/07/06 17:13:13 mgorny Exp $ + + 06 Jul 2014; Michał Górny <mgorny@gentoo.org> tests/python-utils-r1.sh: + Add tests for _python_impl_supported. 06 Jul 2014; Michał Górny <mgorny@gentoo.org> python-r1.eclass: python_gen_cond_dep: delay PYTHON_USEDEP substitution until one of the diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh index 29a6e1f94911..258da789bef6 100755 --- a/eclass/tests/python-utils-r1.sh +++ b/eclass/tests/python-utils-r1.sh @@ -19,10 +19,9 @@ test_var() { test_is() { local func=${1} - local EPYTHON=${2} - local expect=${3} + local expect=${2} - tbegin "${func} for ${EPYTHON} (expecting: ${3})" + tbegin "${func} (expecting: ${expect})" ${func} [[ ${?} == ${expect} ]] @@ -88,10 +87,10 @@ test_var PYTHON_INCLUDEDIR pypy /usr/lib/pypy/include test_var PYTHON_PKG_DEP pypy '*virtual/pypy*:0=' test_var PYTHON_SCRIPTDIR pypy /usr/lib/python-exec/pypy -test_is python_is_python3 python2.7 1 -test_is python_is_python3 python3.2 0 -test_is python_is_python3 jython2.7 1 -test_is python_is_python3 pypy 1 +test_is "EPYTHON=python2.7 python_is_python3" 1 +test_is "EPYTHON=python3.2 python_is_python3" 0 +test_is "EPYTHON=jython2.7 python_is_python3" 1 +test_is "EPYTHON=pypy python_is_python3" 1 # generic shebangs test_fix_shebang '#!/usr/bin/python' python2.7 '#!/usr/bin/python2.7' @@ -135,6 +134,21 @@ test_fix_shebang '#!/mnt/python2/usr/bin/python3 python2' python2.7 \ '#!/mnt/python2/usr/bin/python2.7 python2' --force test_fix_shebang '#!/usr/bin/foo' python2.7 FAIL +# make sure we don't break pattern matching +test_is "_python_impl_supported python2_5" 1 +test_is "_python_impl_supported python2_6" 1 +test_is "_python_impl_supported python2_7" 0 +test_is "_python_impl_supported python3_1" 1 +test_is "_python_impl_supported python3_2" 0 +test_is "_python_impl_supported python3_3" 0 +test_is "_python_impl_supported python3_4" 0 +test_is "_python_impl_supported pypy1_8" 1 +test_is "_python_impl_supported pypy1_9" 1 +test_is "_python_impl_supported pypy2_0" 1 +test_is "_python_impl_supported pypy" 0 +test_is "_python_impl_supported jython2_5" 0 +test_is "_python_impl_supported jython2_7" 0 + rm "${tmpfile}" texit |