Module:Link with country/testcases: Difference between revisions
Appearance
Content deleted Content added
No edit summary Tag: Reverted |
|||
Line 15: | Line 15: | ||
self:preprocess_equals('{{#invoke:Link with country/sandbox | countrynames |Nazi Germany| property=P495 }}', 'Nazi Germany') |
self:preprocess_equals('{{#invoke:Link with country/sandbox | countrynames |Nazi Germany| property=P495 }}', 'Nazi Germany') |
||
self:preprocess_equals('{{#invoke:Link with country/sandbox | countrynames |United States of America, Peoples Republic of China, Nazi Germany| property=P495 }}', 'United States, China, Nazi Germany') |
self:preprocess_equals('{{#invoke:Link with country/sandbox | countrynames |United States of America, Peoples Republic of China, Nazi Germany| property=P495 }}', 'United States, China, Nazi Germany') |
||
end |
|||
function p:test_countrynames_xcompare() |
|||
self:preprocess_equals('{{#invoke:Link with country | countrynames |United States of America| property=P495 }}', '{{#invoke:Link with country/sandbox | countrynames |United States of America| property=P495 }}') |
|||
self:preprocess_equals('{{#invoke:Link with country | countrynames |Peoples Republic of China| property=P495 }}', 'China') |
|||
self:preprocess_equals('{{#invoke:Link with country | countrynames |Nazi Germany| property=P495 }}', 'Nazi Germany') |
|||
self:preprocess_equals('{{#invoke:Link with country | countrynames |United States of America, Peoples Republic of China, Nazi Germany| property=P495 }}', 'United States, China, Nazi Germany') |
|||
end |
end |
||
Latest revision as of 14:09, 20 May 2024
![]() | This is the test cases page for the module Module:Link with country. Results of the test cases. |
-- Unit tests for [[Module:Link with country]]. Click talk page to run tests.
local p = require('Module:UnitTests')
-- Example unit test.
function p:test_countrynames()
self:preprocess_equals('{{#invoke:Link with country | countrynames |United States of America| property=P495 }}', 'United States')
self:preprocess_equals('{{#invoke:Link with country | countrynames |Peoples Republic of China| property=P495 }}', 'China')
self:preprocess_equals('{{#invoke:Link with country | countrynames |Nazi Germany| property=P495 }}', 'Nazi Germany')
self:preprocess_equals('{{#invoke:Link with country | countrynames |United States of America, Peoples Republic of China, Nazi Germany| property=P495 }}', 'United States, China, Nazi Germany')
end
function p:test_countrynames_sandbox()
self:preprocess_equals('{{#invoke:Link with country/sandbox | countrynames |United States of America| property=P495 }}', 'United States')
self:preprocess_equals('{{#invoke:Link with country/sandbox | countrynames |Peoples Republic of China| property=P495 }}', 'China')
self:preprocess_equals('{{#invoke:Link with country/sandbox | countrynames |Nazi Germany| property=P495 }}', 'Nazi Germany')
self:preprocess_equals('{{#invoke:Link with country/sandbox | countrynames |United States of America, Peoples Republic of China, Nazi Germany| property=P495 }}', 'United States, China, Nazi Germany')
end
return p