1
0
Fork 0
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:
Michele Locati 2024-12-02 17:13:15 +01:00 committed by GitHub
parent 2d16d8be5d
commit e03402caf5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 0 deletions

27
scripts/tests/md4c Executable file
View 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";