mirror of
https://github.com/mlocati/docker-php-extension-installer
synced 2025-05-10 09:02:42 +00:00
Add support for md4c (#1026)
This commit is contained in:
parent
2d16d8be5d
commit
e03402caf5
2 changed files with 28 additions and 0 deletions
27
scripts/tests/md4c
Executable file
27
scripts/tests/md4c
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/_bootstrap.php';
|
||||
|
||||
if (!function_exists('md4c_toHtml')) {
|
||||
fwrite(STDERR, "The function md4c_toHtml() does not exist\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$input = "# Test\n";
|
||||
$expected = "<h1>Test</h1>\n";
|
||||
$actual = md4c_toHtml($input);
|
||||
|
||||
if ($actual !== $expected) {
|
||||
fwrite(
|
||||
STDERR,
|
||||
<<<EOT
|
||||
Failed to convert {$input}
|
||||
Expected: {$expected}
|
||||
Actual : {$actual}
|
||||
|
||||
EOT
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
echo "md4c_toHtml() works just fine.\n";
|
Loading…
Add table
Add a link
Reference in a new issue