Skip to content

Commit

Permalink
update to use isStringMatchesRegex helper
Browse files Browse the repository at this point in the history
fix grep output as static string
  • Loading branch information
wildone committed Oct 16, 2019
1 parent 5a5202d commit 60ce14f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aemdesign-testing/test-spec
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 60ce14f

Please sign in to comment.