mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 00:56:31 +02:00
Update tests to use 'whoami' command instead of cmd
This commit is contained in:
@@ -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}"
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user