diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8fb6a0c..a2514d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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