Skip to content

Commit dab357f

Browse files
committed
Fixes #224: Use DIRECTORY_SEPARATOR instead
1 parent 59351ce commit dab357f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/generate_spec_tests.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66

77

88
//$testCases = array('C:\src\php-investigations\tolerant-php-parser\tests\..\php-langspec\tests\traits\traits.phpt');
9-
$testCases = glob(__DIR__ . "\\..\\php-langspec\\tests\\**\\*.phpt");
10-
$outTestCaseDir = __DIR__ . "\\cases\\php-langspec\\";
9+
$sep = DIRECTORY_SEPARATOR;
10+
$testCases = glob(__DIR__ . "${sep}..${sep}php-langspec${sep}tests${sep}**${sep}*.phpt");
11+
$outTestCaseDir = __DIR__ . "${sep}cases${sep}php-langspec${sep}";
1112
mkdir($outTestCaseDir);
1213
file_put_contents($outTestCaseDir . "README.md", "Auto-generated from php/php-langspec tests");
1314

1415
foreach ($testCases as $idx=> $filename) {
1516
$myFile = file_get_contents($filename);
1617

17-
$dirPrefix = $outTestCaseDir . basename(dirname($filename)) . "\\" ;
18+
$dirPrefix = $outTestCaseDir . basename(dirname($filename)) . $sep;
1819
$baseName = basename(basename($filename), ".phpt");
1920
mkdir($dirPrefix);
2021

0 commit comments

Comments
 (0)