File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
jvm/selfie-lib/src/commonTest/kotlin/com/diffplug/selfie Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -91,4 +91,32 @@ class SnapshotFileTest {
9191 """
9292 .trimIndent()
9393 }
94+
95+ @Test
96+ fun escapingBug () {
97+ val file =
98+ SnapshotFile .parse(
99+ SnapshotValueReader .of(
100+ """
101+ ╔═ trialStarted/stripe ═╗
102+
103+ ╔═ trialStarted/stripe[«1»{\n "params": {\n "line_items": "line_items=\({quantity=1, price=price_xxxx}\)"\n },\n "apiMode": "V1"\n}] ═╗
104+ {}
105+ ╔═ [end of file] ═╗
106+
107+ """
108+ .trimIndent()))
109+ val keys = file.snapshots.keys.toList()
110+ keys.size shouldBe 1
111+ keys[0 ] shouldBe " trialStarted/stripe"
112+ val snapshot = file.snapshots.get(keys[0 ])!!
113+
114+ snapshot.facets.keys.size shouldBe 1
115+ snapshot.facets.keys.first() shouldBe """ «1»{
116+ "params": {
117+ "line_items": "line_items=[{quantity=1, price=price_xxxx}]"
118+ },
119+ "apiMode": "V1"
120+ }"""
121+ }
94122}
You can’t perform that action at this time.
0 commit comments