From a0aacb91a6d42a2220081cfaaab17ddaf569f354 Mon Sep 17 00:00:00 2001 From: Dallon Asnes Date: Mon, 29 Nov 2021 23:43:28 -0600 Subject: [PATCH] Fix cl test script on macOS --- test/cmdlineTests.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index 4f9d41384..87442c606 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -54,7 +54,13 @@ do shift ;; *) - matching_tests=$(find . -mindepth 1 -maxdepth 1 -type d -name "$1" | cut --characters 3- | sort) + if [[ "$OSTYPE" == "darwin"* ]] + then + matching_tests=$(find . -mindepth 1 -maxdepth 1 -type d -name "$1" | cut -c 3- | sort) + else + matching_tests=$(find . -mindepth 1 -maxdepth 1 -type d -name "$1" | cut --characters 3- | sort) + fi + if [[ $matching_tests == "" ]] then