aboutsummaryrefslogtreecommitdiff
path: root/test/dotnet/install_dotnet_exact_version.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/dotnet/install_dotnet_exact_version.sh')
-rw-r--r--test/dotnet/install_dotnet_exact_version.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/dotnet/install_dotnet_exact_version.sh b/test/dotnet/install_dotnet_exact_version.sh
new file mode 100644
index 0000000..ec89f3b
--- /dev/null
+++ b/test/dotnet/install_dotnet_exact_version.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library bundled with the devcontainer CLI
+# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib
+# Provides the 'check' and 'reportResults' commands.
+source dev-container-features-test-lib
+
+# Feature-specific tests
+# The 'check' command comes from the dev-container-features-test-lib. Syntax is...
+# check <LABEL> <cmd> [args...]
+source dotnet_env.sh
+source dotnet_helpers.sh
+
+check ".NET SDK 8.0.100-preview.6.23330.14 installed" \
+is_dotnet_sdk_version_installed "8.0.100-preview.6.23330.14"
+
+check "Build and run example project" \
+dotnet run --project projects/net8.0
+
+# Report results
+# If any of the checks above exited with a non-zero exit code, the test will fail.
+reportResults \ No newline at end of file