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 | fc64f4c7c23fcb323cc0ced48c11e5613e94c175 (patch) | |
tree | b2cd944eab4d6d16fa459eaa85330ffcfc19cf51 /eclass/tests | |
parent | Update patch for FreeMiNT by Alan Hourihane, bug #498412, drop darwin keyword... (diff) | |
download | historical-fc64f4c7c23fcb323cc0ced48c11e5613e94c175.tar.gz historical-fc64f4c7c23fcb323cc0ced48c11e5613e94c175.tar.bz2 historical-fc64f4c7c23fcb323cc0ced48c11e5613e94c175.zip |
Add tests for _python_impl_supported.
Diffstat (limited to 'eclass/tests')
-rwxr-xr-x | eclass/tests/python-utils-r1.sh | 28 |
1 files changed, 21 insertions, 7 deletions
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 |