Skip to content

Commit

Permalink
Merge a549c7d into 0ce6c49
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislaw committed Aug 4, 2020
2 parents 0ce6c49 + a549c7d commit 256bc83
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
@@ -0,0 +1,15 @@
active: true
derived: false
header: ''
level: 1.5
links:
- REQ001: 35ed54323e3054c33ae5545fffdbbbf5
normative: true
ref: ''
references:
- keyword: français
path: files/text.txt
type: file
reviewed: c442316131ca0225595ae257f3b4583d
text: |
Hello, world!
@@ -0,0 +1 @@
français
20 changes: 20 additions & 0 deletions doorstop/core/tests/test_reference_finder.py
Expand Up @@ -56,6 +56,26 @@ def test_find_file_reference_with_keyword(self):
self.assertEqual(path, os.path.join('files', 'REQ006.yml'))
self.assertEqual(line, 10)

def test_find_file_reference_with_utf8_keyword(self):
reference_path = "test_fixtures/001-item-references-utf8-keyword/REQ-UTF8.yml"
root = TESTS_ROOT
tree = Mock()
tree.vcs = WorkingCopy(TESTS_ROOT)
item_path = "NOT-RELEVANT-FOR-THE-TEST"

reference_finder = ReferenceFinder()
path, line = reference_finder.find_file_reference(
reference_path, root, tree, item_path, 'français'
)

self.assertEqual(
path,
os.path.join(
'test_fixtures', '001-item-references-utf8-keyword', 'REQ-UTF8.yml'
),
)
self.assertEqual(line, 10)

def test_find_file_reference_should_skip_item_path(self):
root = TESTS_ROOT
tree = Mock()
Expand Down

0 comments on commit 256bc83

Please sign in to comment.