From c69adf2bf42b001778af995c3983d2b55c6b3faa Mon Sep 17 00:00:00 2001 From: Marc Prud'hommeaux Date: Sun, 26 Apr 2026 11:08:42 -0400 Subject: [PATCH] Add string escaping tests --- Tests/SkipLibTests/StringTests.swift | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Tests/SkipLibTests/StringTests.swift b/Tests/SkipLibTests/StringTests.swift index 177e511..7df096f 100644 --- a/Tests/SkipLibTests/StringTests.swift +++ b/Tests/SkipLibTests/StringTests.swift @@ -161,6 +161,28 @@ import Testing #expect(str2 == "abcdefbcd") } + @Test func escapedStrings() { + let str1 = "abc $xyz" + #expect(str1 == #"abc $xyz"#) + + let str2 = """ + abc $xyz + 123 456 + """ + #expect(str2 == " abc $xyz\n 123 456") + + let value = "VALUE" + + let str3 = "abc \(value)" + #expect(str3 == #"abc VALUE"#) + + let str4 = """ + abc \(value) + 123 456 + """ + #expect(str4 == " abc VALUE\n 123 456") + } + @Test func unicodeStrings() { #if SKIP // skip: TODO: testUnicodeStrings