mirror of https://github.com/tc39/test262.git
[runner] Add support for "folding" block delimiter (#654)
This commit is contained in:
parent
1e75730d5f
commit
330cea98f5
|
@ -43,7 +43,7 @@ def load(str):
|
|||
return dict
|
||||
|
||||
def myReadValue(lines, value):
|
||||
if value == ">":
|
||||
if value == ">" or value == "|":
|
||||
(lines, value) = myMultiline(lines, value)
|
||||
value = value + "\n"
|
||||
return (lines, value)
|
||||
|
|
|
@ -81,6 +81,11 @@ class TestMonkeyYAMLParsing(unittest.TestCase):
|
|||
self.assertEqual(lines, [" other: 42"])
|
||||
self.assertEqual(value, "foo bar")
|
||||
|
||||
def test_Multiline_5(self):
|
||||
lines = ["info: |", " attr: this is a string (not nested yaml)", ""]
|
||||
y = "\n".join(lines)
|
||||
self.assertEqual(monkeyYaml.load(y), yaml.load(y))
|
||||
|
||||
def test_myLeading(self):
|
||||
self.assertEqual(2, monkeyYaml.myLeadingSpaces(" foo"))
|
||||
self.assertEqual(2, monkeyYaml.myLeadingSpaces(" "))
|
||||
|
|
Loading…
Reference in New Issue