diff --git a/NEWS b/NEWS
index cac5c31c..11b3438e 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
! Added %Core.EscapeNonASCIICharacters to workaround loss of Unicode
characters while %Core.Encoding is set to a non-UTF-8 encoding.
. Implemented AttrDef_CSSURI for url(http://google.com) style declarations
+. Added convenient single test selector form on test runner
1.3.3, unknown release date, likely to be dropped
! Moved SLOW to docs/enduser-slow.html and added code examples
diff --git a/TODO b/TODO
index 6a3bc84b..e8b6f1fc 100644
--- a/TODO
+++ b/TODO
@@ -36,6 +36,8 @@ TODO List
- Friendly strict handling of
(block ->
)
2.0 release
+ # Legit token based CSS parsing (will require revamping almost every
+ AttrDef class)
# Formatters for plaintext (COMPLEX)
- Auto-paragraphing (be sure to leverage fact that we know when things
shouldn't be paragraphed, such as lists and tables).
diff --git a/tests/HTMLPurifier/AttrDef/BorderTest.php b/tests/HTMLPurifier/AttrDef/BorderTest.php
index 7a8153d5..b18bfe70 100644
--- a/tests/HTMLPurifier/AttrDef/BorderTest.php
+++ b/tests/HTMLPurifier/AttrDef/BorderTest.php
@@ -1,6 +1,7 @@
=')) {
$test_files[] = 'TokenFactoryTest.php';
}
+sort($test_files);
+$GLOBALS['HTMLPurifierTest']['Files'] = $test_files;
+
$test_file_lookup = array_flip($test_files);
function htmlpurifier_path2class($path) {
@@ -119,12 +124,48 @@ function htmlpurifier_path2class($path) {
return $temp;
}
-// we can't use addTestFile because SimpleTest chokes on E_STRICT warnings
+// use a customized reporter with some helpful UI widgets
if (isset($_GET['f']) && isset($test_file_lookup[$_GET['f']])) {
+ $GLOBALS['HTMLPurifierTest']['File'] = $_GET['f'];
+} else {
+ $GLOBALS['HTMLPurifierTest']['File'] = false;
+}
+
+class HTMLPurifier_SimpleTest_Reporter extends HTMLReporter
+{
- // execute only one test
- $test_file = $_GET['f'];
+ function paintHeader($test_name) {
+ parent::paintHeader($test_name);
+ $test_file = $GLOBALS['HTMLPurifierTest']['File'];
+?>
+
+run($reporter);