Difference between revisions of "Module:StringHelpers/doc"

From Data JW United
Jump to navigation Jump to search
(Created page with "The functionality splits in the following examples: Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph150}} <br> Invoke: {{#invoke:stringHelpers|getParagraphFr...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
The functionality splits in the following examples:
+
Module supports numbers with max 3 digits.
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph150}} <br>
 
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph15}} <br>
 
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph7}}
 
  
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph7-10}}<br>
+
= Tests =
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph10-11}}<br>
+
 
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph101-113}}
+
== Simple question ==
 +
{| class="wikitable"
 +
|-
 +
! Expected !! Actual
 +
|-
 +
| 150 || {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph150}}
 +
|-
 +
| 15 || {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph15}}
 +
|-
 +
| 7 || {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph7}}
 +
|-
 +
| 150 || {{#invoke:stringHelpers|getParagraphFromQuestion|150}}
 +
|-
 +
| 15 || {{#invoke:stringHelpers|getParagraphFromQuestion|15}}
 +
|-
 +
| 7 || {{#invoke:stringHelpers|getParagraphFromQuestion|7}}
 +
|}
 +
 
 +
== Complex question ==
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Expected !! Actual
 +
|-
 +
| 6 || {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph6-7}}
 +
|-
 +
| 7 || {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph7-10}}
 +
|-
 +
| 10 || {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph10-11}}
 +
|-
 +
| 99 || {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph99-100}}
 +
|-
 +
| 101 || {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph101-113}}
 +
|-
 +
| 6 || {{#invoke:stringHelpers|getParagraphFromQuestion|6-7}}
 +
|-
 +
| 7|| {{#invoke:stringHelpers|getParagraphFromQuestion|7-10}}
 +
|-
 +
| 10 || {{#invoke:stringHelpers|getParagraphFromQuestion|10-11}}
 +
|-
 +
| 99 || {{#invoke:stringHelpers|getParagraphFromQuestion|99-110}}
 +
|-
 +
| 101 || {{#invoke:stringHelpers|getParagraphFromQuestion|101-113}}
 +
|}

Latest revision as of 18:18, 12 April 2020

Module supports numbers with max 3 digits.

Tests

Simple question

Expected Actual
150 150
15 15
7 7
150 150
15 15
7 7

Complex question

Expected Actual
6 6
7 7
10 10
99 99
101 101
6 6
7 7
10 10
99 99
101 101