Skip to content

Commit dfe1492

Browse files
committed
Added PowerShell test
1 parent 503b462 commit dfe1492

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

vyxal/test.ps1

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
function Assert-MatchTests {
2+
param (
3+
[Parameter(Mandatory = $true, ValueFromPipeline)] $TestResult
4+
)
5+
6+
if ($TestResult) {
7+
Write-Error "Output does not match expected results."
8+
}
9+
}
10+
11+
# Location of the vyxal.jar file
12+
# You will need to readjust this line to fit with the name of the .jar file in this folder.
13+
$vyxal = "$PSScriptRoot\vyxal.jar"
14+
15+
$Error.clear()
16+
java -jar $vyxal --file "$PSScriptRoot\codepage.vy" &&
17+
java -jar $vyxal --file "$PSScriptRoot\hello.vy" &&
18+
ForEach-Object 'foo';
19+
20+
if ($Error -or !$?) {
21+
"*** VYXAL TESTS FAILED ***"
22+
}
23+
else {
24+
"VYXAL TESTS PASSED"
25+
}

0 commit comments

Comments
 (0)