$list['md5'] = 'd75feef3f177e1b003c10cb965765952'; $lists[] = $list; // image $list['file'] = 'image'; $list['md5'] = '81b7662ba8c5c4606d0f6e37ea07b049'; $lists[] = $list; // code $list['file'] = 'code'; $list['md5'] = '23ca378e03ed3c8e47548d19ddc48da7'; $lists[] = $list; // blockquote $list['file'] = 'blockquote'; $list['md5'] = 'f614ec4a88acd449205b93fbdafea398'; $lists[] = $list; // Markdown $md = OnePiece5::Unit('Markdown'); // Diagnosis foreach ($lists as $list) { $file = $list['file']; $html = $md->toHtml(__DIR__ . "/testcase/{$file}.md"); $md5 = md5($html); if ($list['md5'] === $md5) { $md->p("![color:blue[{$file} was successful!!]]"); } else { $md->p("![color:red[{$file}, {$md5}]]"); $md->AdminNotice("{$file}\\,\\ {$md5}"); // Diff $save = file_get_contents(__DIR__ . "/testcase/{$file}.html"); Dump::D(array_diff(explode("\n", $save), explode("\n", $html))); } }