mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 00:56:31 +02:00
Switch safe string encoding from ~tilde codes to SOH-delimited codes throughout
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user