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 4, 2019
1 parent 4ace562 commit 41085cb
Show file tree
Hide file tree
Showing 5 changed files with 298 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,38 @@ GIVEN there is the term's alias "T4 Alias1" THEN it MUST be replaced with a link
GIVEN there is the term's alias "T4-Alias2" THEN it MUST be replaced with a link to the term's definition.
GIVEN there is the term's alias "T4.Alias3" THEN it MUST be replaced with a link to the term's definition.

## Alias substring behavior

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.

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.

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.

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.

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.

GIVEN a term "Friendship"
AND an alias "end" WHERE *the term* includes the alias
THEN the alias MUST be linked to the term, correctly.

## Unicode behavior

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

Given a term "Issue"
AND alias Issues
THEN occurrences of the alias MUST be linked with the terms definition.
42 changes: 38 additions & 4 deletions test/input/config-shared/aliases_and_synonyms/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,44 @@ AND the comment ends with a trailing comma
THEN this MUST NOT result in an infinite loop or out-of-memory error
as has been reported in #26

## Alias substring behavior

### Issue
<!-- Aliases: Issues -->
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.

### OUR
<!-- Aliases: FLOURISH -->
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.

### FIELD
<!-- Aliases: GREENFIELD -->
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.

### Hopefully
<!-- Aliases: Hope -->
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.

### Flower
<!-- Aliases: lower -->
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.

### Friendship
<!-- Aliases: end -->
GIVEN a term "Friendship"
AND an alias "end" WHERE *the term* includes the alias
THEN the alias MUST be linked to the term, correctly.


## Unicode Support

Expand All @@ -49,7 +87,3 @@ as has been reported in #26
GIVEN there is an HTML-single-line-comment beginning with 'Aliases:'
AND aliases contain unicode word characters
THEN they MUST still be separated correctly

## Issue
<!-- Aliases: Issues -->
Damit wird der Verstoß gegen eine SonarQube-Regel bezeichnet.
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,42 @@ 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.

GIVEN a term "[China][5]"
AND alias [中国zhōngguó][5]
AND alias [zhōngguó中国][5]
AND alias [中zhōngguó国][5]
AND alias [zhōng中国guó][5]
## Alias substring behavior

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][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][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][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][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][10]"
AND an alias "[end][10]" WHERE _the term_ includes the alias
THEN the alias MUST be linked to the term, correctly.

## Unicode behavior

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

Given a term "[Issue][6]"
AND alias [Issues][6]
THEN occurrences of the alias MUST be linked with the terms definition.

[1]: glossary.md#term-1 "GIVEN there is an HTML-single-line-comment beginning with 'Aliases:' THEN the
subsequent comma-separated words MUST be detected as the term's aliases."

Expand All @@ -43,8 +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]: glossary.md#china "GIVEN there is an HTML-single-line-comment beginning with 'Aliases:'
[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.'

[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.'

[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.'

[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.'

[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.'

[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.'

[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"

[6]: glossary.md#issue "Damit wird der Verstoß gegen eine SonarQube-Regel bezeichnet."
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,56 @@ AND the comment ends with a trailing comma
THEN this MUST NOT result in an infinite loop or out-of-memory error
as has been reported in #26

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

### [Issue](#issue)

<!-- Aliases: Issues -->

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.

### [OUR](#our)

<!-- Aliases: FLOURISH -->

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.

### [FIELD](#field)

<!-- Aliases: GREENFIELD -->

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.

### [Hopefully](#hopefully)

<!-- Aliases: Hope -->

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.

### [Flower](#flower)

<!-- Aliases: lower -->

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.

### [Friendship](#friendship)

<!-- Aliases: end -->

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

## [Unicode Support](#unicode-support)

### [China](#china)
Expand All @@ -60,7 +110,3 @@ as has been reported in #26
GIVEN there is an HTML-single-line-comment beginning with 'Aliases:'
AND aliases contain unicode word characters
THEN they MUST still be separated correctly

## [Issue](#issue)
<!-- Aliases: Issues -->
Damit wird der Verstoß gegen eine SonarQube-Regel bezeichnet.
Loading

0 comments on commit 41085cb

Please sign in to comment.