Skip to content

Commit 99dd940

Browse files
committed
Updating a test for the metric format and adding a new test for the group format
1 parent e493767 commit 99dd940

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

tests/steps/test-report.sh

+17-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,23 @@ echo "👍🏻 Dependencies are available"
5555
echo "👍🏻 A PDF report generated correctly"
5656

5757
{
58-
while IFS= read -r t; do
59-
metric=$(echo "${t}" | cut -f1 -d' ')
60-
echo "${metric}" | grep '^\\item\\ff{[a-zA-Z0-9-]\+}:$' > /dev/null
58+
while IFS= read -r line; do
59+
if [[ "$line" =~ ^[[:space:]]*\\item\\ff\{[a-zA-Z0-9-]+\}: ]]; then
60+
printf "Valid metric: %s\n" "$line"
61+
else
62+
printf "Invalid metric format: %s\n" "$line"
63+
fi
6164
done < "${TARGET}/temp/list-of-metrics.tex"
6265
} > "${stdout}" 2>&1
6366
echo "👍🏻 A list of metrics is properly formatted"
67+
68+
{
69+
while IFS= read -r line; do
70+
if [[ "$line" =~ ^\\item[[:space:]]* ]]; then
71+
printf "Valid group: %s\n" "$line"
72+
else
73+
printf "Invalid group format: %s\n" "$line"
74+
fi
75+
done < "${TARGET}/temp/list-of-metrics.tex"
76+
} > "${stdout}" 2>&1
77+
echo "👍🏻 Groups are properly formatted"

0 commit comments

Comments
 (0)