Toolbox fails to set the module search paths correctly when running
in shellspec, rendering test cases unable to include modules from
test/include.
This commit modifies toolbox to prepend test/include to the module
search path array when executed in shellspec.
#!/bin/bash
# toolbox.sh - Framework for modular bash scripts
-# Copyright (C) 2021-2022 Matthias Kruk
+# Copyright (C) 2021-2023 Matthias Kruk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
declare -gxr TOOLBOX_PATH="$toolboxroot"
declare -gxr TOOLBOX_HOME="$HOME/.toolbox"
declare -axgr __TOOLBOX_MODULEPATH=(
+ ${SHELLSPEC_PROJECT_ROOT:+"$SHELLSPEC_PROJECT_ROOT/test/include"}
"$scriptroot/include"
"$TOOLBOX_HOME/include"
"$toolboxroot/include"