Difference between revisions of "Module:StringHelpers/doc"

From Data JW United
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
The functionality splits in the following examples: <br>
+
Module supports numbers with max 3 digits.
  
 +
= Tests =
  
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph150}} <br>
+
== Simple question ==
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph15}} <br>
+
{| class="wikitable"
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph7}}
+
|-
 +
! 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}}
 +
|}
  
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph7-10}}<br>
+
== Complex question ==
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph10-11}}<br>
+
 
Invoke: {{#invoke:stringHelpers|getParagraphFromQuestion|paragraph101-113}}
+
{| 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