From Wikipedia, the free encyclopedia

-- Unit tests for [[Module:{{ROOTPAGENAME}}]]. Click talk page to run tests.

local p = require('Module:UnitTests')



-- No parameters unit test

function p:test_01_noParams()

	self:preprocess_equals('{{LDS/sandbox}}', '[[s:Portal:Mormonism#LDS_Standard_Works_(Scriptures)|LDS Standard Works]]')

end



-- One parameter

function p:test_02_noParams2()

	self:preprocess_equals('{{LDS/sandbox|Display Text}}', '[[s:Portal:Mormonism#LDS_Standard_Works_(Scriptures)|Display Text]]')

end



-- Cite to book in Bible

function p:test_03_genesis()

	self:preprocess_equals('{{LDS/sandbox|Gen.|gen}}', '[[s:Bible (King James)/Genesis|Gen.]]')

end



-- Cite to (other) book in Bible #1

function p:test_04_sos1()

	self:preprocess_equals('{{LDS/sandbox|The Songs of Solomon|song}}', '[[s:Bible (King James)/Song of Solomon|The Songs of Solomon]]')

end



-- Cite to (other) book in Bible #2

function p:test_05_sos2()

	self:preprocess_equals('{{LDS/sandbox|Canticles|Song of Solomon}}', '[[s:Bible (King James)/Song of Solomon|Canticles]]')

end



-- Cite to Bible chapter #1

function p:test_06_num_3()

	self:preprocess_equals('{{LDS/sandbox|Num.|num|3}}', '[[s:Bible (King James)/Numbers#chapter_3|Num. 3]]')

end



-- Cite to Bible chapter #2

function p:test_07_1_kings_5()

	self:preprocess_equals('{{LDS/sandbox|1 Kuningad|1kgs|5}}', '[[s:Bible (King James)/1 Kings#chapter_5|1 Kuningad 5]]')

end



-- Cite to Bible chapter #3

function p:test_08_amos_2()

	self:preprocess_equals('{{LDS/sandbox|Amos (not Andy)|Amos|2}}', '[[s:Bible (King James)/Amos#chapter_2|Amos (not Andy) 2]]')

end



-- Cite to Bible verse #1

function p:test_09_gen_3_6()

	self:preprocess_equals('{{LDS/sandbox|Gen.|gen|3|6}}', '[[s:Bible (King James)/Genesis#3:6|Gen. 3:6]]')

end



-- Cite to Bible verse #2

function p:test_10_matt_5_20()

	self:preprocess_equals('{{LDS/sandbox|Matt.|Matthew|5|20}}', '[[s:Bible (King James)/Matthew#5:20|Matt. 5:20]]')

end



-- Cite to BoM book #1

function p:test_11_mormon()

	self:preprocess_equals('{{LDS/sandbox|Morm.|Mormon}}', '[[s:Book of Mormon (1981)/Mormon|Morm.]]')

end



-- Cite to BoM book #2

function p:test_12_enos()

	self:preprocess_equals('{{LDS/sandbox|Enos da Man|Enos}}', '[[s:Book of Mormon (1981)/Enos|Enos da Man]]')

end



-- Cite to BoM book #3

function p:test_13_1_ne()

	self:preprocess_equals('{{LDS/sandbox|Morm.|1 Nephi}}', '[[s:Book of Mormon (1981)/1 Nephi|Morm.]]')

end



-- Cite to BoM chapter #1

function p:test_14_2_ne_26()

	self:preprocess_equals('{{LDS/sandbox|2 Nyafi|2 Nephi|26}}', '[[s:Book of Mormon (1981)/2 Nephi#chapter_26|2 Nyafi 26]]')

end



-- Cite to BoM chapter #2

function p:test_15_alma_50()

	self:preprocess_equals('{{LDS/sandbox|Alma|alma|50}}', '[[s:Book of Mormon (1981)/Alma#chapter_50|Alma 50]]')

end



-- Cite to BoM verse #1

function p:test_16_2_ne_26_33()

	self:preprocess_equals('{{LDS/sandbox|2 Nyafi|2 Nephi|26|33}}', '[[s:Book of Mormon (1981)/2 Nephi#26:33|2 Nyafi 26:33]]')

end



-- Cite to D&C

function p:test_17_dc()

	self:preprocess_equals('{{LDS/sandbox|D&C|dc}}', '[[s:The Doctrine and Covenants|D&C]]')

end



-- Cite to D&C Section

function p:test_18_dc_88()

	self:preprocess_equals('{{LDS/sandbox|D&C|dc|88}}', '[[s:The Doctrine and Covenants/Section 88|D&C 88]]')

end



-- Cite to D&C verse

function p:test_19_dc_88_6()

	self:preprocess_equals('{{LDS/sandbox|D&C|dc|88|6}}', '[[s:The Doctrine and Covenants/Section 88#6|D&C 88:6]]')

end



-- Cite to PoGP book 1

function p:test_20_jst_matthew()

	self:preprocess_equals('{{LDS/sandbox|JST Matthew|jst-matt}}', '[[s:The Pearl of Great Price (1913)/Matthew|JST Matthew]]')

end



-- Cite to PoGP book 2

function p:test_21_abraham()

	self:preprocess_equals('{{LDS/sandbox|Avraham (Gileadi)|abr}}', '[[s:The Pearl of Great Price (1913)/Abraham|Avraham (Gileadi)]]')

end



-- Cite to PoGP book 3

function p:test_22_moses()

	self:preprocess_equals('{{LDS/sandbox|Moses|moses}}', '[[s:The Pearl of Great Price (1913)/Moses|Moses]]')

end



-- Cite to PoGP book 4

function p:test_23_history()

	self:preprocess_equals('{{LDS/sandbox|JS History|History}}', '[[s:The Pearl of Great Price (1913)/History|JS History]]')

end



-- Cite to PoGP book 5

function p:test_24_aof()

	self:preprocess_equals('{{LDS/sandbox|AoF|aoff}}', '[[s:The Pearl of Great Price (1913)/Articles of Faith|AoF]]')

end



-- Cite to PoGP chapter 1

function p:test_25_moses_2()

	self:preprocess_equals('{{LDS/sandbox|Moses|moses|2}}', '[[s:The Pearl of Great Price (1913)/Moses#chapter_2|Moses 2]]') -- This assumes that PoGP chapter bookmarks get standardized

end



-- Cite to PoGP chapter 2

function p:test_26_abraham_3()

	self:preprocess_equals('{{LDS/sandbox|Abr.|Abraham|3}}', '[[s:The Pearl of Great Price (1913)/Abraham#chapter_3|Abr. 3]]') -- This assumes that PoGP chapter bookmarks get standardized

end



-- Cite to PoGP chapter 3

function p:test_27_aof_1()

	self:preprocess_equals('{{LDS/sandbox|AoF|aoff|1}}', '[[s:The Pearl of Great Price (1913)/Articles of Faith#chapter_1|AoF 1]]') -- This assumes that PoGP chapter bookmarks get standardized

end



-- Cite to PoGP chapter 4

function p:test_28_jst_matthew_1()

	self:preprocess_equals('{{LDS/sandbox|JS Matthew|jsm|1}}', '[[s:The Pearl of Great Price (1913)/Matthew#chapter_1|JS Matthew 1]]') -- This assumes that PoGP chapter bookmarks get standardized

end



-- Cite to PoGP chapter 5

function p:test_29_js_history_1()

	self:preprocess_equals('{{LDS/sandbox|JS Hist.|jsh|1}}', '[[s:The Pearl of Great Price (1913)/History#chapter_1|JS Hist. 1]]') -- This assumes that PoGP chapter bookmarks get standardized

end



-- Cite to PoGP verse 1

function p:test_30_moses_3_8()

	self:preprocess_equals('{{LDS/sandbox|Moses|moses|3|8}}', '[[s:The Pearl of Great Price (1913)/Moses#3:8|Moses 3:8]]')

end



-- Cite to PoGP verse 2

function p:test_31_abraham_3_8()

	self:preprocess_equals('{{LDS/sandbox|Abr.|Abraham|3|8}}', '[[s:The Pearl of Great Price (1913)/Abraham#3:8|Abr. 3:8]]')

end



-- Cite to PoGP verse 3

function p:test_32_jst_matthew_26()

	self:preprocess_equals('{{LDS/sandbox|JST Matthew|jst-matt|1|26}}', '[[s:The Pearl of Great Price (1913)/Matthew#1:26|JST Matthew 1:26]]')

end



-- Cite to PoGP verse 4

function p:test_33_jst_hist_16()

	self:preprocess_equals('{{LDS/sandbox|JST Historia|js-hist|1|16}}', '[[s:The Pearl of Great Price (1913)/History#1:16|JST Historia 1:16]]')

end



-- Cite to PoGP verse 5

function p:test_34_aof_11()

	self:preprocess_equals('{{LDS/sandbox|Articles o\' Faith|Articles of Faith|1|11}}', '[[s:The Pearl of Great Price (1913)/Articles of Faith#1:11|Articles o\' Faith 1:11]]')

end



-- weird spacing issues

function p:test_35_spacing_1()

	self:preprocess_equals('{{LDS/sandbox |Alma |alma |7 |11 }}', '[[s:Book of Mormon (1981)/Alma#7:11|Alma 7:11]]')

end



-- weird spacing issues

function p:test_36_spacing_2()

	self:preprocess_equals('{{LDS/sandbox |  Mos. | mosiah |  4 |  16 }}', '[[s:Book of Mormon (1981)/Mosiah#4:16|Mos. 4:16]]')

end



-- range of verses

function p:test_37_range_1()

	self:preprocess_equals('{{LDS/sandbox|Doctrine + Covenants|dc|128|19|22}}', '[[s:The Doctrine and Covenants/Section 128#19|Doctrine + Covenants 128:19–22]]')

end



-- range of verses

function p:test_38_range_2()

	self:preprocess_equals('{{LDS/sandbox|Doctrine + Covenants|dc|128|19|–22, 24|||x}}', '[[s:The Doctrine and Covenants/Section 128#19|Doctrine + Covenants 128:19–22, 24]]')

end



return p
From Wikipedia, the free encyclopedia

-- Unit tests for [[Module:{{ROOTPAGENAME}}]]. Click talk page to run tests.

local p = require('Module:UnitTests')



-- No parameters unit test

function p:test_01_noParams()

	self:preprocess_equals('{{LDS/sandbox}}', '[[s:Portal:Mormonism#LDS_Standard_Works_(Scriptures)|LDS Standard Works]]')

end



-- One parameter

function p:test_02_noParams2()

	self:preprocess_equals('{{LDS/sandbox|Display Text}}', '[[s:Portal:Mormonism#LDS_Standard_Works_(Scriptures)|Display Text]]')

end



-- Cite to book in Bible

function p:test_03_genesis()

	self:preprocess_equals('{{LDS/sandbox|Gen.|gen}}', '[[s:Bible (King James)/Genesis|Gen.]]')

end



-- Cite to (other) book in Bible #1

function p:test_04_sos1()

	self:preprocess_equals('{{LDS/sandbox|The Songs of Solomon|song}}', '[[s:Bible (King James)/Song of Solomon|The Songs of Solomon]]')

end



-- Cite to (other) book in Bible #2

function p:test_05_sos2()

	self:preprocess_equals('{{LDS/sandbox|Canticles|Song of Solomon}}', '[[s:Bible (King James)/Song of Solomon|Canticles]]')

end



-- Cite to Bible chapter #1

function p:test_06_num_3()

	self:preprocess_equals('{{LDS/sandbox|Num.|num|3}}', '[[s:Bible (King James)/Numbers#chapter_3|Num. 3]]')

end



-- Cite to Bible chapter #2

function p:test_07_1_kings_5()

	self:preprocess_equals('{{LDS/sandbox|1 Kuningad|1kgs|5}}', '[[s:Bible (King James)/1 Kings#chapter_5|1 Kuningad 5]]')

end



-- Cite to Bible chapter #3

function p:test_08_amos_2()

	self:preprocess_equals('{{LDS/sandbox|Amos (not Andy)|Amos|2}}', '[[s:Bible (King James)/Amos#chapter_2|Amos (not Andy) 2]]')

end



-- Cite to Bible verse #1

function p:test_09_gen_3_6()

	self:preprocess_equals('{{LDS/sandbox|Gen.|gen|3|6}}', '[[s:Bible (King James)/Genesis#3:6|Gen. 3:6]]')

end



-- Cite to Bible verse #2

function p:test_10_matt_5_20()

	self:preprocess_equals('{{LDS/sandbox|Matt.|Matthew|5|20}}', '[[s:Bible (King James)/Matthew#5:20|Matt. 5:20]]')

end



-- Cite to BoM book #1

function p:test_11_mormon()

	self:preprocess_equals('{{LDS/sandbox|Morm.|Mormon}}', '[[s:Book of Mormon (1981)/Mormon|Morm.]]')

end



-- Cite to BoM book #2

function p:test_12_enos()

	self:preprocess_equals('{{LDS/sandbox|Enos da Man|Enos}}', '[[s:Book of Mormon (1981)/Enos|Enos da Man]]')

end



-- Cite to BoM book #3

function p:test_13_1_ne()

	self:preprocess_equals('{{LDS/sandbox|Morm.|1 Nephi}}', '[[s:Book of Mormon (1981)/1 Nephi|Morm.]]')

end



-- Cite to BoM chapter #1

function p:test_14_2_ne_26()

	self:preprocess_equals('{{LDS/sandbox|2 Nyafi|2 Nephi|26}}', '[[s:Book of Mormon (1981)/2 Nephi#chapter_26|2 Nyafi 26]]')

end



-- Cite to BoM chapter #2

function p:test_15_alma_50()

	self:preprocess_equals('{{LDS/sandbox|Alma|alma|50}}', '[[s:Book of Mormon (1981)/Alma#chapter_50|Alma 50]]')

end



-- Cite to BoM verse #1

function p:test_16_2_ne_26_33()

	self:preprocess_equals('{{LDS/sandbox|2 Nyafi|2 Nephi|26|33}}', '[[s:Book of Mormon (1981)/2 Nephi#26:33|2 Nyafi 26:33]]')

end



-- Cite to D&C

function p:test_17_dc()

	self:preprocess_equals('{{LDS/sandbox|D&C|dc}}', '[[s:The Doctrine and Covenants|D&C]]')

end



-- Cite to D&C Section

function p:test_18_dc_88()

	self:preprocess_equals('{{LDS/sandbox|D&C|dc|88}}', '[[s:The Doctrine and Covenants/Section 88|D&C 88]]')

end



-- Cite to D&C verse

function p:test_19_dc_88_6()

	self:preprocess_equals('{{LDS/sandbox|D&C|dc|88|6}}', '[[s:The Doctrine and Covenants/Section 88#6|D&C 88:6]]')

end



-- Cite to PoGP book 1

function p:test_20_jst_matthew()

	self:preprocess_equals('{{LDS/sandbox|JST Matthew|jst-matt}}', '[[s:The Pearl of Great Price (1913)/Matthew|JST Matthew]]')

end



-- Cite to PoGP book 2

function p:test_21_abraham()

	self:preprocess_equals('{{LDS/sandbox|Avraham (Gileadi)|abr}}', '[[s:The Pearl of Great Price (1913)/Abraham|Avraham (Gileadi)]]')

end



-- Cite to PoGP book 3

function p:test_22_moses()

	self:preprocess_equals('{{LDS/sandbox|Moses|moses}}', '[[s:The Pearl of Great Price (1913)/Moses|Moses]]')

end



-- Cite to PoGP book 4

function p:test_23_history()

	self:preprocess_equals('{{LDS/sandbox|JS History|History}}', '[[s:The Pearl of Great Price (1913)/History|JS History]]')

end



-- Cite to PoGP book 5

function p:test_24_aof()

	self:preprocess_equals('{{LDS/sandbox|AoF|aoff}}', '[[s:The Pearl of Great Price (1913)/Articles of Faith|AoF]]')

end



-- Cite to PoGP chapter 1

function p:test_25_moses_2()

	self:preprocess_equals('{{LDS/sandbox|Moses|moses|2}}', '[[s:The Pearl of Great Price (1913)/Moses#chapter_2|Moses 2]]') -- This assumes that PoGP chapter bookmarks get standardized

end



-- Cite to PoGP chapter 2

function p:test_26_abraham_3()

	self:preprocess_equals('{{LDS/sandbox|Abr.|Abraham|3}}', '[[s:The Pearl of Great Price (1913)/Abraham#chapter_3|Abr. 3]]') -- This assumes that PoGP chapter bookmarks get standardized

end



-- Cite to PoGP chapter 3

function p:test_27_aof_1()

	self:preprocess_equals('{{LDS/sandbox|AoF|aoff|1}}', '[[s:The Pearl of Great Price (1913)/Articles of Faith#chapter_1|AoF 1]]') -- This assumes that PoGP chapter bookmarks get standardized

end



-- Cite to PoGP chapter 4

function p:test_28_jst_matthew_1()

	self:preprocess_equals('{{LDS/sandbox|JS Matthew|jsm|1}}', '[[s:The Pearl of Great Price (1913)/Matthew#chapter_1|JS Matthew 1]]') -- This assumes that PoGP chapter bookmarks get standardized

end



-- Cite to PoGP chapter 5

function p:test_29_js_history_1()

	self:preprocess_equals('{{LDS/sandbox|JS Hist.|jsh|1}}', '[[s:The Pearl of Great Price (1913)/History#chapter_1|JS Hist. 1]]') -- This assumes that PoGP chapter bookmarks get standardized

end



-- Cite to PoGP verse 1

function p:test_30_moses_3_8()

	self:preprocess_equals('{{LDS/sandbox|Moses|moses|3|8}}', '[[s:The Pearl of Great Price (1913)/Moses#3:8|Moses 3:8]]')

end



-- Cite to PoGP verse 2

function p:test_31_abraham_3_8()

	self:preprocess_equals('{{LDS/sandbox|Abr.|Abraham|3|8}}', '[[s:The Pearl of Great Price (1913)/Abraham#3:8|Abr. 3:8]]')

end



-- Cite to PoGP verse 3

function p:test_32_jst_matthew_26()

	self:preprocess_equals('{{LDS/sandbox|JST Matthew|jst-matt|1|26}}', '[[s:The Pearl of Great Price (1913)/Matthew#1:26|JST Matthew 1:26]]')

end



-- Cite to PoGP verse 4

function p:test_33_jst_hist_16()

	self:preprocess_equals('{{LDS/sandbox|JST Historia|js-hist|1|16}}', '[[s:The Pearl of Great Price (1913)/History#1:16|JST Historia 1:16]]')

end



-- Cite to PoGP verse 5

function p:test_34_aof_11()

	self:preprocess_equals('{{LDS/sandbox|Articles o\' Faith|Articles of Faith|1|11}}', '[[s:The Pearl of Great Price (1913)/Articles of Faith#1:11|Articles o\' Faith 1:11]]')

end



-- weird spacing issues

function p:test_35_spacing_1()

	self:preprocess_equals('{{LDS/sandbox |Alma |alma |7 |11 }}', '[[s:Book of Mormon (1981)/Alma#7:11|Alma 7:11]]')

end



-- weird spacing issues

function p:test_36_spacing_2()

	self:preprocess_equals('{{LDS/sandbox |  Mos. | mosiah |  4 |  16 }}', '[[s:Book of Mormon (1981)/Mosiah#4:16|Mos. 4:16]]')

end



-- range of verses

function p:test_37_range_1()

	self:preprocess_equals('{{LDS/sandbox|Doctrine + Covenants|dc|128|19|22}}', '[[s:The Doctrine and Covenants/Section 128#19|Doctrine + Covenants 128:19–22]]')

end



-- range of verses

function p:test_38_range_2()

	self:preprocess_equals('{{LDS/sandbox|Doctrine + Covenants|dc|128|19|–22, 24|||x}}', '[[s:The Doctrine and Covenants/Section 128#19|Doctrine + Covenants 128:19–22, 24]]')

end



return p

Videos

Youtube | Vimeo | Bing

Websites

Google | Yahoo | Bing

Encyclopedia

Google | Yahoo | Bing

Facebook