From electowiki

This is a set of examples for testing Module:ABIF

get_data tests[edit | edit source]

Test 01get_data[edit | edit source]

see User:RobLa/ABIF/Tests2023September/01get_data

ABIF embedded in wikitext (in "User:RobLa/ABIF/Tests2023September"):

<abif set_id="01get_data">
24:  "蘇業"/5 > DGM/2 =  AM/2 > SBJ/1
Template invocation (from another page):

Result 01get_data[edit | edit source]

24: "蘇業"/5 > DGM/2 = AM/2 > SBJ/1

Test 02get_data[edit | edit source]

see User:RobLa/ABIF/Tests2023September/02get_data
ABIF embedded in wikitext (in "User:RobLa/ABIF/Tests2023September"):
<abif set_id="02get_data">
Template invocation (from another page):

Result 02get_data[edit | edit source]


parse_prefs_line tests[edit | edit source]

Test 03parse_prefs_line[edit | edit source]

see User:RobLa/ABIF/Tests2023September/03parse_prefs_line

Testing basic parsing of a prefs line in an .abif file

{{#invoke:ABIF|parse_prefs_line|line=24: "蘇業"/5 > DGM/2 = AM/2 > SBJ/1}}

Result 03parse_prefs_line[edit | edit source]


prefs_line_json tests[edit | edit source]

Test 04prefs_line_json[edit | edit source]

see User:RobLa/ABIF/Tests2023September/04prefs_line_json

Invocation 04prefs_line_json[edit | edit source]


Result 04prefs_line_json[edit | edit source]


Test 05prefs_line_json[edit | edit source]

see User:RobLa/ABIF/Tests2023September/05prefs line json

This test passes a valid prefline from an ABIF file, which should result in some pretty JSON (strcutured according the ".jabmod" schema)

Invocation 05prefs_line_json[edit | edit source]

{{#invoke:ABIF|prefs_line_json|line=24: "蘇業"/5 > DGM/2 = AM/2 > SBJ/1}}

Result 05prefs_line_json[edit | edit source]

{"prefs":[{"name":"\"蘇業\"","rating":5},{"name":" > DGM","rating":2},{"name":" = AM","rating":2},{"name":" > SBJ","rating":1}],"qty":24,"orderedlist":true}