docker-php-extension-installer/scripts/tests/wikidiff2

14 lines
335 B
Plaintext
Raw Normal View History

2024-04-30 14:23:57 +00:00
#!/usr/bin/env php
<?php
require_once __DIR__ . '/_bootstrap.php';
$diff = wikidiff2_inline_json_diff("a\nb\nc", "a\nd\nc", 1);
$data = json_decode($diff, true);
if (!is_array($data)) {
fwrite(STDERR, "Unexpected result of wikidiff2_inline_json_diff():\n{$diff}\n");
exit(1);
}
echo "wikidiff2 works as expected\n";
exit(0);