From b36e603997e5534b9173d4e0de856309d7d56b3d Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 3 Apr 2021 17:29:40 -0400 Subject: Do not use readlink(1) in tests Avoid using readlink(1) which is not POSIX-compatible; moreover, `readlink -f` is not available on Mac OS by default. Instead, always convert $CALCURSE to an absolute path (that may or may not be canonical, i.e., be a symlink or contain ../ as component) in test-init.sh by prepending the current working directory if the original path is relative. While not fully equivalent to `readlink -f`, this should be good enough for use in our tests. Signed-off-by: Lukas Fleischer --- test/test-init.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/test-init.sh') diff --git a/test/test-init.sh b/test/test-init.sh index c95c884..92ad779 100644 --- a/test/test-init.sh +++ b/test/test-init.sh @@ -2,3 +2,8 @@ CALCURSE=${CALCURSE:-../src/calcurse} DATA_DIR=${DATA_DIR:-data/} + +case "$CALCURSE" in + /*) ;; + *) CALCURSE="${PWD}/${CALCURSE}" ;; +esac -- cgit v1.2.3-54-g00ecf