This commit is contained in:
2025-12-15 23:51:06 +05:30
parent 534767ced9
commit 957a3572c3
18 changed files with 175 additions and 231 deletions

View File

@ -50,7 +50,6 @@ BOOL TestBasicRun()
IAT_CHECK(result.has_value());
IAT_CHECK_EQ(*result, 0); // Exit code 0
// Note: Echo might add newline, but your LineBuffer trims/handles it.
// We check if "HelloIA" is contained or equal.
IAT_CHECK(captured.find("HelloIA") != String::npos);
@ -137,14 +136,9 @@ BOOL TestMissingExe()
// -------------------------------------------------------------------------
BOOL TestLargeOutput()
{
// We need to generate output larger than the internal 4096 buffer
// Need to generate output larger than the internal 4096 buffer
// to ensure the "partial line" logic works when a line crosses a buffer boundary.
// We will construct a python script or shell command to print a massive line.
// Cross platform approach: Use Python if available, or just a long echo.
// Let's assume 'python3' or 'python' is in path, otherwise skip?
// Safer: Use pure shell loop if possible, or just a massive command line arg.
String massiveString;
massiveString.reserve(5000);
for (int i = 0; i < 500; ++i)
@ -223,10 +217,6 @@ BOOL TestComplexArguments()
// 3. path/to/file
String complexArgs = "-DDEFINED_MSG=\\\"Hello World\\\" -v path/to/file";
// We can't easily inspect the child process argv in this unit test framework without
// writing a dedicated child program that prints its argv.
// However, for now, we ensure it doesn't crash or return error code 127.
// Use "echo" to verify what it received.
// Expected output: -DDEFINED_MSG="Hello World" -v path/to/file
String cmd = "/bin/echo";