Add snapcraft & chocolatey manifests and move code to src

This commit is contained in:
Stone_Red
2026-03-06 00:51:31 +01:00
parent 5efd698772
commit 2a03352169
64 changed files with 302 additions and 5 deletions
@@ -0,0 +1,48 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
namespace YesNt.Interpreter.Tests;
[TestClass]
public class SystemStatementsTests
{
[TestMethod]
public void ExecWithArgsRunsProcessTest()
{
List<string> lines =
[
"exec cmd with /c,echo yesnt",
"var exitCode = %out",
"${exitCode}"
];
YesNtAssert.IsLastLineEqual(lines, "0");
}
[TestMethod]
public void ExecWithInStackArgsRunsProcessTest()
{
List<string> lines =
[
"push_in /c",
"push_in echo yesnt",
"exec cmd",
"var exitCode = %out",
"${exitCode}"
];
YesNtAssert.IsLastLineEqual(lines, "0");
}
[TestMethod]
public void ExecInvalidProgramFailsTest()
{
List<string> lines =
[
"exec does_not_exist_abc_xyz"
];
YesNtAssert.ContainsTerminationMessage(lines, "Failed to start \"does_not_exist_abc_xyz\"");
}
}