#!/usr/bin/env bats load test_helper @test "installs python-build into PREFIX" { cd "$TMP" PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh" assert_success "" cd usr assert [ -x bin/python-build ] assert [ -x bin/pyenv-install ] assert [ -x bin/pyenv-uninstall ] assert [ -e share/python-build/2.7.2 ] assert [ -e share/python-build/pypy-2.0 ] } @test "build definitions don't have the executable bit" { cd "$TMP" PREFIX="${PWD}/usr" run "${BATS_TEST_DIRNAME}/../install.sh" assert_success "" run $BASH -c 'ls -l usr/share/python-build | tail -2 | cut -d" " -f1' assert_output <