Menu

[r29]: / trunk / testing / auto-testing.php  Maximize  Restore  History

Download this file

57 lines (43 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
require('css_results.php');
require('../class.csstidy.php');
ini_set('display_errors','On');
$css = new csstidy();
$css->set_cfg('preserve_css',false);
$css_code = file_get_contents('fisubsilver.css');
$css->parse($css_code);
if($css->css === $xhtml_result) {
echo '<div style="color:green">XHTML OK!</div>';
} else {
echo '<div style="color:red">XHTML failed!</div>';
print_r($css->css);
print_r($xhtml_result);
die();
}
flush();
$css_code = file_get_contents('base.css');
$css->parse($css_code);
if($css->css === $ala_result) {
echo '<div style="color:green">ALA OK!</div>';
} else {
echo '<div style="color:red">ALA failed!</div>';
}
flush();
$css->set_cfg('remove_last_;',true);
if($css->print->formatted() === $ala_html) {
echo '<div style="color:green">ALA HTML OK!</div>';
} else {
echo '<div style="color:red">ALA HTML failed!</div>';
}
flush();
$css->set_cfg('optimise_shorthands',false);
$css->set_cfg('only_safe_optimisations',false);
//$css->set_cfg('merge_selectors',1); FIXME!
$css->parse($css_code);
if($css->css === $ala_options_result) {
echo '<div style="color:green">ALA +options OK!</div>';
} else {
echo '<div style="color:red">ALA +options failed!</div>';
}
flush();
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.