Module:Unitest Scribunto/doc: Difference between revisions

From Guild of Archivists
m (1 revision imported)
 
(No difference)

Latest revision as of 07:26, 30 October 2015

  • 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 = https://archive.guildofarchivists.org/wiki/Module:Unitest_Scribunto/doc
Mediawiki 1.39.7 - UTC revision time 2015-10-30 07:26:39 - Lua 5.1
Server runtime UTC 2024-05-17 03:15:17, namespace=Module

unitest[edit]

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

Page tested = https://archive.guildofarchivists.org/wiki/Module:Unitest_Scribunto/doc
Mediawiki 1.39.7 - UTC revision time 2015-10-30 07:26:39 - Lua 5.1
Server runtime UTC 2024-05-17 03:15:17, 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, addWarning, getLanguage, getCurrentFrame, loadJsonData, allToString, executeFunction, logObject, loadData, clone, isSubsting, dumpObject, log, getContentLanguage,
  • Table .mw tables list : ext, smw, hash, title, uri, text, language, message, site, ustring, html,
    • Table .mw.ext no vars.
    • Table .mw.ext no functions.
    • Table .mw.ext tables list : TitleBlacklist, ParserFunctions, cargo,
      • 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.cargo no vars.
      • Table .mw.ext.cargo functions : declare, formatTable, store, query,
      • Table .mw.ext.cargo no sub-tables.
    • Table .mw.smw no vars.
    • Table .mw.smw functions : subobject, ask, info, set, getPropertyType, getQueryResult,
    • Table .mw.smw no sub-tables.
    • Table .mw.hash no vars.
    • Table .mw.hash functions : hashValue, listAlgorithms, setupInterface,
    • Table .mw.hash 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.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.language no vars.
    • Table .mw.language functions : isValidCode, getFallbacksFor, isSupportedLanguage, new, fetchLanguageNames, isValidBuiltInCode, fetchLanguageName, isKnownLanguageTag, getContentLanguage,
    • Table .mw.language 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.site vars : string - siteName = Guild of Archivists, string - currentVersion = 1.39.7, string - scriptPath = /w, string - server = https://archive.guildofarchivists.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 = 2503, number - admins = 2, number - edits = 22814, number - users = 27798, number - files = 844, number - pages = 7520, number - activeUsers = 931,
      • Table .mw.site.stats functions : usersInGroup, pagesInCategory, pagesInNamespace,
      • Table .mw.site.stats 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.html no vars.
    • Table .mw.html functions : create,
    • Table .mw.html no sub-tables.
  • Content of the mw table, end.