#!/bin/bash

set -e

function test_hello_world {
    local result

    if [ -z ${DOTNET_SDK_VERSION+x} ]; then
    	echo "No .NET hello world test, skipping..."; exit 0
    else
        if [ -z "$(dotnet --list-sdks)" ] ; then
             echo ".NET SDK should be installed, and isn't." ; exit 1
        fi
        dotnet new console -o testApp
        cd testApp
        result=$(dotnet run)
        cd ..
        rm -rf testApp
        [ "$result" == "Hello World!" ] || ( echo ".NET hello world test failed." ; exit 1 )
        echo ".NET hello test passed!"
    fi
}

function main {
    test_hello_world
}

main

#!/bin/bash

set -e

function test_hello_world {
    local result

    if [ -z ${DOTNET_SDK_VERSION+x} ]; then
    	echo "No .NET hello world test, skipping..."; exit 0
    else
        if [ -z "$(dotnet --list-sdks)" ] ; then
             echo ".NET SDK should be installed, and isn't." ; exit 1
        fi
        dotnet new console -o testApp
        cd testApp
        result=$(dotnet run)
        cd ..
        rm -rf testApp
        [[ "$result" == *"Hello"* ]] || ( echo ".NET hello world test failed." ; exit 1 )
        echo ".NET hello test passed!"
    fi
}

function main {
    test_hello_world
}

main

Update dotnet hello world test
Update dotnet hello world test

The hello world message is different among versions (`Hello World!` or `Hello, World!`) so the test should be updated to match them all

Change-type: patch
Signed-off-by: Trong Nghia Nguyen <8e1f45cdcce8e4aef30b6ef5f5ba85d3ec052bb0@gmail.com>
