mirror of
https://github.com/composer/composer
synced 2025-05-10 09:02:59 +00:00
Test for bug parsing multiline strings with 'escaped' newlines
This commit is contained in:
parent
165190bb38
commit
2665c60b2f
2 changed files with 18 additions and 0 deletions
|
@ -55,6 +55,8 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase
|
||||||
'Foo\\LargeGap' => realpath(__DIR__).'/Fixtures/classmap/LargeGap.php',
|
'Foo\\LargeGap' => realpath(__DIR__).'/Fixtures/classmap/LargeGap.php',
|
||||||
'Foo\\MissingSpace' => realpath(__DIR__).'/Fixtures/classmap/MissingSpace.php',
|
'Foo\\MissingSpace' => realpath(__DIR__).'/Fixtures/classmap/MissingSpace.php',
|
||||||
'Foo\\StripNoise' => realpath(__DIR__).'/Fixtures/classmap/StripNoise.php',
|
'Foo\\StripNoise' => realpath(__DIR__).'/Fixtures/classmap/StripNoise.php',
|
||||||
|
'Foo\\SlashedA' => realpath(__DIR__).'/Fixtures/classmap/BackslashLineEndingString.php',
|
||||||
|
'Foo\\SlashedB' => realpath(__DIR__).'/Fixtures/classmap/BackslashLineEndingString.php',
|
||||||
'Unicode\\↑\\↑' => realpath(__DIR__).'/Fixtures/classmap/Unicode.php',
|
'Unicode\\↑\\↑' => realpath(__DIR__).'/Fixtures/classmap/Unicode.php',
|
||||||
)),
|
)),
|
||||||
array(__DIR__.'/Fixtures/template', array()),
|
array(__DIR__.'/Fixtures/template', array()),
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Foo;
|
||||||
|
|
||||||
|
class SlashedA {
|
||||||
|
function foo() {
|
||||||
|
return sprintf("foo\
|
||||||
|
bar");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SlashedB {
|
||||||
|
function bar() {
|
||||||
|
print "baz";
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue