Update tests to use 'whoami' command instead of cmd

This commit is contained in:
Stone_Red
2026-03-06 12:53:48 +01:00
parent f7d35933d4
commit 8f87d8462b
2 changed files with 16 additions and 4 deletions
View File
@@ -12,7 +12,7 @@ public class SystemStatementsTests
{
List<string> lines =
[
"exec cmd with /c,echo yesnt",
"exec whoami",
"var exitCode = %out",
"${exitCode}"
];
@@ -20,14 +20,26 @@ public class SystemStatementsTests
YesNtAssert.IsLastLineEqual(lines, "0");
}
[TestMethod]
public void ExecWithArgsRunsProcessTestWithArgument()
{
List<string> lines =
[
"exec whoami with /?",
"var exitCode = %out",
"var dummy = 0",
"${dummy}"
];
YesNtAssert.IsLastLineEqual(lines, "0");
}
[TestMethod]
public void ExecWithInStackArgsRunsProcessTest()
{
List<string> lines =
[
"push_in /c",
"push_in echo yesnt",
"exec cmd",
"exec whoami",
"var exitCode = %out",
"${exitCode}"
];