Difference between revisions of "Module:Authority control/testcases"

From blackwiki
Jump to navigation Jump to search
blackwiki>Wnt
(From the doc, uses template for now...)
 
blackwiki>Wnt
m
Line 2: Line 2:
 
local p = require('Module:UnitTests')
 
local p = require('Module:UnitTests')
  
function p:test_hello()
+
function p:test_authority_control()
 
     self:preprocess_equals('{{Authority control |VIAF=59263727 |LCCN=n/79/113947 |ISNI=0000 0000 8138 6064 |GND=119408643 |BNF=13746617f |MBA=9dd93d09-24b4-41f1-a48b-ef48b07499c3}}', '??')
 
     self:preprocess_equals('{{Authority control |VIAF=59263727 |LCCN=n/79/113947 |ISNI=0000 0000 8138 6064 |GND=119408643 |BNF=13746617f |MBA=9dd93d09-24b4-41f1-a48b-ef48b07499c3}}', '??')
 
     self:preprocess_equals('{{Authority control |VIAF=66861474 |LCCN=n/87/142671 |ISNI=0000 0001 0911 2808 |GND=117421863 }} ', '??')
 
     self:preprocess_equals('{{Authority control |VIAF=66861474 |LCCN=n/87/142671 |ISNI=0000 0001 0911 2808 |GND=117421863 }} ', '??')

Revision as of 20:07, 17 November 2013

Documentation for this module may be created at Module:Authority control/testcases/doc

-- Example Unit tests for [[Module:Bananas]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_authority_control()
    self:preprocess_equals('{{Authority control |VIAF=59263727 |LCCN=n/79/113947 |ISNI=0000 0000 8138 6064 |GND=119408643 |BNF=13746617f |MBA=9dd93d09-24b4-41f1-a48b-ef48b07499c3}}', '??')
    self:preprocess_equals('{{Authority control |VIAF=66861474 |LCCN=n/87/142671 |ISNI=0000 0001 0911 2808 |GND=117421863 }} ', '??')
end

return p