Skip to content

Commit

Permalink
test: Additional unicode tests (moved)
Browse files Browse the repository at this point in the history
  • Loading branch information
about-code committed Sep 26, 2019
1 parent ab6ec64 commit 45ebb23
Show file tree
Hide file tree
Showing 14 changed files with 427 additions and 207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
{ "file": "./disjunct-terms-glossary-a.md", "termHint": " (a/b)"},
{ "file": "./disjunct-terms-glossary-b.md", "termHint": " (a/b)"},
{ "file": "./shared-terms-glossary-a.md", "termHint": " (a&b)"},
{ "file": "./shared-terms-glossary-b.md", "termHint": " (a&b)"}
{ "file": "./shared-terms-glossary-b.md", "termHint": " (a&b)"},
{ "file": "./unicode-glossary.md", "termHint": ""}
],
"linking": "relative",
"ignoreCase": false,
Expand Down
46 changes: 46 additions & 0 deletions test/input/features/config-glossaries/unicode-document.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!-- =========== DE ============= -->

GIVEN term 'äöüß Term begins with Umlauts'
THEN the linker MUST link the term with its glossary definition.

GIVEN term 'Term ends with Umlauts äöüß'
THEN the linker MUST link the term with its glossary definition.

GIVEN term 'Term contains äöüß Umlauts'
THEN the linker MUST link the term with its glossary definition.

GIVEN term 'Der Tod und das Mädchen'
THEN the linker MUST link the term with its glossary definition.

GIVEN term 'Äquator'
THEN the linker MUST link the term with its glossary definition.

GIVEN a compound term 'Äquatorregion' AND GIVEN 'Äquator' is a glossary term
THEN the linker MUST NOT link the compound with a glossary definition.

GIVEN a compound term 'Faßöl'
WITH 'Faß' being a glossary term
AND 'Faß' ending with a non-ASCII character
AND 'öl' beginning with a non-ASCII character
THEN 'Faßöl' MUST NOT be split into two words
AND 'Faßöl' MUST NOT be linked to the glossary definition of 'Faß'.

<!-- =========== ZH ============= -->

GIVEN a term '中国' with non-ASCII chinese symbols
THEN the linker MUST link the term with its glossary definition.

GIVEN a term 'zhōngguó' with non-ASCII symbols
THEN the linker MUST link the term with its glossary definition.

GIVEN a term '中国China' beginning with non-ASCII chinese symbols
THEN the linker MUST link the term with its glossary definition.

GIVEN a term 'China中国' ending with non-ASCII chinese symbols
THEN the linker MUST link the term with its glossary definition.

GIVEN a term '中China国' beginning and ending with non-ASCII chinese symbols
THEN the linker MUST link the term with its glossary definition.

GIVEN a term 'Chi中国na' containing non-ASCII chinese symbols
THEN the linker MUST link the term with its glossary definition.
54 changes: 54 additions & 0 deletions test/input/features/config-glossaries/unicode-glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Unicode Tests

<!-- =========== DE ============= -->

## äöüß Term begins with Umlauts

Testing German Umlauts.

## Term ends with Umlauts äöüß

Testing German Umlauts.

## Term contains äöüß Umlauts

Testing German Umlauts.

## Der Tod und das Mädchen

Classical composition by Franz Schubert (The Death and the Maiden).

## Äquator

GIVEN a compound term 'Äquatorregion' AND GIVEN 'Äquator' is a glossary term
THEN the linker MUST NOT link the compound with a glossary definition.

## Faß

GIVEN a compound term 'Faßöl'
WITH 'Faß' being a glossary term
AND 'Faß' ending with a non-ASCII character
AND 'öl' beginning with a non-ASCII character
THEN 'Faßöl' MUST NOT be split into two words
AND 'Faßöl' MUST NOT be linked to the glossary definition of 'Faß'.


<!-- =========== ZH ============= -->

## 中国
China

## zhōngguó
China (spelling)

## 中国China
Word begins with symbols

## China中国
Word ends with symbols

## 中China国
Word begins and ends with symbols

## Chi中国na
Word contains symbols
20 changes: 0 additions & 20 deletions test/input/features/i18n/document_de.md

This file was deleted.

26 changes: 0 additions & 26 deletions test/input/features/i18n/glossary_de.md

This file was deleted.

3 changes: 1 addition & 2 deletions test/input/glossarify-md.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
{ "file": "./glossary.md", "termHint": ""},
{ "file": "./glossary_formatted.md", "termHint": ""},
{ "file": "./paths/uppercase/Glossary_Uppercase.md" },
{ "file": "./features/aliases_and_synonyms/glossary.md" },
{ "file": "./features/i18n/glossary_de.md"}
{ "file": "./features/aliases_and_synonyms/glossary.md" }
],
"linking": "relative",
"ignoreCase": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
{ "file": "./disjunct-terms-glossary-a.md", "termHint": " (a/b)"},
{ "file": "./disjunct-terms-glossary-b.md", "termHint": " (a/b)"},
{ "file": "./shared-terms-glossary-a.md", "termHint": " (a&b)"},
{ "file": "./shared-terms-glossary-b.md", "termHint": " (a&b)"}
{ "file": "./shared-terms-glossary-b.md", "termHint": " (a&b)"},
{ "file": "./unicode-glossary.md", "termHint": ""}
],
"linking": "relative",
"ignoreCase": false,
Expand Down
192 changes: 192 additions & 0 deletions test/output-expected/features/config-glossaries/terms.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,116 @@
[
{
"shortDesc": "",
"term": "äöüß Term begins with Umlauts",
"hint": "",
"longDesc": "Testing German Umlauts.",
"anchor": "#äöüß-term-begins-with-umlauts",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "Äquator",
"hint": "",
"longDesc": "GIVEN a compound term 'Äquatorregion' AND GIVEN 'Äquator' is a glossary term\nTHEN the linker MUST NOT link the compound with a glossary definition.",
"anchor": "#äquator",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "China中国",
"hint": "",
"longDesc": "Word ends with symbols",
"anchor": "#china中国",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "Chi中国na",
"hint": "",
"longDesc": "Word contains symbols",
"anchor": "#chi中国na",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "Der Tod und das Mädchen",
"hint": "",
"longDesc": "Classical composition by Franz Schubert (The Death and the Maiden).",
"anchor": "#der-tod-und-das-mädchen",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "Faß",
"hint": "",
"longDesc": "GIVEN a compound term 'Faßöl'\nWITH 'Faß' being a glossary term AND 'Faß' ending with a non-ASCII character AND 'öl' beginning with a non-ASCII character\nTHEN 'Faßöl' MUST NOT be split into two words\nAND 'Faßöl' MUST NOT be linked to the glossary definition of 'Faß'.",
"anchor": "#faß",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "Term contains äöüß Umlauts",
"hint": "",
"longDesc": "Testing German Umlauts.",
"anchor": "#term-contains-äöüß-umlauts",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "Term Disjunct A",
Expand Down Expand Up @@ -31,6 +143,22 @@
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "Term ends with Umlauts äöüß",
"hint": "",
"longDesc": "Testing German Umlauts.",
"anchor": "#term-ends-with-umlauts-äöüß",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "Term Shared A",
Expand Down Expand Up @@ -94,5 +222,69 @@
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "zhōngguó",
"hint": "",
"longDesc": "China (spelling)",
"anchor": "#zhōngguó",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "中China国",
"hint": "",
"longDesc": "Word begins and ends with symbols",
"anchor": "#中china国",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "中国",
"hint": "",
"longDesc": "China",
"anchor": "#中国",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
},
{
"shortDesc": "",
"term": "中国China",
"hint": "",
"longDesc": "Word begins with symbols",
"anchor": "#中国china",
"glossary": {
"file": "./unicode-glossary.md",
"termHint": "",
"basePath": "/{redacted}/input/features/config-glossaries/unicode-glossary.md",
"outPath": "/{redacted}/output-actual/features/config-glossaries/unicode-glossary.md"
},
"regex": {},
"aliases": [],
"ignoreCase": false
}
]
Loading

0 comments on commit 45ebb23

Please sign in to comment.