mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
Add a couple more test cases to parse_url() tests
http://::# (valid but silly) http://# (invalid)
This commit is contained in:
parent
914f8fd304
commit
95017c0522
@ -743,6 +743,13 @@ echo "Done";
|
||||
string(1) ":"
|
||||
}
|
||||
|
||||
--> http://::#: array(2) {
|
||||
["scheme"]=>
|
||||
string(4) "http"
|
||||
["host"]=>
|
||||
string(1) ":"
|
||||
}
|
||||
|
||||
--> x://::6.5: array(3) {
|
||||
["scheme"]=>
|
||||
string(1) "x"
|
||||
@ -856,6 +863,8 @@ echo "Done";
|
||||
|
||||
--> http://?: bool(false)
|
||||
|
||||
--> http://#: bool(false)
|
||||
|
||||
--> http://?:: bool(false)
|
||||
|
||||
--> http://:?: bool(false)
|
||||
@ -863,4 +872,4 @@ echo "Done";
|
||||
--> http://blah.com:123456: bool(false)
|
||||
|
||||
--> http://blah.com:abcdef: bool(false)
|
||||
Done
|
||||
Done
|
||||
|
@ -96,6 +96,7 @@ echo "Done";
|
||||
--> x:/blah.com : string(1) "x"
|
||||
--> x://::abc/? : bool(false)
|
||||
--> http://::? : string(4) "http"
|
||||
--> http://::# : string(4) "http"
|
||||
--> x://::6.5 : string(1) "x"
|
||||
--> http://?:/ : string(4) "http"
|
||||
--> http://@?:/ : string(4) "http"
|
||||
@ -118,8 +119,9 @@ echo "Done";
|
||||
--> http://@:/ : bool(false)
|
||||
--> http://:/ : bool(false)
|
||||
--> http://? : bool(false)
|
||||
--> http://# : bool(false)
|
||||
--> http://?: : bool(false)
|
||||
--> http://:? : bool(false)
|
||||
--> http://blah.com:123456 : bool(false)
|
||||
--> http://blah.com:abcdef : bool(false)
|
||||
Done
|
||||
Done
|
||||
|
@ -95,6 +95,7 @@ echo "Done";
|
||||
--> x:/blah.com : NULL
|
||||
--> x://::abc/? : bool(false)
|
||||
--> http://::? : string(1) ":"
|
||||
--> http://::# : string(1) ":"
|
||||
--> x://::6.5 : string(1) ":"
|
||||
--> http://?:/ : string(1) "?"
|
||||
--> http://@?:/ : string(1) "?"
|
||||
@ -117,8 +118,9 @@ echo "Done";
|
||||
--> http://@:/ : bool(false)
|
||||
--> http://:/ : bool(false)
|
||||
--> http://? : bool(false)
|
||||
--> http://# : bool(false)
|
||||
--> http://?: : bool(false)
|
||||
--> http://:? : bool(false)
|
||||
--> http://blah.com:123456 : bool(false)
|
||||
--> http://blah.com:abcdef : bool(false)
|
||||
Done
|
||||
Done
|
||||
|
@ -95,6 +95,7 @@ echo "Done";
|
||||
--> x:/blah.com : NULL
|
||||
--> x://::abc/? : bool(false)
|
||||
--> http://::? : NULL
|
||||
--> http://::# : NULL
|
||||
--> x://::6.5 : int(6)
|
||||
--> http://?:/ : NULL
|
||||
--> http://@?:/ : NULL
|
||||
@ -117,8 +118,9 @@ echo "Done";
|
||||
--> http://@:/ : bool(false)
|
||||
--> http://:/ : bool(false)
|
||||
--> http://? : bool(false)
|
||||
--> http://# : bool(false)
|
||||
--> http://?: : bool(false)
|
||||
--> http://:? : bool(false)
|
||||
--> http://blah.com:123456 : bool(false)
|
||||
--> http://blah.com:abcdef : bool(false)
|
||||
Done
|
||||
Done
|
||||
|
@ -95,6 +95,7 @@ echo "Done";
|
||||
--> x:/blah.com : NULL
|
||||
--> x://::abc/? : bool(false)
|
||||
--> http://::? : NULL
|
||||
--> http://::# : NULL
|
||||
--> x://::6.5 : NULL
|
||||
--> http://?:/ : NULL
|
||||
--> http://@?:/ : string(0) ""
|
||||
@ -117,8 +118,9 @@ echo "Done";
|
||||
--> http://@:/ : bool(false)
|
||||
--> http://:/ : bool(false)
|
||||
--> http://? : bool(false)
|
||||
--> http://# : bool(false)
|
||||
--> http://?: : bool(false)
|
||||
--> http://:? : bool(false)
|
||||
--> http://blah.com:123456 : bool(false)
|
||||
--> http://blah.com:abcdef : bool(false)
|
||||
Done
|
||||
Done
|
||||
|
@ -95,6 +95,7 @@ echo "Done";
|
||||
--> x:/blah.com : NULL
|
||||
--> x://::abc/? : bool(false)
|
||||
--> http://::? : NULL
|
||||
--> http://::# : NULL
|
||||
--> x://::6.5 : NULL
|
||||
--> http://?:/ : NULL
|
||||
--> http://@?:/ : NULL
|
||||
@ -117,8 +118,9 @@ echo "Done";
|
||||
--> http://@:/ : bool(false)
|
||||
--> http://:/ : bool(false)
|
||||
--> http://? : bool(false)
|
||||
--> http://# : bool(false)
|
||||
--> http://?: : bool(false)
|
||||
--> http://:? : bool(false)
|
||||
--> http://blah.com:123456 : bool(false)
|
||||
--> http://blah.com:abcdef : bool(false)
|
||||
Done
|
||||
Done
|
||||
|
@ -95,6 +95,7 @@ echo "Done";
|
||||
--> x:/blah.com : string(9) "/blah.com"
|
||||
--> x://::abc/? : bool(false)
|
||||
--> http://::? : NULL
|
||||
--> http://::# : NULL
|
||||
--> x://::6.5 : NULL
|
||||
--> http://?:/ : string(1) "/"
|
||||
--> http://@?:/ : string(1) "/"
|
||||
@ -117,8 +118,9 @@ echo "Done";
|
||||
--> http://@:/ : bool(false)
|
||||
--> http://:/ : bool(false)
|
||||
--> http://? : bool(false)
|
||||
--> http://# : bool(false)
|
||||
--> http://?: : bool(false)
|
||||
--> http://:? : bool(false)
|
||||
--> http://blah.com:123456 : bool(false)
|
||||
--> http://blah.com:abcdef : bool(false)
|
||||
Done
|
||||
Done
|
||||
|
@ -95,6 +95,7 @@ echo "Done";
|
||||
--> x:/blah.com : NULL
|
||||
--> x://::abc/? : bool(false)
|
||||
--> http://::? : NULL
|
||||
--> http://::# : NULL
|
||||
--> x://::6.5 : NULL
|
||||
--> http://?:/ : NULL
|
||||
--> http://@?:/ : NULL
|
||||
@ -117,8 +118,9 @@ echo "Done";
|
||||
--> http://@:/ : bool(false)
|
||||
--> http://:/ : bool(false)
|
||||
--> http://? : bool(false)
|
||||
--> http://# : bool(false)
|
||||
--> http://?: : bool(false)
|
||||
--> http://:? : bool(false)
|
||||
--> http://blah.com:123456 : bool(false)
|
||||
--> http://blah.com:abcdef : bool(false)
|
||||
Done
|
||||
Done
|
||||
|
@ -95,6 +95,7 @@ echo "Done";
|
||||
--> x:/blah.com : NULL
|
||||
--> x://::abc/? : bool(false)
|
||||
--> http://::? : NULL
|
||||
--> http://::# : NULL
|
||||
--> x://::6.5 : NULL
|
||||
--> http://?:/ : NULL
|
||||
--> http://@?:/ : NULL
|
||||
@ -117,8 +118,9 @@ echo "Done";
|
||||
--> http://@:/ : bool(false)
|
||||
--> http://:/ : bool(false)
|
||||
--> http://? : bool(false)
|
||||
--> http://# : bool(false)
|
||||
--> http://?: : bool(false)
|
||||
--> http://:? : bool(false)
|
||||
--> http://blah.com:123456 : bool(false)
|
||||
--> http://blah.com:abcdef : bool(false)
|
||||
Done
|
||||
Done
|
||||
|
@ -75,6 +75,7 @@ $urls = array(
|
||||
'x:/blah.com',
|
||||
'x://::abc/?',
|
||||
'http://::?',
|
||||
'http://::#',
|
||||
'x://::6.5',
|
||||
'http://?:/',
|
||||
'http://@?:/',
|
||||
@ -99,6 +100,7 @@ $urls = array(
|
||||
'http://@:/',
|
||||
'http://:/',
|
||||
'http://?',
|
||||
'http://#',
|
||||
'http://?:',
|
||||
'http://:?',
|
||||
'http://blah.com:123456',
|
||||
@ -106,4 +108,4 @@ $urls = array(
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user