From 1f3b86f0f44d2400a4950d57034ae491ee34b128 Mon Sep 17 00:00:00 2001 From: hugogogo Date: Tue, 14 Dec 2021 23:03:59 +0100 Subject: [PATCH] correction unitest chemin acces --- unitests.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/unitests.sh b/unitests.sh index 9fcf090..dd10d79 100644 --- a/unitests.sh +++ b/unitests.sh @@ -84,10 +84,15 @@ DEFAULT_DIR="./tests/defaults/" # the ! is for indirect parameter expansion # $i expand in integers 1,2,3... # $1,$2,$3... expand in arguments of process call - FILE="${!i/#/$TEST_DIR}" - FILE="${FILE%.sh}" + FILE="${!i%.sh}" FILE="${FILE/%/.sh}" if ! [ -e "$FILE" ] + then + FILE="${!i/#/$TEST_DIR}" + FILE="${FILE%.sh}" + FILE="${FILE/%/.sh}" + fi + if ! [ -e "$FILE" ] then FILE="${!i/#/$DEFAULT_DIR}" FILE="${FILE%.sh}"