examples: test-todos-alone.sh finds its dir from BASH_SOURCE too.
commit 394e07b878e9d0acae7ebd512ca44678c0fa0227 · parent 55a0a7dedb
· browse this tree
Ximianth, 2026-10-24 15:05:40 UTC
diff --git a/examples/test-todos-alone.sh b/examples/test-todos-alone.sh index e7903c5..d544787 100755 --- a/examples/test-todos-alone.sh +++ b/examples/test-todos-alone.sh @@ -2,7 +2,7 @@ ## Checks todos.sh against every case in todos.md, as test-todos.sh does, but with the primitives instead of the runner. ## Run with TESTMARK_REGEN=1 to update todos.md to match what todos.sh does now; then review the change with `git diff`. set -euo pipefail -cd "$(dirname "$0")" +cd "$(dirname "${BASH_SOURCE[0]}")" source ../lib/testmark.bash testmark_parse doc todos.md