Skip to content

Commit

Permalink
test: New baseline.
Browse files Browse the repository at this point in the history
  • Loading branch information
about-code committed Dec 19, 2019
1 parent e9485f2 commit d9a003d
Show file tree
Hide file tree
Showing 27 changed files with 146 additions and 485 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,39 @@ GIVEN there is the term's alias "[T4 Alias1][4]" THEN it MUST be replaced with a
GIVEN there is the term's alias "[T4-Alias2][4]" THEN it MUST be replaced with a link to the term's definition.
GIVEN there is the term's alias "[T4.Alias3][4]" THEN it MUST be replaced with a link to the term's definition.

## [Alias substring behavior][5]
## [Alias substring behavior](#alias-substring-behavior)

GIVEN a term "[Issue][6]"
AND an alias "[Issues][6]" WHERE _the alias_ begins with the term
GIVEN a term "[Issue][5]"
AND an alias "[Issues][5]" WHERE _the alias_ begins with the term
THEN the alias MUST still be linked to the term, correctly.

GIVEN a term "[OUR][7]"
AND an alias "[FLOURISH][7]" WHERE _the alias_ includes the term
GIVEN a term "[OUR][6]"
AND an alias "[FLOURISH][6]" WHERE _the alias_ includes the term
THEN the alias MUST still be linked to the term, correctly.

GIVEN a term "[FIELD][8]"
AND an alias "[GREENFIELD][8]" WHERE _the alias_ ends with the term
GIVEN a term "[FIELD][7]"
AND an alias "[GREENFIELD][7]" WHERE _the alias_ ends with the term
THEN the alias MUST still be linked to the term, correctly.

GIVEN a term "[Hopefully][9]"
AND an alias "[Hope][9]" WHERE _the term_ begins with the alias
GIVEN a term "[Hopefully][8]"
AND an alias "[Hope][8]" WHERE _the term_ begins with the alias
THEN the alias MUST still be linked to the term, correctly.

GIVEN a term "[Flower][10]"
AND an alias "[lower][10]" WHERE _the term_ ends with the alias
GIVEN a term "[Flower][9]"
AND an alias "[lower][9]" WHERE _the term_ ends with the alias
THEN the alias MUST still be linked to the term, correctly.

GIVEN a term "[Friendship][11]"
AND an alias "[end][11]" WHERE _the term_ includes the alias
GIVEN a term "[Friendship][10]"
AND an alias "[end][10]" WHERE _the term_ includes the alias
THEN the alias MUST be linked to the term, correctly.

## [Unicode behavior][12]
## [Unicode behavior](#unicode-behavior)

GIVEN a term "[China][13]"
AND alias [中国zhōngguó][13]
AND alias [zhōngguó中国][13]
AND alias [中zhōngguó国][13]
AND alias [zhōng中国guó][13]
GIVEN a term "[China][11]"
AND alias [中国zhōngguó][11]
AND alias [zhōngguó中国][11]
AND alias [中zhōngguó国][11]
AND alias [zhōng中国guó][11]
WITH aliases containing non-ASCII unicode characters
THEN all aliases MUST still be separated and linked correctly

Expand All @@ -67,34 +67,30 @@ subsequent comma-separated lines of words MUST be detected as the term's aliases
line THEN the subsequent comma-separated lines of words MUST be detected as the
term's aliases."

[5]: #alias-substring-behavior

[6]: glossary.md#issue 'GIVEN a term "Issue"
[5]: glossary.md#issue 'GIVEN a term "Issue"
AND an alias "Issues" WHERE the alias begins with the term
THEN the alias MUST still be linked to the term, correctly.'

[7]: glossary.md#our 'GIVEN a term "OUR"
[6]: glossary.md#our 'GIVEN a term "OUR"
AND an alias "FLOURISH" WHERE the alias includes the term
THEN the alias MUST still be linked to the term, correctly.'

[8]: glossary.md#field 'GIVEN a term "FIELD"
[7]: glossary.md#field 'GIVEN a term "FIELD"
AND an alias "GREENFIELD" WHERE the alias ends with the term
THEN the alias MUST still be linked to the term, correctly.'

[9]: glossary.md#hopefully 'GIVEN a term "Hopefully"
[8]: glossary.md#hopefully 'GIVEN a term "Hopefully"
AND an alias "Hope" WHERE the term begins with the alias
THEN the alias MUST still be linked to the term, correctly.'

[10]: glossary.md#flower 'GIVEN a term "Flower"
[9]: glossary.md#flower 'GIVEN a term "Flower"
AND an alias "lower" WHERE the term ends with the alias
THEN the alias MUST still be linked to the term, correctly.'

[11]: glossary.md#friendship 'GIVEN a term "Friendship"
[10]: glossary.md#friendship 'GIVEN a term "Friendship"
AND an alias "end" WHERE the term includes the alias
THEN the alias MUST be linked to the term, correctly.'

[12]: #unicode-behavior

[13]: glossary.md#china "GIVEN there is an HTML-single-line-comment beginning with 'Aliases:'
[11]: glossary.md#china "GIVEN there is an HTML-single-line-comment beginning with 'Aliases:'
AND aliases contain unicode word characters
THEN they MUST still be separated correctly"
4 changes: 1 addition & 3 deletions test/output-expected/config-shared/markdown/footnotes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [Markdown Extensions: Footnotes][1]
# [Markdown Extensions: Footnotes](#markdown-extensions-footnotes)

<!--
Footnotes are not yet part of CommonMark Spec
Expand All @@ -10,5 +10,3 @@ AND text with a footnote [^footnote]
THEN colons of the footnote definition prior to 'Footnote text' MUST NOT be converted to HTML entities.

[^footnote]: Footnote text.

[1]: #markdown-extensions-footnotes
28 changes: 7 additions & 21 deletions test/output-expected/config-shared/markdown/title.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
# [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.][1]
# [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.](#given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary)

## [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.][2]
## [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.](#given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-1)

### [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.][3]
### [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.](#given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-2)

#### [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.][4]
#### [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.](#given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-3)

##### [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.][5]
##### [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.](#given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-4)

# [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.][6]
# [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.](#given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-5)

## [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.][7]

[1]: #given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary

[2]: #given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-1

[3]: #given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-2

[4]: #given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-3

[5]: #given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-4

[6]: #given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-5

[7]: #given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-6
## [GIVEN a headline THEN "Lorem ipsum" MUST NOT be linked to glossary.](#given-a-headline-then-lorem-ipsum-must-not-be-linked-to-glossary-6)
88 changes: 37 additions & 51 deletions test/output-expected/config-shared/substring_behavior/document.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,55 @@
# [Substring Test Document][1]
# [Substring Test Document](#substring-test-document)

## [A][2]
## [A](#a)

GIVEN a term '[A][3]' WITH '[A][3]' being atomic
AND itself being substring of terms '[AB][4]' AND '[ABC][5]',
THEN '[A][3]' MUST be correctly linked to its definition of '[A][3]'
AND other terms MUST NOT be affected by the definition of '[A][3]'.
GIVEN a term '[A][1]' WITH '[A][1]' being atomic
AND itself being substring of terms '[AB][2]' AND '[ABC][3]',
THEN '[A][1]' MUST be correctly linked to its definition of '[A][1]'
AND other terms MUST NOT be affected by the definition of '[A][1]'.

## [AB][6]
## [AB](#ab)

GIVEN a term '[AB][4]' WITH another term '[A][3]' being substring of it,
AND itself being substring of '[ABC][5]'
THEN '[AB][4]' MUST be linked as a single term to its definition of '[AB][4]'
AND '[AB][4]' MUST NOT be split by a link to the definition of '[A][3]'.
GIVEN a term '[AB][2]' WITH another term '[A][1]' being substring of it,
AND itself being substring of '[ABC][3]'
THEN '[AB][2]' MUST be linked as a single term to its definition of '[AB][2]'
AND '[AB][2]' MUST NOT be split by a link to the definition of '[A][1]'.

## [ABC][7]
## [ABC](#abc)

GIVEN a term '[ABC][5]' WITH other terms '[AB][4]' AND '[A][3]' being substrings of it,
THEN '[ABC][5]' MUST be linked as a single term to its definition of '[ABC][5]'
AND '[ABC][5]' MUST NOT be split by a link to the definition of '[AB][4]'
AND '[ABC][5]' MUST NOT be split by a link to the definition of '[A][3]'
GIVEN a term '[ABC][3]' WITH other terms '[AB][2]' AND '[A][1]' being substrings of it,
THEN '[ABC][3]' MUST be linked as a single term to its definition of '[ABC][3]'
AND '[ABC][3]' MUST NOT be split by a link to the definition of '[AB][2]'
AND '[ABC][3]' MUST NOT be split by a link to the definition of '[A][1]'

## [Ä][8]
## [Ä]()

GIVEN a non-ASCII term '[Ä][9]' WITH '[Ä][9]' being atomic
AND itself being substring of terms ['ÄÖ'][10] AND ['ÄÖÜ'][11],
THEN '[Ä][9]' MUST be correctly linked to its definition of '[Ä][9]'
AND other terms MUST NOT be affected by the definition of '[Ä][9]'.
GIVEN a non-ASCII term '[Ä][4]' WITH '[Ä][4]' being atomic
AND itself being substring of terms ['ÄÖ'][5] AND ['ÄÖÜ'][6],
THEN '[Ä][4]' MUST be correctly linked to its definition of '[Ä][4]'
AND other terms MUST NOT be affected by the definition of '[Ä][4]'.

## [ÄÖ][12]
## [ÄÖ](#äö)

GIVEN a non-ASCII term ['ÄÖ'][10] WITH another term '[Ä][9]' being substring of it,
AND itself being substring of ['ÄÖÜ'][11]
THEN ['ÄÖ'][10] MUST be linked as a single term to its definition of ['ÄÖ'][10]
AND ['ÄÖ'][10] MUST NOT be split by a link to the definition of '[Ä][9]'.
GIVEN a non-ASCII term ['ÄÖ'][5] WITH another term '[Ä][4]' being substring of it,
AND itself being substring of ['ÄÖÜ'][6]
THEN ['ÄÖ'][5] MUST be linked as a single term to its definition of ['ÄÖ'][5]
AND ['ÄÖ'][5] MUST NOT be split by a link to the definition of '[Ä][4]'.

## [ÄÖÜ][13]
## [ÄÖÜ](#äöü)

GIVEN a non-ASCII term ['ÄÖÜ'][11] WITH other terms ['ÄÖ'][10] AND '[Ä][9]' being substrings of it,
THEN ['ÄÖÜ'][11] MUST be linked as a single term to its definition of ['ÄÖÜ'][11]
AND ['ÄÖÜ'][11] MUST NOT be split by a link to the definition of ['ÄÖ'][10]
AND ['ÄÖÜ'][11] MUST NOT be split by a link to the definition of '[Ä][9]'
GIVEN a non-ASCII term ['ÄÖÜ'][6] WITH other terms ['ÄÖ'][5] AND '[Ä][4]' being substrings of it,
THEN ['ÄÖÜ'][6] MUST be linked as a single term to its definition of ['ÄÖÜ'][6]
AND ['ÄÖÜ'][6] MUST NOT be split by a link to the definition of ['ÄÖ'][5]
AND ['ÄÖÜ'][6] MUST NOT be split by a link to the definition of '[Ä][4]'

[1]: #substring-test-document
[1]: glossary.md#a "GIVEN an atomic term 'A' WITH term 'A' being a substring of 'AB' and 'ABC'"

[2]: #a
[2]: glossary.md#ab "GIVEN a term 'AB' WITH term A being a substring of it and itself being substring of 'ABC'"

[3]: glossary.md#a "GIVEN an atomic term 'A' WITH term 'A' being a substring of 'AB' and 'ABC'"
[3]: glossary.md#abc "GIVEN a term 'ABC' WITH terms 'AB' and A being substrings of it"

[4]: glossary.md#ab "GIVEN a term 'AB' WITH term A being a substring of it and itself being substring of 'ABC'"
[4]: glossary.md#ä "GIVEN an atomic non-ASCII term 'Ä' WITH term 'Ä' being a substring of 'ÄÖ' and 'ÄÖÜ'"

[5]: glossary.md#abc "GIVEN a term 'ABC' WITH terms 'AB' and A being substrings of it"
[5]: glossary.md#äö "GIVEN a term 'ÄÖ' WITH term 'Ä' being a substring of it and itself being substring of 'ÄÖÜ'"

[6]: #ab

[7]: #abc

[8]:

[9]: glossary.md#ä "GIVEN an atomic non-ASCII term 'Ä' WITH term 'Ä' being a substring of 'ÄÖ' and 'ÄÖÜ'"

[10]: glossary.md#äö "GIVEN a term 'ÄÖ' WITH term 'Ä' being a substring of it and itself being substring of 'ÄÖÜ'"

[11]: glossary.md#äöü "GIVEN a term 'ÄÖÜ' WITH terms 'ÄÖ' and 'Ä' being substrings of it"

[12]: #äö

[13]: #äöü
[6]: glossary.md#äöü "GIVEN a term 'ÄÖÜ' WITH terms 'ÄÖ' and 'Ä' being substrings of it"
Loading

0 comments on commit d9a003d

Please sign in to comment.