Skip to content

Commit

Permalink
test: 🧪 make the test script more interactive, add unmanaged paramete…
Browse files Browse the repository at this point in the history
…rset tests
  • Loading branch information
anonhostpi committed Jan 15, 2024
1 parent 9fb4952 commit 6e51c00
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions Test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,57 @@ If( $ImportPackage ){
$VerbosePreference = "Continue"

If( $ImportPackage ){

Write-Host "[Import-Package:Testing] Begin Testing?"
pause;

Import-Module "$Root\Import-Package\"

Write-Host "[Import-Package:Testing] Initialized. Continue Testing?"
pause;

# --- Avalonia ---
# --- Basic Testing ---

Write-Host "[Import-Package:Testing] Testing with Avalonia.Desktop and Microsoft.ClearScript"

Import-Package Avalonia.Desktop -Offline
# Import-Package Avalonia.Win32 -Offline]
Import-Package Microsoft.ClearScript -Offline

# --- Microsoft.ClearScript ---
Write-Host "[Import-Package:Testing] Avalonia.Desktop and Microsoft.ClearScript should be loaded. Continue Testing?"
pause;

Import-Package Microsoft.ClearScript -Offline
# --- Path Parameter Testing ---

Write-Host
Write-Host (Get-Runtime)
Write-Host "[Import-Package:Testing] Testing the Unmanaged Parameterset"

$unmanaged = @{}

Pause;
# Has no dependencies
$unmanaged.Simple = Get-Package NewtonSoft.json

# Has 1 dependency
$unmanaged.Complex = Get-Package NLua

$unmanaged.Simple = $unmanaged.Simple.Source
$unmanaged.Complex = $unmanaged.Complex.Source

Import-Package -Path $unmanaged.Simple
Write-Host "[Import-Package:Testing] Testing the Unmanaged Parameterset with a simplistic package is complete. Continue Testing?"
pause;

Import-Package -Path $unmanaged.Complex
Write-Host "[Import-Package:Testing] Testing the Unmanaged Parameterset with a complex package is complete. Continue Testing?"
pause;

Write-Host
Write-Host "System Runtime ID:" (Get-Runtime)
}

If( $NewDispatchThread ){

Write-Host "[New-ThreadController:Testing] Begin Testing?"
pause;

Import-Module "$Root\New-ThreadController\"

# Should dump a warning followed by an error
Expand Down

0 comments on commit 6e51c00

Please sign in to comment.