From 7478310c1baa73dadc4e87be004d226ac0501ab9 Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Mon, 11 Sep 2017 02:02:15 +0000 Subject: [PATCH] Fix tests regard to `--enable-unicode` --- plugins/python-build/test/build.bats | 96 +++++++++---------- .../test/fixtures/definitions/needs-yaml | 2 +- .../test/fixtures/definitions/vanilla-python | 2 +- plugins/python-build/test/hooks.bats | 14 +-- plugins/python-build/test/pyenv_ext.bats | 32 +++---- 5 files changed, 73 insertions(+), 73 deletions(-) diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index 42ca4b08..b86168ee 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -61,7 +61,7 @@ assert_build_log() { @test "yaml is installed for python" { cached_tarball "yaml-0.1.6" - cached_tarball "Python-3.2.1" + cached_tarball "Python-3.6.2" stub brew false stub_make_install @@ -81,8 +81,8 @@ yaml-0.1.6: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " yaml-0.1.6: --prefix=$INSTALL_ROOT make -j 2 make install -Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " -Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4 +Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " +Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib make -j 2 make install OUT @@ -90,7 +90,7 @@ OUT @test "apply python patch before building" { cached_tarball "yaml-0.1.6" - cached_tarball "Python-3.2.1" + cached_tarball "Python-3.6.2" stub brew false stub_make_install @@ -113,8 +113,8 @@ yaml-0.1.6: --prefix=$INSTALL_ROOT make -j 2 make install patch -p0 --force -i $TMP/python-patch.XXX -Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " -Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4 +Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " +Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib make -j 2 make install OUT @@ -122,7 +122,7 @@ OUT @test "apply python patch from git diff before building" { cached_tarball "yaml-0.1.6" - cached_tarball "Python-3.2.1" + cached_tarball "Python-3.6.2" stub brew false stub_make_install @@ -145,15 +145,15 @@ yaml-0.1.6: --prefix=$INSTALL_ROOT make -j 2 make install patch -p1 --force -i $TMP/python-patch.XXX -Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " -Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4 +Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " +Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib make -j 2 make install OUT } @test "yaml is linked from Homebrew" { - cached_tarball "Python-3.2.1" + cached_tarball "Python-3.6.2" brew_libdir="$TMP/homebrew-yaml" mkdir -p "$brew_libdir" @@ -172,15 +172,15 @@ OUT unstub make assert_build_log < "$definition" <<<"echo python-build" run pyenv-install "$definition" assert_success assert_output <<-OUT -before: ${PYENV_ROOT}/versions/3.2.1 +before: ${PYENV_ROOT}/versions/3.6.2 python-build after: 0 rehashed @@ -41,16 +41,16 @@ OUT stub pyenv-hooks "uninstall : echo '$HOOK_PATH'/uninstall.bash" stub pyenv-rehash "echo rehashed" - mkdir -p "${PYENV_ROOT}/versions/3.2.1" - run pyenv-uninstall -f 3.2.1 + mkdir -p "${PYENV_ROOT}/versions/3.6.2" + run pyenv-uninstall -f 3.6.2 assert_success assert_output <<-OUT -before: ${PYENV_ROOT}/versions/3.2.1 -rm -rf ${PYENV_ROOT}/versions/3.2.1 +before: ${PYENV_ROOT}/versions/3.6.2 +rm -rf ${PYENV_ROOT}/versions/3.6.2 rehashed after. OUT - refute [ -d "${PYENV_ROOT}/versions/3.2.1" ] + refute [ -d "${PYENV_ROOT}/versions/3.6.2" ] } diff --git a/plugins/python-build/test/pyenv_ext.bats b/plugins/python-build/test/pyenv_ext.bats index 823662c0..b79ac37a 100644 --- a/plugins/python-build/test/pyenv_ext.bats +++ b/plugins/python-build/test/pyenv_ext.bats @@ -93,13 +93,13 @@ resolve_link() { } @test "apply built-in python patch before building" { - cached_tarball "Python-3.2.1" + cached_tarball "Python-3.6.2" stub brew false stub_make_install stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log' - echo | install_patch definitions/vanilla-python "Python-3.2.1/empty.patch" + echo | install_patch definitions/vanilla-python "Python-3.6.2/empty.patch" # yyuu/pyenv#257 stub uname '-s : echo Linux' @@ -110,8 +110,8 @@ resolve_link() { assert_build_log <> build.log' - echo "foo" | install_patch definitions/vanilla-python "Python-3.2.1/foo.patch" - echo "bar" | install_patch definitions/vanilla-python "Python-3.2.1/bar.patch" - echo "baz" | install_patch definitions/vanilla-python "Python-3.2.1/baz.patch" + echo "foo" | install_patch definitions/vanilla-python "Python-3.6.2/foo.patch" + echo "bar" | install_patch definitions/vanilla-python "Python-3.6.2/bar.patch" + echo "baz" | install_patch definitions/vanilla-python "Python-3.6.2/baz.patch" # yyuu/pyenv#257 stub uname '-s : echo Linux' @@ -142,8 +142,8 @@ OUT patch: bar patch: baz patch: foo -Python-3.2.1: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " -Python-3.2.1: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib --enable-unicode=ucs4 +Python-3.6.2: CPPFLAGS="-I${TMP}/install/include " LDFLAGS="-L${TMP}/install/lib " +Python-3.6.2: --prefix=$INSTALL_ROOT --libdir=$INSTALL_ROOT/lib make -j 2 make install OUT @@ -153,7 +153,7 @@ OUT } @test "allow custom make install target" { - cached_tarball "Python-3.2.1" + cached_tarball "Python-3.6.2" stub brew false stub "$MAKE" \ @@ -168,8 +168,8 @@ OUT assert_success assert_build_log <