Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sofia Margariti committed Aug 22, 2017
1 parent 987d3eb commit 8a9fbf9
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
13 changes: 13 additions & 0 deletions openformats/tests/formats/github_markdown/files/2_el.md
@@ -0,0 +1,13 @@
---
title: el:About writing and formatting on GitHub

---

# el:Markdown stuff

### el:Old version

el:This line ends with a tab.
And this is a new line.

el:previous line contains spaces.
13 changes: 13 additions & 0 deletions openformats/tests/formats/github_markdown/files/2_en.md
@@ -0,0 +1,13 @@
---
title: About writing and formatting on GitHub

---

# Markdown stuff

### Old version

This line ends with a tab.
And this is a new line.

previous line contains spaces.
13 changes: 13 additions & 0 deletions openformats/tests/formats/github_markdown/files/2_tpl.md
@@ -0,0 +1,13 @@
---
title: 9a1c7ee2c7ce38d4bbbaf29ab9f2ac1e_tr

---

# 3afcdbfeb6ecfbdd0ba628696e3cc163_tr

### 247730f9d0d2eaad265a470e32aa0cdf_tr

cdee9bf40a070d58d14dfa3bb61e0032_tr

7693e302dc09b57483d26522ef25feb4_tr

@@ -1,9 +1,16 @@
import unittest

from openformats.tests.formats.common import CommonFormatTestMixin
from openformats.formats.github_markdown import GithubMarkdownHandler
from openformats.tests.formats.common import CommonFormatTestMixin
from openformats.tests.utils import translate_stringset


class GithubMarkdownTestCase(CommonFormatTestMixin, unittest.TestCase):
HANDLER_CLASS = GithubMarkdownHandler
TESTFILE_BASE = "openformats/tests/formats/github_markdown/files"

def test_tabs_in_source_file(self):
tmpl, strset = self.handler.parse(self.data["2_en"])
translated_strset = translate_stringset(strset)
translated_content = self.handler.compile(tmpl, translated_strset)
self.assertEquals(translated_content, self.data["2_el"])

0 comments on commit 8a9fbf9

Please sign in to comment.