entry-point-scripts 998 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #! /bin/bash
  2. #
  3. # debian/tests/entry-point-scripts
  4. # Part of Debian ‘python-coverage’ package.
  5. #
  6. # Copyright © 2016 Ben Finney <bignose@debian.org>
  7. # This is free software; you may copy, modify, and/or distribute this work
  8. # under the terms of the Expat license as published by James Clark.
  9. # No warranty expressed or implied.
  10. #
  11. # Simple test for entry-point scripts.
  12. set -o errexit
  13. set -o errtrace
  14. set -o nounset
  15. COMMAND_TEMPLATE='python%s-coverage'
  16. versions=(
  17. ''
  18. '3' '2'
  19. $(py3versions --version --supported)
  20. $(pyversions --version --supported)
  21. )
  22. test_input_path="$(mktemp -t --suffix=".py")"
  23. cat > "$test_input_path" <<_EOF_
  24. print("Hello, world!")
  25. _EOF_
  26. for ver in "${versions[@]}" ; do
  27. command="$(printf "$COMMAND_TEMPLATE" "$ver")"
  28. printf "Module script: ‘%s’\n" "$command"
  29. echo $command run "$test_input_path"
  30. printf "\n"
  31. done
  32. # Local variables:
  33. # coding: utf-8
  34. # mode: shell-script
  35. # End:
  36. # vim: fileencoding=utf-8 filetype=sh :