Module:Annotated link/testcases: Difference between revisions

Content deleted Content added
simplify + tests for |quote=
+ tests for combinations of |abbr= |aka= |wedge= (a few more to go)
Line 120:
end
 
--[[ name, display and quoteabbr ]]
 
function p:quote__short_description_existsabbr__short_description_exists()
self:preprocess_equals('{{#invoke:AnnotatedLink|main|name=User:Fred Gandt/sandbox/explicit short description|displayabbr=Test page|quote=yesESD}}', '"TestUser:Fred Gandt/sandbox/explicit short description page"(ESD) – explicit short description')
end
 
function p:quote__short_description_does_not_existabbr__short_description_does_not_exist()
self:preprocess_equals('{{#invoke:AnnotatedLink|main|name=User:Fred Gandt/sandbox/no explicit short description|displayabbr=Test page|quote=yesESD}}', '"TestUser:Fred Gandt/sandbox/no explicit short description page"(NESD)')
end
 
--[[ name and aka ]]
 
function p:aka__short_description_exists()
self:preprocess_equals("{{#invoke:AnnotatedLink|main|name=User:Fred Gandt/sandbox/explicit short description|aka=Fred's test page}}", "User:Fred Gandt/sandbox/explicit short description, also known as Fred's test page – explicit short description")
end
 
function p:aka__short_description_does_not_exist()
self:preprocess_equals("{{#invoke:AnnotatedLink|main|name=User:Fred Gandt/sandbox/no explicit short description|aka=Fred's test page}}", "User:Fred Gandt/sandbox/no explicit short description, also known as Fred's test page")
end
 
--[[ name and wedge ]]
 
function p:wedge__short_description_exists()
self:preprocess_equals("{{#invoke:AnnotatedLink|main|name=User:Fred Gandt/sandbox/explicit short description|wedge=[[Tight Fit]]}}", "User:Fred Gandt/sandbox/explicit short description, Tight Fit – explicit short description")
end
 
function p:wedge__short_description_does_not_exist()
self:preprocess_equals("{{#invoke:AnnotatedLink|main|name=User:Fred Gandt/sandbox/no explicit short description|wedge=[[Tight Fit]]}}", "User:Fred Gandt/sandbox/no explicit short description, Tight Fit")
end
 
--[[ name, abbr and aka ]]
 
function p:abbr__aka__short_description_exists()
self:preprocess_equals("{{#invoke:AnnotatedLink|main|name=User:Fred Gandt/sandbox/explicit short description|abbr=ESD|aka=Fred's test page}}", "User:Fred Gandt/sandbox/explicit short description (ESD), also known as Fred's test page – explicit short description")
end
 
function p:abbr__aka__short_description_does_not_exist()
self:preprocess_equals("{{#invoke:AnnotatedLink|main|name=User:Fred Gandt/sandbox/no explicit short description|abbr=ESD|aka=Fred's test page}}", "User:Fred Gandt/sandbox/no explicit short description (NESD), also known as Fred's test page")
end
 
--[[ name, abbr and wedge ]]
 
--[[ name, abbr, aka and wedge ]]
 
--[[ name, aka and wedge ]]
 
 
 
--[[