Skip to content

Commit 130c7ba

Browse files
committed
Delete files created during tests
Also remove check for tests/data/README.md which doesn't exist.
1 parent 931312f commit 130c7ba

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/integration/CompileTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ public function testDataFiles(): void
2525
$converter = new MarkdownConverter($environment);
2626
$markdownFiles = \glob(\dirname(__DIR__) . '/data/*.md');
2727
foreach ($markdownFiles as $markdownFile) {
28-
if (\basename($markdownFile) === 'README.md') {
29-
continue;
30-
}
31-
3228
$workingDir = \dirname($markdownFile);
3329
// Create a temp tex file in the tests directory, so it's got access to images etc.
34-
$tmpTexFile = $workingDir . '/CompileTest_' . \pathinfo($markdownFile, PATHINFO_FILENAME) . '.tex';
30+
$prefix = $workingDir . '/CompileTest_';
31+
$tmpTexFile = $prefix . \pathinfo($markdownFile, PATHINFO_FILENAME) . '.tex';
3532
$markdown = \file_get_contents($markdownFile);
3633
$latex = "\\documentclass{article}\n"
3734
. "\\usepackage{listings, graphicx, hyperref, footmisc}\n"
@@ -43,6 +40,8 @@ public function testDataFiles(): void
4340
$process->mustRun();
4441
$this->assertStringContainsString('Output written', $process->getOutput());
4542
$this->assertStringContainsString('1 page', $process->getOutput());
43+
// Delete temp files.
44+
\array_map('unlink', \glob($prefix . '*'));
4645
}
4746
}
4847
}

0 commit comments

Comments
 (0)