4 * Tests for IEUrlExtension::findIE6Extension
6 class IEUrlExtensionTest
extends MediaWikiTestCase
{
7 function testSimple() {
10 IEUrlExtension
::findIE6Extension( 'x.y' ),
15 function testSimpleNoExt() {
18 IEUrlExtension
::findIE6Extension( 'x' ),
23 function testEmpty() {
26 IEUrlExtension
::findIE6Extension( '' ),
31 function testQuestionMark() {
34 IEUrlExtension
::findIE6Extension( '?' ),
39 function testExtQuestionMark() {
42 IEUrlExtension
::findIE6Extension( '.x?' ),
43 'Extension then question mark'
47 function testQuestionMarkExt() {
50 IEUrlExtension
::findIE6Extension( '?.x' ),
51 'Question mark then extension'
55 function testInvalidChar() {
58 IEUrlExtension
::findIE6Extension( '.x*' ),
59 'Extension with invalid character'
63 function testInvalidCharThenExtension() {
66 IEUrlExtension
::findIE6Extension( '*.x' ),
67 'Invalid character followed by an extension'
71 function testMultipleQuestionMarks() {
74 IEUrlExtension
::findIE6Extension( 'a?b?.c?.d?e?f' ),
75 'Multiple question marks'
79 function testExeException() {
82 IEUrlExtension
::findIE6Extension( 'a?b?.exe?.d?.e' ),
87 function testExeException2() {
90 IEUrlExtension
::findIE6Extension( 'a?b?.exe' ),
98 IEUrlExtension
::findIE6Extension( 'a#b.c' ),
99 'Hash character preceding extension'
103 function testHash2() {
106 IEUrlExtension
::findIE6Extension( 'a?#b.c' ),
107 'Hash character preceding extension 2'
111 function testDotAtEnd() {
114 IEUrlExtension
::findIE6Extension( '.' ),
115 'Dot at end of string'