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 =
|
List<string> lines =
|
||||||
[
|
[
|
||||||
"exec cmd with /c,echo yesnt",
|
"exec whoami",
|
||||||
"var exitCode = %out",
|
"var exitCode = %out",
|
||||||
"${exitCode}"
|
"${exitCode}"
|
||||||
];
|
];
|
||||||
@@ -20,14 +20,26 @@ public class SystemStatementsTests
|
|||||||
YesNtAssert.IsLastLineEqual(lines, "0");
|
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]
|
[TestMethod]
|
||||||
public void ExecWithInStackArgsRunsProcessTest()
|
public void ExecWithInStackArgsRunsProcessTest()
|
||||||
{
|
{
|
||||||
List<string> lines =
|
List<string> lines =
|
||||||
[
|
[
|
||||||
"push_in /c",
|
"exec whoami",
|
||||||
"push_in echo yesnt",
|
|
||||||
"exec cmd",
|
|
||||||
"var exitCode = %out",
|
"var exitCode = %out",
|
||||||
"${exitCode}"
|
"${exitCode}"
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user