Module:Redirect/sandbox/testcases

-- Unit tests for Module:Redirect. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_main self:preprocess_equals('', 'Wikipedia:Articles for creation') self:preprocess_equals('', 'Wikipedia:Articles for creation') self:preprocess_equals(, ) self:preprocess_equals('','Articles for creation') self:preprocess_equals('', 'Wikipedia:Articles for creation') self:preprocess_equals('', 'Wikipedia:Articles for creation') self:preprocess_equals('', 'Articles for creation') self:preprocess_equals('', 'Articles for creation') self:preprocess_equals('', 'Articles for creation Articles for deletion') self:preprocess_equals('', ' Articles for creation Articles for deletion  ') self:preprocess_equals('', ' == Standard ==\nArticles for creation, Deletion review, and Articles for deletion\n\n== Special characters that plague mw.ustring.gsub ==\n*Alien (franchise)\n*CO\n*Percent sign\n\n== Fun with pipes ==\nspoil-funs test\n  Going nowhere \n   and redirected   ') self:preprocess_equals('', ' == Standard ==\nWP:AFC,  WP:DRV, and Articles for deletion\n\n== Special characters that plague mw.ustring.gsub ==\n*Alien (franchise)\n*CO\n*Percent sign\n\n== Fun with pipes ==\nspoil-funs test\n  Going nowhere \n   and redirected   ') self:preprocess_equals('', ' == Standard ==\nWP:AFC,  WP:DRV, and Articles for deletion\n\n== Special characters that plague mw.ustring.gsub ==\n*Alien (franchise)\n*CO\n*Percent sign\n\n== Fun with pipes ==\nspoil-funs test\n  Going nowhere \n   and redirected   ') self:preprocess_equals('', ' == Standard ==\nWP:AFC,  WP:DRV, and WP:AFD\n\n== Special characters that plague mw.ustring.gsub ==\n*Weyland-Yutani\n*Co.\n*%\n\n== Fun with pipes ==\nspoil-funs test\n  Going nowhere \n   and redirected   ') self:preprocess_equals('', ' == Standard ==\nWP:AFC,  WP:DRV, and Articles for deletion\n\n== Special characters that plague mw.ustring.gsub ==\n*Alien (franchise)\n*CO\n*Percent sign\n\n== Fun with pipes ==\nspoil-funs test\n  Going nowhere \n   and redirected   ') self:preprocess_equals('', ' == Standard ==\nWP:AFC,  WP:DRV, and WP:AFD\n\n== Special characters that plague mw.ustring.gsub ==\n*Weyland-Yutani\n*Co.\n*%\n\n== Fun with pipes ==\nspoil-funs test\n  Going nowhere \n   and redirected   ') end return p