Skip to content

Commit 5173032

Browse files
committed
SnapshotValueReader doesn't unescape anymore.
1 parent b53297c commit 5173032

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

jvm/selfie-lib/src/commonTest/kotlin/com/diffplug/selfie/SnapshotValueReaderTest.kt

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023-2024 DiffPlug
2+
* Copyright (C) 2023-2025 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -96,21 +96,15 @@ class SnapshotValueReaderTest {
9696
╔═ test with \┌\─ ascii art \─\┐ in name ═╗
9797
"""
9898
.trimIndent())
99-
reader.peekKey() shouldBe "test with [square brackets] in name"
99+
reader.peekKey() shouldBe "test with \\(square brackets\\) in name"
100100
reader.nextValue().valueString() shouldBe ""
101-
reader.peekKey() shouldBe """test with \backslash\ in name"""
101+
reader.peekKey() shouldBe """test with \\backslash\\ in name"""
102102
reader.nextValue().valueString() shouldBe ""
103-
reader.peekKey() shouldBe
104-
"""
105-
test with
106-
newline
107-
in name
108-
"""
109-
.trimIndent()
103+
reader.peekKey() shouldBe "test with\\nnewline\\nin name"
110104
reader.nextValue().valueString() shouldBe ""
111-
reader.peekKey() shouldBe "test with \ttab\t in name"
105+
reader.peekKey() shouldBe "test with \\ttab\\t in name"
112106
reader.nextValue().valueString() shouldBe ""
113-
reader.peekKey() shouldBe "test with ╔═ ascii art ═╗ in name"
107+
reader.peekKey() shouldBe "test with \\\\ ascii art \\\\ in name"
114108
reader.nextValue().valueString() shouldBe ""
115109
}
116110

0 commit comments

Comments
 (0)