From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by imported>Svgalbertian at 22:45, 1 September 2014 . The present address (URL) is a permanent link to this version.Revision as of 22:45, 1 September 2014 by imported>Svgalbertian (diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation
Jump to search
-- Example Unit tests for [[Module:Stock tickers/NYSE]]. Click talk page to run tests.
local p = require('Module:UnitTests')
-- Special URLs for preferred shares and when issued.
function p:test_preferred_shares()
self:preprocess_equals('{{#invoke:Stock tickers/NYSE | GetURL | PRE.PRD}}', 'https://www.nyse.com/quote/XNYS:PREpD')
self:preprocess_equals('{{#invoke:Stock tickers/NYSE | GetURL | BCS.PR}}', 'https://www.nyse.com/quote/XNYS:BCSp')
self:preprocess_equals('{{#invoke:Stock tickers/NYSE | GetURL | TPUB.WI}}', 'https://www.nyse.com/quote/XNYS:TPUBw')
end
function p:test_exchanges()
self:preprocess_equals('{{#invoke:Stock tickers/NYSE | GetURL | GE }}', 'https://www.nyse.com/quote/XNYS:GE')
self:preprocess_equals('{{#invoke:Stock tickers/NYSE | GetURL | GE | exchange=NYSE}}', 'https://www.nyse.com/quote/XNYS:GE')
self:preprocess_equals('{{#invoke:Stock tickers/NYSE | GetURL | BTI | exchange=AMEX}}', 'https://www.nyse.com/quote/XASE:BTI')
self:preprocess_equals('{{#invoke:Stock tickers/NYSE | GetURL | SPY | exchange=ARCA}}', 'https://www.nyse.com/quote/ARCX:SPY')
end
return p