1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #! /bin/bash
- #
- # debian/tests/entry-point-scripts
- # Part of Debian ‘python-coverage’ package.
- #
- # Copyright © 2016 Ben Finney <bignose@debian.org>
- # This is free software; you may copy, modify, and/or distribute this work
- # under the terms of the Expat license as published by James Clark.
- # No warranty expressed or implied.
- #
- # Simple test for entry-point scripts.
- set -o errexit
- set -o errtrace
- set -o nounset
- COMMAND_TEMPLATE='python%s-coverage'
- versions=(
- ''
- '3' '2'
- $(py3versions --version --supported)
- $(pyversions --version --supported)
- )
- test_input_path="$(mktemp -t --suffix=".py")"
- cat > "$test_input_path" <<_EOF_
- print("Hello, world!")
- _EOF_
- for ver in "${versions[@]}" ; do
- command="$(printf "$COMMAND_TEMPLATE" "$ver")"
- printf "Module script: ‘%s’\n" "$command"
- echo $command run "$test_input_path"
- printf "\n"
- done
- # Local variables:
- # coding: utf-8
- # mode: shell-script
- # End:
- # vim: fileencoding=utf-8 filetype=sh :
|