From 34fa266114efbaa5b39203b9d9e3e5d24828becd Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 2 Apr 2022 12:48:02 +0200 Subject: [PATCH] Fix windows build --- tests/Composer/Test/Autoload/AutoloadGeneratorTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php index a95b72dfb..8cc6b82ad 100644 --- a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php +++ b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php @@ -1606,7 +1606,10 @@ EOF; )); $map = $this->generator->buildPackageMap($this->im, $package, array($dep)); $parsed = $this->generator->parseAutoloads($map, $package); - $this->assertSame(array(preg_quote(realpath(dirname($this->workingDir))).'/excludedroot($|/)', preg_quote(realpath($this->workingDir)).'/root/excl($|/)'), $parsed['exclude-from-classmap']); + $this->assertSame(array( + preg_quote(strtr((string) realpath(dirname($this->workingDir))), '\\', '/').'/excludedroot($|/)', + preg_quote(strtr((string) realpath(dirname($this->workingDir))), '\\', '/').'/root/excl($|/)' + ), $parsed['exclude-from-classmap']); } public function testEmptyPaths()