mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-08 07:56:06 +02:00
Switch safe string encoding from ~tilde codes to SOH-delimited codes throughout
This commit is contained in:
@@ -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