allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [29/50] git commit: [#6534] ticket:439 Test for textile markup
Date Wed, 09 Oct 2013 12:48:45 GMT
[#6534] ticket:439 Test for textile markup


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/122a7dea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/122a7dea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/122a7dea

Branch: refs/heads/cj/6422
Commit: 122a7dea09128094dc6134ffb33ba514872c8b0d
Parents: 54a8ce7
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Thu Sep 26 13:34:52 2013 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri Oct 4 14:21:24 2013 +0000

----------------------------------------------------------------------
 .../forgeimporters/github/tests/test_wiki.py    | 24 ++++++++++++++++++++
 1 file changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/122a7dea/ForgeImporters/forgeimporters/github/tests/test_wiki.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/tests/test_wiki.py b/ForgeImporters/forgeimporters/github/tests/test_wiki.py
index 1809ac1..91b5190 100644
--- a/ForgeImporters/forgeimporters/github/tests/test_wiki.py
+++ b/ForgeImporters/forgeimporters/github/tests/test_wiki.py
@@ -329,6 +329,30 @@ Our website is [[http://sf.net]].
 
         assert_equal(f(source, 'test.mediawiki'), result)
 
+    @skipif(module_not_available('html2text'))
+    def test_convert_textile_no_leading_tabs(self):
+        importer = GitHubWikiImporter()
+        importer.github_wiki_url = 'https://github.com/a/b/wiki'
+        importer.app = Mock()
+        importer.app.url = '/p/test/wiki/'
+        f = importer.convert_markup
+        source = u'''h1. Header 1
+
+Some text 1.
+
+h2. Header 2
+
+See [[Page]]'''
+
+        result = u'''# Header 1
+
+Some text 1.
+
+## Header 2
+
+See [Page]'''
+        assert_equal(f(source, 'test.textile').rstrip('\n\n'), result)
+
 
 class TestGitHubWikiImportController(TestController, TestCase):
 


Mime
View raw message