Module:Unitest Scribunto/doc

From MediaWiki.org
Jump to navigation Jump to search

This is the documentation page for Module:Unitest Scribunto

  • This module run some tests about Scribunto or Lua.
  • unitest_wwwww : function giving environment to document other tests, Where When What We Work.
  • Wiki and page under test.
  • Mediawiki version and revision universal time.
  • Universal runtime and namespaces.
  • doctable_frame_args, doctable_frame, doctable_mw : functions to list the contents of tables
  • levelmaxi : parameter to limit the number of levels of sub-tables. (default 99)
  • exclude1 exclude2, exclude3 : parameters to exclude the sub-tables if exclude1... is in there names.

unitest_wwwww[edit]

{{#invoke:Unitest Scribunto | unitest_wwwww }}

Page tested = //www.mediawiki.org/wiki/Module:Unitest_Scribunto/doc
Mediawiki 1.33.0-wmf.4 (b34307c) - UTC revision time 2013-03-14 23:51:01 - Lua 5.1
Server runtime UTC 2018-11-16 20:31:42, namespace=Module

unitest[edit]

{{#invoke:Unitest Scribunto | unitest }}
* Init of unit tests. test_list = table
* Begin of unit tests :

Page tested = //www.mediawiki.org/wiki/Module:Unitest_Scribunto/doc
Mediawiki 1.33.0-wmf.4 (b34307c) - UTC revision time 2013-03-14 23:51:01 - Lua 5.1
Server runtime UTC 2018-11-16 20:31:42, namespace=Module
1 frame.args Test OK : frame.args.lastname = "error".
2 sub table write OK Test OK : sub table write OK. / / / result OKOK ; exec_ok=true ; value_ok=true ; var_tested=td.C.X ; value_before=xx ; value_after=okvalue ; A=aa ; Y=yy .
3 sub table write XX Test OK : sub table write OK. / / / result OKOK ; exec_ok=true ; value_ok=true ; var_tested=td.C.X ; value_before=okvalue ; value_after=okvalue ; A=aa ; Y=yy .
  • End of unit tests. Statistic count : Nerr=0 / Ntests=3

doctable_frame_args[edit]

{{#invoke:Unitest Scribunto | doctable_frame_args | exclude1=space }}

  • Content of the frame_args table, begin : levelmaxi=99 exclude1=space exclude2=nil exclude3=nil
  • Table .frame_args vars : string - exclude1 = space,
  • Table .frame_args no functions.
  • Table .frame_args no sub-tables.
  • Content of the frame_args table, end.

doctable_frame[edit]

{{#invoke:Unitest Scribunto | doctable_frame | levelmaxi=2 | exclude1=space }}

  • Content of the frame table, begin : levelmaxi=2 exclude1=space exclude2=nil exclude3=nil
  • Table .frame no vars.
  • Table .frame functions : newTemplateParserValue, getParent, argumentPairs, extensionTag, callParserFunction, preprocess, getTitle, newParserValue, expandTemplate, getArgument, newChild,
  • Table .frame tables list : args,
    • Table .frame.args vars : string - levelmaxi = 2, string - exclude1 = space,
    • Table .frame.args no functions.
    • Table .frame.args no sub-tables.
  • Content of the frame table, end.

doctable_mw without (name)space(s)[edit]

{{#invoke:Unitest Scribunto | doctable_mw | levelmaxi= | exclude1=space }}

  • Content of the mw table, begin : levelmaxi=99 exclude1=space exclude2=nil exclude3=nil
  • Table .mw no vars.
  • Table .mw functions : incrementExpensiveFunctionCount, log, addWarning, getLanguage, logObject, isSubsting, allToString, executeFunction, loadData, clone, dumpObject, getCurrentFrame, getContentLanguage,
  • Table .mw tables list : ext, hash, language, text, message, ustring, wikibase, site, title, uri, html,
    • Table .mw.ext no vars.
    • Table .mw.ext no functions.
    • Table .mw.ext tables list : TitleBlacklist, ParserFunctions, data,
      • Table .mw.ext.TitleBlacklist no vars.
      • Table .mw.ext.TitleBlacklist functions : test,
      • Table .mw.ext.TitleBlacklist no sub-tables.
      • Table .mw.ext.ParserFunctions no vars.
      • Table .mw.ext.ParserFunctions functions : expr,
      • Table .mw.ext.ParserFunctions no sub-tables.
      • Table .mw.ext.data no vars.
      • Table .mw.ext.data functions : get,
      • Table .mw.ext.data no sub-tables.
    • Table .mw.hash no vars.
    • Table .mw.hash functions : hashValue, listAlgorithms, setupInterface,
    • Table .mw.hash no sub-tables.
    • Table .mw.language no vars.
    • Table .mw.language functions : isValidCode, getFallbacksFor, isSupportedLanguage, new, fetchLanguageNames, isValidBuiltInCode, fetchLanguageName, isKnownLanguageTag, getContentLanguage,
    • Table .mw.language no sub-tables.
    • Table .mw.text vars : number - JSON_PRETTY = 4, number - JSON_PRESERVE_KEYS = 1, number - JSON_TRY_FIXING = 2,
    • Table .mw.text functions : listToText, gsplit, nowiki, encode, decode, jsonEncode, truncate, trim, killMarkers, tag, unstripNoWiki, split, jsonDecode, unstrip,
    • Table .mw.text no sub-tables.
    • Table .mw.message no vars.
    • Table .mw.message functions : numParam, getDefaultLanguage, rawParam, newFallbackSequence, newRawMessage, new,
    • Table .mw.message no sub-tables.
    • Table .mw.ustring vars : number - maxPatternLength = 10000, number - maxStringLength = 2097152,
    • Table .mw.ustring functions : byteoffset, isutf8, match, gmatch, toNFKD, upper, gsub, format, lower, sub, toNFKC, codepoint, rep, char, byte, len, find, gcodepoint, toNFC, toNFD,
    • Table .mw.ustring no sub-tables.
    • Table .mw.wikibase no vars.
    • Table .mw.wikibase functions : renderSnak, resolvePropertyId, description, label, formatValue, getEntity, getAllStatements, orderProperties, getLabel, getSitelink, getBestStatements, getEntityIdForTitle, formatValues, getLabelByLang, getEntityObject, getDescription, getEntityIdForCurrentPage, isValidEntityId, getLabelWithLang, getPropertyOrder, renderSnaks, entityExists, sitelink, getDescriptionWithLang, getEntityUrl, getReferencedEntityId,
    • Table .mw.wikibase tables list : entity,
      • Table .mw.wikibase.entity no vars.
      • Table .mw.wikibase.entity functions : create,
      • Table .mw.wikibase.entity tables list : claimRanks,
        • Table .mw.wikibase.entity.claimRanks vars : number - RANK_NORMAL = 1, number - RANK_DEPRECATED = 0, number - RANK_TRUTH = 3, number - RANK_PREFERRED = 2,
        • Table .mw.wikibase.entity.claimRanks no functions.
        • Table .mw.wikibase.entity.claimRanks no sub-tables.
    • Table .mw.site vars : string - siteName = MediaWiki, string - currentVersion = 1.33.0-wmf.4 (b34307c), string - scriptPath = /w, string - server = //www.mediawiki.org, string - stylePath = /w/skins,
    • Table .mw.site functions : interwikiMap,
    • Table .mw.site tables list : stats, talkNamespaces, namespaces, subjectNamespaces, contentNamespaces,
      • Table .mw.site.stats vars : number - articles = 37704, number - admins = 196, number - edits = 2882515, number - users = 15895690, number - files = 3882, number - pages = 702990, number - activeUsers = 1429,
      • Table .mw.site.stats functions : usersInGroup, pagesInCategory, pagesInNamespace,
      • Table .mw.site.stats no sub-tables.
    • Table .mw.title no vars.
    • Table .mw.title functions : makeTitle, compare, equals, getCurrentTitle, new,
    • Table .mw.title no sub-tables.
    • Table .mw.uri no vars.
    • Table .mw.uri functions : parseQueryString, encode, fullUrl, canonicalUrl, buildQueryString, anchorEncode, validate, localUrl, decode, new,
    • Table .mw.uri no sub-tables.
    • Table .mw.html no vars.
    • Table .mw.html functions : create,
    • Table .mw.html no sub-tables.
  • Content of the mw table, end.