mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-09 07:36:40 +02:00
Remove trailing whitespace.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
class HTMLPurifier_AttrDef_URI_Email_SimpleCheckTest
|
||||
extends HTMLPurifier_AttrDef_URI_EmailHarness
|
||||
{
|
||||
|
||||
|
||||
function setUp() {
|
||||
$this->def = new HTMLPurifier_AttrDef_URI_Email_SimpleCheck();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
class HTMLPurifier_AttrDef_URI_EmailHarness extends HTMLPurifier_AttrDefHarness
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Tests common email strings that are obviously pass/fail
|
||||
*/
|
||||
@@ -12,19 +12,19 @@ class HTMLPurifier_AttrDef_URI_EmailHarness extends HTMLPurifier_AttrDefHarness
|
||||
$this->assertDef('bob.thebuilder@example.net');
|
||||
$this->assertDef('Bob_the_Builder-the-2nd@example.org');
|
||||
$this->assertDef('Bob%20the%20Builder@white-space.test');
|
||||
|
||||
|
||||
// extended format, with real name
|
||||
//$this->assertDef('Bob%20Builder%20%3Cbobby.bob.bob@it.is.example.com%3E');
|
||||
//$this->assertDef('Bob Builder <bobby.bob.bob@it.is.example.com>');
|
||||
|
||||
|
||||
// time to fail
|
||||
$this->assertDef('bob', false);
|
||||
$this->assertDef('bob@home@work', false);
|
||||
$this->assertDef('@example.com', false);
|
||||
$this->assertDef('bob@', false);
|
||||
$this->assertDef('', false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@@ -5,15 +5,15 @@
|
||||
|
||||
class HTMLPurifier_AttrDef_URI_HostTest extends HTMLPurifier_AttrDefHarness
|
||||
{
|
||||
|
||||
|
||||
function test() {
|
||||
|
||||
|
||||
$this->def = new HTMLPurifier_AttrDef_URI_Host();
|
||||
|
||||
|
||||
$this->assertDef('[2001:DB8:0:0:8:800:200C:417A]'); // IPv6
|
||||
$this->assertDef('124.15.6.89'); // IPv4
|
||||
$this->assertDef('www.google.com'); // reg-name
|
||||
|
||||
|
||||
// more domain name tests
|
||||
$this->assertDef('test.');
|
||||
$this->assertDef('sub.test.');
|
||||
@@ -34,8 +34,8 @@ class HTMLPurifier_AttrDef_URI_HostTest extends HTMLPurifier_AttrDefHarness
|
||||
$this->assertDef('ff.top');
|
||||
$this->assertDef('f1.top');
|
||||
$this->assertDef('f-.top', false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@@ -5,19 +5,19 @@
|
||||
|
||||
class HTMLPurifier_AttrDef_URI_IPv4Test extends HTMLPurifier_AttrDefHarness
|
||||
{
|
||||
|
||||
|
||||
function test() {
|
||||
|
||||
|
||||
$this->def = new HTMLPurifier_AttrDef_URI_IPv4();
|
||||
|
||||
|
||||
$this->assertDef('127.0.0.1'); // standard IPv4, loopback, non-routable
|
||||
$this->assertDef('0.0.0.0'); // standard IPv4, unspecified, non-routable
|
||||
$this->assertDef('255.255.255.255'); // standard IPv4
|
||||
|
||||
|
||||
$this->assertDef('300.0.0.0', false); // standard IPv4, out of range
|
||||
$this->assertDef('124.15.6.89/60', false); // standard IPv4, prefix not allowed
|
||||
|
||||
$this->assertDef('', false); // nothing
|
||||
|
||||
|
||||
$this->assertDef('', false); // nothing
|
||||
|
||||
}
|
||||
}
|
@@ -5,18 +5,18 @@
|
||||
|
||||
class HTMLPurifier_AttrDef_URI_IPv6Test extends HTMLPurifier_AttrDefHarness
|
||||
{
|
||||
|
||||
|
||||
function test() {
|
||||
|
||||
|
||||
$this->def = new HTMLPurifier_AttrDef_URI_IPv6();
|
||||
|
||||
|
||||
$this->assertDef('2001:DB8:0:0:8:800:200C:417A'); // unicast, full
|
||||
$this->assertDef('FF01:0:0:0:0:0:0:101'); // multicast, full
|
||||
$this->assertDef('0:0:0:0:0:0:0:1'); // loopback, full
|
||||
$this->assertDef('0:0:0:0:0:0:0:0'); // unspecified, full
|
||||
$this->assertDef('2001:DB8::8:800:200C:417A'); // unicast, compressed
|
||||
$this->assertDef('FF01::101'); // multicast, compressed
|
||||
|
||||
|
||||
$this->assertDef('::1'); // loopback, compressed, non-routable
|
||||
$this->assertDef('::'); // unspecified, compressed, non-routable
|
||||
$this->assertDef('0:0:0:0:0:0:13.1.68.3'); // IPv4-compatible IPv6 address, full, deprecated
|
||||
@@ -31,12 +31,12 @@ class HTMLPurifier_AttrDef_URI_IPv6Test extends HTMLPurifier_AttrDefHarness
|
||||
$this->assertDef('FF00::/8'); // compressed, multicast address type
|
||||
$this->assertDef('FE80::/10'); // compressed, link-local unicast, non-routable
|
||||
$this->assertDef('FEC0::/10'); // compressed, site-local unicast, deprecated
|
||||
|
||||
|
||||
$this->assertDef('2001:DB8:0:0:8:800:200C:417A:221', false); // unicast, full
|
||||
$this->assertDef('FF01::101::2', false); //multicast, compressed
|
||||
$this->assertDef('', false); // nothing
|
||||
|
||||
$this->assertDef('', false); // nothing
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user