Module:Redirect/sandbox/testcases explained

-- Unit tests for . 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('','') self:preprocess_equals('', 'Wikipedia:Articles for creation') self:preprocess_equals('', 'Wikipedia:Articles for creation') self:preprocess_equals('', '') self:preprocess_equals('', '') self:preprocess_equals('', ' ') self:preprocess_equals('', '

<nowiki>[[Wikipedia:Articles for creation]] [[Wikipedia:Articles for deletion]]</nowiki>
') self:preprocess_equals('', '
<nowiki>== Standard ==\n[[Wikipedia:Articles for creation]], [[Wikipedia:Deletion review]], and [[Wikipedia: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 ==\n[[Wikipedia:Articles for deletion|spoil-funs]] [[wikt:test|test]]\n[[Space Cadet|  Going nowhere ]]\n[[Vacuum packing|   and redirected ]]</nowiki>
') self:preprocess_equals('', '
<nowiki>== Standard ==\n[[WP:AFC]], [[ WP:DRV ]], and [[Wikipedia: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 ==\n[[Wikipedia:Articles for deletion|spoil-funs]] [[wikt:test|test]]\n[[Space Cadet|  Going nowhere ]]\n[[Vacuum packing|   and redirected ]]</nowiki>
') self:preprocess_equals('', '
<nowiki>== Standard ==\n[[WP:AFC]], [[ WP:DRV ]], and [[Wikipedia: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 ==\n[[Wikipedia:Articles for deletion|spoil-funs]] [[wikt:test|test]]\n[[Space Cadet|  Going nowhere ]]\n[[Vacuum packing|   and redirected ]]</nowiki>
') self:preprocess_equals('', '
<nowiki>== Standard ==\n[[WP: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 ==\n[[Wikipedia:Articles for deletion|spoil-funs]] [[wikt:test|test]]\n[[Space Cadet|  Going nowhere ]]\n[[Vacuum packing|   and redirected ]]</nowiki>
') self:preprocess_equals('', '
<nowiki>== Standard ==\n[[WP:AFC]], [[ WP:DRV ]], and [[Wikipedia: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 ==\n[[WP:AFD|spoil-funs]] [[wikt:test|test]]\n[[   Space cadet   |  Going nowhere ]]\n[[   Vacuum packed   |   and redirected ]]</nowiki>
') self:preprocess_equals('', '
<nowiki>== Standard ==\n[[WP:AFC]], [[ WP:DRV ]], and [[Wikipedia:Articles for deletion|WP:AFD]]\n\n== Special characters that plague mw.ustring.gsub ==\n*[[Alien (franchise)|Weyland-Yutani]]\n*[[CO|Co.]]\n*[[Percent sign|%]]\n\n== Fun with pipes ==\n[[Wikipedia:Articles for deletion|spoil-funs]] [[wikt:test|test]]\n[[Space Cadet|  Going nowhere ]]\n[[Vacuum packing|   and redirected ]]</nowiki>
')endreturn p