summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinkham <code@andrewsforge.com>2014-05-06 15:34:29 -0500
committerAndrew Pinkham <code@andrewsforge.com>2014-05-06 15:34:29 -0500
commit17184b451df1f8b0c79a15ad299ecf9bdd5f92f4 (patch)
treea2f360ff6609779e128dfd0538e02ba157b5675e
parent94fa51b3d94ef49b8767ee9ff10b33e7b31bb9c7 (diff)
downloadpygments-17184b451df1f8b0c79a15ad299ecf9bdd5f92f4.tar.gz
RTF Formatter: added footer test.
-rw-r--r--tests/test_rtf_formatter.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_rtf_formatter.py b/tests/test_rtf_formatter.py
index 2a80e618..f6e3d964 100644
--- a/tests/test_rtf_formatter.py
+++ b/tests/test_rtf_formatter.py
@@ -15,6 +15,7 @@ from pygments.formatters import RtfFormatter
from pygments.lexers.special import TextLexer
class RtfFormatterTest(StringTests, unittest.TestCase):
+ foot = (r'\par' '\n' r'}')
def format_rtf(self, t):
tokensource = list(TextLexer().get_tokens(t))
@@ -31,6 +32,12 @@ class RtfFormatterTest(StringTests, unittest.TestCase):
expected = r'{\rtf1\ansi\uc0'
self.assertStartsWith(result, expected)
+ def test_rtf_footer(self):
+ t = u''
+ result = self.format_rtf(t)
+ expected = self.foot
+ self.assertEndsWith(result, expected)
+
def test_ascii_characters(self):
t = u'a b c d ~'
result = self.format_rtf(t)