From 8f87d8462b4fb98f8f15db58847e99273a846444 Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Fri, 6 Mar 2026 12:53:24 +0100 Subject: [PATCH] Update tests to use 'whoami' command instead of cmd --- src/.editorconfig => .editorconfig | 0 .../SystemStatementsTests.cs | 20 +++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) rename src/.editorconfig => .editorconfig (100%) diff --git a/src/.editorconfig b/.editorconfig similarity index 100% rename from src/.editorconfig rename to .editorconfig diff --git a/src/YesNt.Interpreter.Tests/SystemStatementsTests.cs b/src/YesNt.Interpreter.Tests/SystemStatementsTests.cs index d8f4138..1c2dd15 100644 --- a/src/YesNt.Interpreter.Tests/SystemStatementsTests.cs +++ b/src/YesNt.Interpreter.Tests/SystemStatementsTests.cs @@ -12,7 +12,7 @@ public class SystemStatementsTests { List 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 lines = + [ + "exec whoami with /?", + "var exitCode = %out", + "var dummy = 0", + "${dummy}" + ]; + + YesNtAssert.IsLastLineEqual(lines, "0"); + } + [TestMethod] public void ExecWithInStackArgsRunsProcessTest() { List lines = [ - "push_in /c", - "push_in echo yesnt", - "exec cmd", + "exec whoami", "var exitCode = %out", "${exitCode}" ];