Added test for issue 39229
This commit is contained in:
parent
aa5ec20a0c
commit
b562a54e53
|
@ -2671,6 +2671,29 @@ YAML;
|
|||
);
|
||||
}
|
||||
|
||||
public function testMultipleWhitespaceAtEndOfLine()
|
||||
{
|
||||
$yaml = "\nfoo:\n arguments: [ '@bar' ] \n";
|
||||
$this->assertSame(
|
||||
[
|
||||
'foo' => [
|
||||
'arguments' => ['@bar'],
|
||||
],
|
||||
],
|
||||
$this->parser->parse($yaml)
|
||||
);
|
||||
|
||||
$yaml = "\nfoo:\n bar: {}\n";
|
||||
$this->assertSame(
|
||||
[
|
||||
'foo' => [
|
||||
'bar' => [],
|
||||
],
|
||||
],
|
||||
$this->parser->parse($yaml)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a regression test for a bug where a YAML block with a nested multiline string using | was parsed without
|
||||
* a trailing \n when a shorter YAML document was parsed before.
|
||||
|
|
Reference in New Issue