Skip to content

Commit

Permalink
ANSI tests: add test case for overlapping formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Feb 14, 2016
1 parent f468965 commit cbd76bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nbconvert/filters/tests/test_ansi.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def test_ansi2html(self):
'\x1b[37mh\x1b[0;037me\x1b[;0037ml\x1b[00;37ml\x1b[;;37mo': '<span class="ansigray">h</span><span class="ansigray">e</span><span class="ansigray">l</span><span class="ansigray">l</span><span class="ansigray">o</span>',
'hel\x1b[0;32mlo': 'hel<span class="ansigreen">lo</span>',
'hello': 'hello',
'\x1b[1mhello\x1b[33mworld\x1b[0m': '<span class="ansibold">hello</span><span class="ansiyellow ansibold">world</span>',
}

for inval, outval in correct_outputs.items():
Expand All @@ -56,6 +57,7 @@ def test_ansi2latex(self):
'hello\x1b[mthere': 'hellothere',
'hello\x1b[01;34mthere': r'hello\textcolor{blue}{\textbf{there}}',
'hello\x1b[001;34mthere': r'hello\textcolor{blue}{\textbf{there}}',
'\x1b[1mhello\x1b[33mworld\x1b[0m': r'\textbf{hello}\textcolor{brown}{\textbf{world}}',
}

for inval, outval in correct_outputs.items():
Expand Down

0 comments on commit cbd76bd

Please sign in to comment.