Skip to content

Commit

Permalink
Fix helloworld test to pass with 6.0 RC2
Browse files Browse the repository at this point in the history
F# now uses a different hello world message.

Also rename test to address #158

Fixes:
#158
  • Loading branch information
omajid committed Sep 27, 2021
1 parent 52509df commit b2b1308
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion helloworld-2x/test.json → helloworld/test.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "helloworld-2x",
"name": "helloworld",
"enabled": true,
"requiresSdk": true,
"version": "2.0",
Expand Down
19 changes: 13 additions & 6 deletions helloworld-2x/test.sh → helloworld/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ PROJNAME=helloworld
# Test new C# project
dotnet new console --language C# --name $PROJNAME
pushd $PROJNAME
dotnet run | grep 'Hello,\? World!'
if [ $? -eq 1 ]; then
if dotnet run | grep 'Hello,\? World!'; then
true
else
echo "C# Hello World FAIL"
dotnet run
rm -rf $PROJNAME
exit 1
fi
popd
Expand All @@ -23,9 +26,11 @@ echo -e "===================\n"

dotnet new console --language F# --name $PROJNAME
pushd $PROJNAME
dotnet run | grep -i 'Hello,\? World!\? from F#'
if [ $? -eq 1 ]; then
if dotnet run | grep -E 'Hello,? [Ww]orld!? from F#|Hello from F#'; then
true
else
echo "F# Hello World FAIL"
dotnet run
rm -rf $PROJNAME
exit 1
fi
Expand All @@ -40,9 +45,11 @@ echo -e "===================\n"

dotnet new console --language VB --name $PROJNAME
pushd $PROJNAME
dotnet run | grep 'Hello,\? World!'
if [ $? -eq 1 ]; then
if dotnet run | grep 'Hello,\? World!'; then
true
else
echo "VB Hello World FAIL"
dotnet run
rm -rf $PROJNAME
exit 1
fi
Expand Down

0 comments on commit b2b1308

Please sign in to comment.