//This file is part of DeforaOS Web DaPortal // //This program is free software: you can redistribute it and/or modify //it under the terms of the GNU General Public License as published by //the Free Software Foundation, version 3 of the License. // //This program is distributed in the hope that it will be useful, //but WITHOUT ANY WARRANTY; without even the implied warranty of //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //GNU General Public License for more details. // //You should have received a copy of the GNU General Public License //along with this program. If not, see . require_once('./tests.php'); //functions function html(Engine $engine, $html, $expected = FALSE, $class = 'HTML') { if(($html = $class::filter($engine, $html)) === FALSE) return FALSE; if($expected !== FALSE && $html != $expected) { print("Obtained:\n$html\n"); print("Expected:\n$expected\n"); return FALSE; } return TRUE; } function test(Engine $engine) { $html = 'Title' .'

Title

Some text.

' .''; if(html($engine, $html, '

Title

Some text.

Now') === FALSE) exit(2); if(html($engine, $html, '

Title

Some text.

' .'', 'HTML5') === FALSE) exit(3); } test($engine); exit(0); ?>