Module:Interlinear/testcases/parameters
local p = require('Module:UnitTests')
function p:test_parameters_1()
-- Line 1: Glossing
self:preprocess_equals_preprocess("{{Interlinear|test.NOM}}", "{{Interlinear|italics1=no|glossing1=yes|test.NOM}}")
self:preprocess_equals("{{Interlinear|test.NOM}}", '<span style="margin: 0px;">test.<abbr class="gloss-abbr" title="nominative case" style="font-variant: small-caps; font-variant-numeric: oldstyle-nums; text-transform: lowercase; ">NOM</abbr></span>', {nowiki=1})
end
function p:test_parameters_2()
-- Line 1: Interlinear non-gloss
-- Line 2: Glossing
local test = "{{Interlinear|test|test.NOM}}"
self:preprocess_equals_preprocess(test, "{{Interlinear|test|test.NOM|}}")
self:preprocess_equals_preprocess(test, "{{Interlinear|italics1=yes|italics2=no|glossing1=no|glossing2=yes|test|test.NOM}}")
self:preprocess_equals_preprocess(test, "{{Interlinear|italics1=yes|italics2=no|glossing1=no|glossing2=yes|test|test.NOM|}}")
self:preprocess_equals(test, '<div class="interlinear"><div style="float: left; margin-bottom: 0.3em;margin-right: 1em;"><p style="margin: 0px;font-style: italic;">test</p><p style="margin: 0px;">test.<abbr class="gloss-abbr" title="nominative case" style="font-variant: small-caps; font-variant-numeric: oldstyle-nums; text-transform: lowercase; ">NOM</abbr></p></div><p style="display: none;">test</p><p style="display: none;">test.NOM</p><p></p><div style="clear: left; display: block;"></div>\n</div>', {nowiki=1})
end
function p:test_parameters_3()
-- Line 1: Interlinear non-gloss
-- Line 2: Glossing
-- Line 3: Free translation
local test1 = "{{Interlinear|test-ing|test.NOM-PROG|'testing'}}"
self:preprocess_equals_preprocess(test1, "{{Interlinear|italics1=yes|italics2=no|italics3=no|glossing1=no|glossing2=yes|glossing3=no|test-ing|test.NOM-PROG|'testing'}}")
self:preprocess_equals(test1, '<div class="interlinear"><div style="float: left; margin-bottom: 0.3em;margin-right: 1em;"><p style="margin: 0px;font-style: italic;">test-ing</p><p style="margin: 0px;">test.<abbr class="gloss-abbr" title="nominative case" style="font-variant: small-caps; font-variant-numeric: oldstyle-nums; text-transform: lowercase; ">NOM</abbr>-<abbr class="gloss-abbr" title="progressive aspect" style="font-variant: small-caps; font-variant-numeric: oldstyle-nums; text-transform: lowercase; ">PROG</abbr></p></div><p style="display: none;">test-ing</p><p style="display: none;">test.NOM-PROG</p><p style="clear: left;">\'testing\'</p><div style="clear: left; display: block;"></div>\n</div>', {nowiki=1})
-- Line 1: Interlinear non-gloss
-- Line 2: (N/A)
-- Line 3: Free translation
local test2 = "{{Interlinear|test-ing||'testing'}}"
self:preprocess_equals_preprocess(test2, "{{Interlinear|italics1=yes|italics2=no|italics3=no|glossing1=no|glossing2=yes|glossing3=no|test-ing||'testing'}}")
self:preprocess_equals(test2, '<div class="interlinear"><div style="float: left; margin-bottom: 0.3em;margin-right: 1em;"><p style="margin: 0px;font-style: italic;">test-ing</p></div><p style="display: none;">test-ing</p><p style="clear: left;">\'testing\'</p><div style="clear: left; display: block;"></div>\n</div>', {nowiki=1})
end
function p:test_parameters_4()
-- Line 1: Interlinear non-gloss (native orthography)
-- Line 2: Interlinear non-gloss (transliteration orthography)
-- Line 3: Glossing
-- Line 4: Free translation
local test = "{{Interlinear|тэст-иӈ|test-ing|test.NOM-PROG|'testing'}}"
self:preprocess_equals_preprocess(test, "{{Interlinear|italics1=yes|italics2=yes|italics3=no|italics4=no|glossing1=no|glossing2=no|glossing3=yes|glossing4=no|тэст-иӈ|test-ing|test.NOM-PROG|'testing'}}")
self:preprocess_equals(test, '<div class="interlinear"><div style="float: left; margin-bottom: 0.3em;margin-right: 1em;"><p style="margin: 0px;font-style: italic;">тэст-иӈ</p><p style="margin: 0px;font-style: italic;">test-ing</p><p style="margin: 0px;">test.<abbr class="gloss-abbr" title="nominative case" style="font-variant: small-caps; font-variant-numeric: oldstyle-nums; text-transform: lowercase; ">NOM</abbr>-<abbr class="gloss-abbr" title="progressive aspect" style="font-variant: small-caps; font-variant-numeric: oldstyle-nums; text-transform: lowercase; ">PROG</abbr></p></div><p style="display: none;">тэст-иӈ</p><p style="display: none;">test-ing</p><p style="display: none;">test.NOM-PROG</p><p style="clear: left;">\'testing\'</p><div style="clear: left; display: block;"></div>\n</div>', {nowiki=1})
end
return p
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.