Skip to content

Commit

Permalink
assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
demarey authored Oct 11, 2024
1 parent c040887 commit 9117184
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,18 @@ jobs:
echo "$PATH"
echo "$PHARO"
echo "$PHARO_BASH"
$PHARO --headless Pharo.image eval 'SystemVersion current printString'
# Function to check if a string starts with a given prefix
assert_starts_with() {
if [[ "$1" == "$2"* ]]; then
echo "Assertion passed: '$1' starts with '$2'."
return 0 # success
else
echo "Assertion failed: '$1' does not start with '$2'."
return 1 # failure
fi
}
PHARO_VERSION=$($PHARO --headless Pharo.image eval 'SystemVersion current printString')
assert_starts_with "$PHARO_VERSION" "Pharo${{ matrix.version }}" # Should pass
shell: bash

0 comments on commit 9117184

Please sign in to comment.