From 60ce14fb7abdd0b3c0d1b4d18036434747c9098f Mon Sep 17 00:00:00 2001 From: wildone Date: Wed, 16 Oct 2019 15:40:03 +1100 Subject: [PATCH] update to use isStringMatchesRegex helper fix grep output as static string --- aemdesign-testing/test-spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aemdesign-testing/test-spec b/aemdesign-testing/test-spec index 795701ae1..07ab361c2 100755 --- a/aemdesign-testing/test-spec +++ b/aemdesign-testing/test-spec @@ -37,7 +37,7 @@ runTest() { if [[ -z "$TEST_WORKSPACE" ]]; then COMMAND="cd $(ls | grep "-testing") && ${COMMAND}" else - COMMAND="cd ${TEST_WORKSPACE}/$(ls | grep "-testing") && ${COMMAND}" + COMMAND="cd ${TEST_WORKSPACE}/$(ls | grep '-testing') && ${COMMAND}" fi echo "" @@ -238,7 +238,7 @@ main() { IFS=',' read -ra specs <<< "$TEST_SPECS" for i in "${specs[@]}"; do - if [[ ! ${i} =~ Spec\*?$ ]]; then + if [[ $(isStringMatchesRegex "${i}" ".*(Spec|\*)") == "false" ]]; then echo "'$i' does not conform to the spec naming convention, i.e. NewsListScreenshotSpec." exit 1 fi