pashage

Yet Another Opinionated Re-engineering of the Unix Password Store
git clone https://git.instinctive.eu/pashage.git
Log | Files | Refs | README | LICENSE

spec_helper.sh (959B)


      1 # shellcheck shell=sh
      2 
      3 # Defining variables and functions here will affect all specfiles.
      4 # Change shell options inside a function may cause different behavior,
      5 # so it is better to set them here.
      6 # set -eu
      7 
      8 mocklog() {
      9   if [ $# -eq 1 ]; then
     10     printf '$ %s\n' "$1" >&2
     11   else
     12     printf '$ %s' "$1" >&2
     13     shift
     14     printf ' %s' "$@" >&2
     15     printf '\n' >&2
     16   fi
     17 }
     18 
     19 # This callback function will be invoked only once before loading specfiles.
     20 spec_helper_precheck() {
     21   # Available functions: info, warn, error, abort, setenv, unsetenv
     22   # Available variables: VERSION, SHELL_TYPE, SHELL_VERSION
     23   : minimum_version "0.28.1"
     24 }
     25 
     26 # This callback function will be invoked after a specfile has been loaded.
     27 spec_helper_loaded() {
     28   :
     29 }
     30 
     31 # This callback function will be invoked after core modules has been loaded.
     32 spec_helper_configure() {
     33   # Available functions: import, before_each, after_each, before_all, after_all
     34   : import 'support/custom_matcher'
     35 }