Treat $x/ or $(x)/ as ./ when finding sourced files (fixes #1998)

This commit is contained in:
Vidar Holen 2020-06-28 17:24:07 -07:00
parent 1b884a17ea
commit 210cdcd01a
4 changed files with 25 additions and 1 deletions

View file

@ -229,6 +229,12 @@ prop_cantSourceDynamic =
prop_cantSourceDynamic2 =
[1090] == checkWithIncludes [("lib", "")] "source ~/foo"
prop_canStripPrefixAndSource =
null $ checkWithIncludes [("./lib", "")] "source \"$MYDIR/lib\""
prop_canStripPrefixAndSource2 =
null $ checkWithIncludes [("./utils.sh", "")] "source \"$(dirname \"${BASH_SOURCE[0]}\")/utils.sh\""
prop_canSourceDynamicWhenRedirected =
null $ checkWithIncludes [("lib", "")] "#shellcheck source=lib\n. \"$1\""