Module:Marriage/testcases
Appearance
This is the test cases page for the module Module:Marriage. Results of the test cases. |
-- Unit tests for [[Module:{{ROOTPAGENAME}}]]. Click talk page to run tests.
local p = require('Module:UnitTests')
-- Example unit test.
function p:tests()
self:preprocess_equals('{{#invoke:Marriage | main | Name | 1910 | 1950 | end=divorced }}', 'Name ({{abbr|m.|married}} 1910; {{abbr|div.|divorced}} 1950)')
self:preprocess_equals('{{#invoke:Marriage | main | | 1910 | 1950 | end=divorced}}', '({{abbr|m.|married}} 1910; {{abbr|div.|divorced}} 1950)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | | 1950 | end=divorced}}', 'Name ({{abbr|div.|divorced}} 1950)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | 1910 | | end=}}', 'Name ({{abbr|m.|married}} 1910)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | 1910 | 1950 | }}', 'Name ({{abbr|m.|married}} 1910–1950)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | 1910 | | end=divorced}}', 'Name ({{abbr|m.|married}} 1910; {{abbr|div.|divorced}})')
self:preprocess_equals('{{#invoke:Marriage | main | | 1910 }}', '({{abbr|m.|married}} 1910)')
self:preprocess_equals('{{#invoke:Marriage | main | | | | }}', '')
self:preprocess_equals('{{#invoke:Marriage | main | Name | 1910 | 1950 | end }}', 'Name ({{abbr|m.|married}} 1910–1950)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | 1910 | 1950 | reason }}', 'Name ({{abbr|m.|married}} 1910–1950)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | | | reason=divorced }}', 'Name ({{abbr|div.|divorced}})')
self:preprocess_equals('{{#invoke:Marriage | main | | | | reason=divorced }}', '({{abbr|div.|divorced}})')
self:preprocess_equals('{{#invoke:Marriage | main | Name | 1910 | 1950 | end=died }}', 'Name ({{abbr|m.|married}} 1910; died 1950)')
self:preprocess_equals('{{#invoke:Marriage | main | | 1910 | 1950 | end=died}}', '({{abbr|m.|married}} 1910; died 1950)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | | 1950 | end=died}}', 'Name (died 1950)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | | 1950 | end=d.}}', 'Name (died 1950)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | | 1950 | end=d}}', 'Name (died 1950)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | 1910 | | end=}}', 'Name ({{abbr|m.|married}} 1910)')
self:preprocess_equals('{{#invoke:Marriage | main | Name | 1910 | | end=separated}}', 'Name ({{abbr|m.|married}} 1910; {{abbr|sep.|separated}})')
self:preprocess_equals('{{#invoke:Marriage | main | | | | reason=annulled}}', '({{abbr|ann.|annulled}})')
end
return p