Index: trunk/phase3/tests/phpunit/includes/upload/UploadTest.php |
— | — | @@ -41,6 +41,16 @@ |
42 | 42 | 'A-B.jpg', UploadBase::OK, |
43 | 43 | 'upload title with colon' ); |
44 | 44 | |
| 45 | + /* Stripping leading File: prefix */ |
| 46 | + $this->assertUploadTitleAndCode( 'File:C.jpg', |
| 47 | + 'C.jpg', UploadBase::OK, |
| 48 | + 'upload title with File prefix' ); |
| 49 | + |
| 50 | + /* Test illegal suggested title (r94601) */ |
| 51 | + $this->assertUploadTitleAndCode( '%281%29.JPG', |
| 52 | + null, UploadBase::ILLEGAL_FILENAME, |
| 53 | + 'illegal title for upload' ); |
| 54 | + |
45 | 55 | /* A title without extension */ |
46 | 56 | $this->assertUploadTitleAndCode( 'A', |
47 | 57 | null, UploadBase::FILETYPE_MISSING, |