shellspec/shellspec

View on GitHub
helper/fixture/bin/script.sh

Summary

Maintainability
Test Coverage
#!/bin/sh

set -eu

test "" && exit # should not exit

test || __() { :; }

__ intercept __

case ${1:-} in
  --dump-params) echo "$@" ;;
  --exit-with) exit "$2" ;;
  --command) shift; "$@" ;;
esac