From 197dceea7c6caa3cdbbe8e6d06a3c5a48ed96b19 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Fri, 5 Jan 2018 17:09:50 +0100 Subject: [PATCH] TST: Add a few test cases for ANSI conversion --- nbconvert/filters/tests/test_ansi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nbconvert/filters/tests/test_ansi.py b/nbconvert/filters/tests/test_ansi.py index 707d48211..ba6ae25f2 100644 --- a/nbconvert/filters/tests/test_ansi.py +++ b/nbconvert/filters/tests/test_ansi.py @@ -41,6 +41,9 @@ def test_ansi2html(self): 'hel\x1b[0;32mlo': 'hello', 'hellø': 'hellø', '\x1b[1mhello\x1b[33mworld\x1b[0m': 'helloworld', + 'he\x1b[4mll\x1b[24mo': 'hello', + '\x1b[35mhe\x1b[7mll\x1b[27mo': 'hello', + '\x1b[44mhe\x1b[7mll\x1b[27mo': 'hello', } for inval, outval in correct_outputs.items(): @@ -61,6 +64,7 @@ def test_ansi2latex(self): 'hello\x1b[01;34mthere': r'hello\textcolor{ansi-blue-intense}{\textbf{there}}', 'hello\x1b[001;34mthere': r'hello\textcolor{ansi-blue-intense}{\textbf{there}}', '\x1b[1mhello\x1b[33mworld\x1b[0m': r'\textbf{hello}\textcolor{ansi-yellow-intense}{\textbf{world}}', + 'he\x1b[4mll\x1b[24mo': 'he\\underline{ll}o', } for inval, outval in correct_outputs.items():