Skip to content

Commit 330cea9

Browse files
jugglinmikeleobalter
authored andcommitted
[runner] Add support for "folding" block delimiter (#654)
1 parent 1e75730 commit 330cea9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tools/packaging/monkeyYaml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def load(str):
4343
return dict
4444

4545
def myReadValue(lines, value):
46-
if value == ">":
46+
if value == ">" or value == "|":
4747
(lines, value) = myMultiline(lines, value)
4848
value = value + "\n"
4949
return (lines, value)

tools/packaging/test/test_monkeyYaml.py

+5
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ def test_Multiline_4(self):
8181
self.assertEqual(lines, [" other: 42"])
8282
self.assertEqual(value, "foo bar")
8383

84+
def test_Multiline_5(self):
85+
lines = ["info: |", " attr: this is a string (not nested yaml)", ""]
86+
y = "\n".join(lines)
87+
self.assertEqual(monkeyYaml.load(y), yaml.load(y))
88+
8489
def test_myLeading(self):
8590
self.assertEqual(2, monkeyYaml.myLeadingSpaces(" foo"))
8691
self.assertEqual(2, monkeyYaml.myLeadingSpaces(" "))

0 commit comments

Comments
 (0)