释义 |
-- Example Unit tests for Country extract. Click talk page to run tests. local p = require('Module:UnitTests') function p:test() self:a_test('The Bahamas', 'BS') self:a_test('France', 'FR') self:a_test('United States', 'US') self:a_test('Saint Vincent and the Grenadines', 'VC') self:a_test('Virgin Islands of the United Kingdom', 'VG') self:a_test('Zimbabwe', 'ZW') self:a_test('The Germany', 'DE') self:a_test('the Poland', 'PL') self:a_test('Flag of Iceland', 'IS') self:a_test('Obscuritania', '') end function p:a_test(country, code) self:preprocess_equals('{{#invoke:Country extract | main | ' .. country .. '}}', code) self:preprocess_equals('{{#invoke:Country extract/sandbox | main | ' .. country .. '}}', code) end return p 1 : Wikipedia page with obscure country |