Module:TrainingPages/testcases: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
changing to local stable index for testcases - may break a test |
||
Line 3: | Line 3: | ||
function p:test_trainingpages() |
function p:test_trainingpages() |
||
self:preprocess_equals_many('{{#invoke:TrainingPages|next_page|', '}}', { |
self:preprocess_equals_many('{{#invoke:TrainingPages|next_page|', '}}', { |
||
{ 'index= |
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/valuable contribution', 'Wikipedia:Training/For students/Editing topics' }, |
||
{ 'index= |
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/Editing topics', 'Wikipedia:Training/For students/Getting started 1' }, |
||
{ 'index= |
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/Citing sources', 'Wikipedia:Training/For students/Citing sources 2' } |
||
}) |
}) |
||
self:preprocess_equals_many('{{#invoke:TrainingPages|last_page|', '}}', { |
self:preprocess_equals_many('{{#invoke:TrainingPages|last_page|', '}}', { |
||
{ 'index= |
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/valuable contribution|defaultpage=Wikipedia:Training/header', 'Wikipedia:Training/header' }, |
||
{ 'index= |
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/Citing sources|defaultpage=Wikipedia:Training/header', 'Wikipedia:Training/For students/Text editing' }, |
||
{ ' |
{ 'Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/Where to get help|defaultpage=Wikipedia:Training/header', 'Wikipedia:Training/For students/Discussion' } |
||
}) |
}) |
||
self:preprocess_equals_many('{{#invoke:TrainingPages|main|', '}}', { |
self:preprocess_equals_many('{{#invoke:TrainingPages|main|', '}}', { |
||
{ 'index= |
{ 'index=Module talk:TrainingPages/testcases/index for testcases|displacement=5|page=Wikipedia:Training/For students/Citing sources|defaultpage=', 'Wikipedia:Training/For students/Sandbox edits for new articles' }, |
||
{ '#invoke:TrainingPages|main|index= |
{ '#invoke:TrainingPages|main|index=Module talk:TrainingPages/testcases/index for testcases|displacement=5|page=Wikipedia:Training/For students/Where to get help|defaultpage=', '' }, |
||
}) |
}) |
||
self:preprocess_equals_many('{{#invoke:TrainingPages|page_number|', '}}', { |
self:preprocess_equals_many('{{#invoke:TrainingPages|page_number|', '}}', { |
||
Line 21: | Line 21: | ||
}) |
}) |
||
self:preprocess_equals_many('{{#invoke:TrainingPages|main|', '}}', { |
self:preprocess_equals_many('{{#invoke:TrainingPages|main|', '}}', { |
||
{ 'index= |
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=1', 'Wikipedia:Training/For students/valuable contribution' } |
||
}) |
}) |
||
self:preprocess_equals_many('{{#invoke:TrainingPages|total_pages|', '}}', { |
self:preprocess_equals_many('{{#invoke:TrainingPages|total_pages|', '}}', { |
||
{ 'index= |
{ 'index=Module talk:TrainingPages/testcases/index for testcases ', '15' } |
||
}) |
}) |
||
end |
end |
Revision as of 16:17, 25 April 2013
![]() | This is the test cases page for the module Module:TrainingPages. Results of the test cases. |
local p = require('Module:UnitTests')
function p:test_trainingpages()
self:preprocess_equals_many('{{#invoke:TrainingPages|next_page|', '}}', {
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/valuable contribution', 'Wikipedia:Training/For students/Editing topics' },
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/Editing topics', 'Wikipedia:Training/For students/Getting started 1' },
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/Citing sources', 'Wikipedia:Training/For students/Citing sources 2' }
})
self:preprocess_equals_many('{{#invoke:TrainingPages|last_page|', '}}', {
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/valuable contribution|defaultpage=Wikipedia:Training/header', 'Wikipedia:Training/header' },
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/Citing sources|defaultpage=Wikipedia:Training/header', 'Wikipedia:Training/For students/Text editing' },
{ 'Module talk:TrainingPages/testcases/index for testcases|page=Wikipedia:Training/For students/Where to get help|defaultpage=Wikipedia:Training/header', 'Wikipedia:Training/For students/Discussion' }
})
self:preprocess_equals_many('{{#invoke:TrainingPages|main|', '}}', {
{ 'index=Module talk:TrainingPages/testcases/index for testcases|displacement=5|page=Wikipedia:Training/For students/Citing sources|defaultpage=', 'Wikipedia:Training/For students/Sandbox edits for new articles' },
{ '#invoke:TrainingPages|main|index=Module talk:TrainingPages/testcases/index for testcases|displacement=5|page=Wikipedia:Training/For students/Where to get help|defaultpage=', '' },
})
self:preprocess_equals_many('{{#invoke:TrainingPages|page_number|', '}}', {
{ 'index=Wikipedia:Training/For students/Nonexistent index|defaultpage=|noerr=yes', '' },
{ 'index=Wikipedia:Training/For students/Nonexistent index|defaultpage=', "[[Module:TrainingPages]] error (''index'' parameter):failed to access mw.title.new(Wikipedia:Training/For students/Nonexistent index):getContent() to load the index data" },
})
self:preprocess_equals_many('{{#invoke:TrainingPages|main|', '}}', {
{ 'index=Module talk:TrainingPages/testcases/index for testcases|page=1', 'Wikipedia:Training/For students/valuable contribution' }
})
self:preprocess_equals_many('{{#invoke:TrainingPages|total_pages|', '}}', {
{ 'index=Module talk:TrainingPages/testcases/index for testcases ', '15' }
})
end
return p