Switch safe string encoding from ~tilde codes to SOH-delimited codes throughout

This commit is contained in:
Stone_Red
2026-03-05 00:24:20 +01:00
parent 7eea8756bc
commit 071d9a937e
6 changed files with 97 additions and 73 deletions
@@ -150,7 +150,7 @@ public class ListStatementsTests
List<string> lines =
[
"list items new",
"list items add hello~spcworld",
"list items add \"hello world\"",
"list items get 0",
"var result = %out eval",
"${result}"
@@ -46,9 +46,21 @@ public class ProcessingStatementsTests
}
[TestMethod]
public void EvalDecodesSafeStringTest()
public void EvalRawTildeSequenceIsLiteralTest()
{
YesNtAssert.IsLineEqual("hello~nliworld eval", "hello\nworld");
YesNtAssert.IsLineEqual("hello~nliworld eval", "hello~nliworld");
}
[TestMethod]
public void EvalDecodesStringLiteralEscapesTest()
{
List<string> lines =
[
"var x = \"hello\\nworld\"",
"${x} eval"
];
YesNtAssert.IsLastLineEqual(lines, "hello\nworld");
}
[TestMethod]