1From 5574aba60ed76f2bae947722122ac4d71ab8ed5a Mon Sep 17 00:00:00 2001
2From: Takeshi KOMIYA <i.tkomiya@gmail.com>
3Date: Mon, 18 Jan 2016 12:38:02 +0900
4Subject: [PATCH] Fix tests are broken with pygments-2.1
5
6---
7 tests/test_build_html.py | 2 +-
8 tests/test_intl.py | 10 ++++++----
9 2 files changed, 7 insertions(+), 5 deletions(-)
10
11diff --git a/tests/test_build_html.py b/tests/test_build_html.py
12index e330761..17ea089 100644
13--- a/tests/test_build_html.py
14+++ b/tests/test_build_html.py
15@@ -82,7 +82,7 @@ def checker(nodes):
16 (".//a[@href='_downloads/img1.png']", ''),
17 (".//pre", u'"quotes"'),
18 (".//pre", u"'included'"),
19- (".//pre/span[@class='s']", u'üöä'),
20+ (".//pre/span[@class='s2']", u'üöä'),
21 (".//div[@class='inc-pyobj1 highlight-text']//pre",
22 r'^class Foo:\n pass\n\s*$'),
23 (".//div[@class='inc-pyobj2 highlight-text']//pre",
24diff --git a/tests/test_intl.py b/tests/test_intl.py
25index 4c665d4..b24ec65 100644
26--- a/tests/test_intl.py
27+++ b/tests/test_intl.py
28@@ -694,14 +694,15 @@ def test_additional_targets_should_not_be_translated(app, status, warning):
29 yield assert_count(expected_expr, result, 1)
30
31 # C code block with lang should not be translated but be *C* highlighted
32- expected_expr = """<span class="cp">#include <stdio.h></span>"""
33+ expected_expr = ("""<span class="cp">#include</span> """
34+ """<span class="cpf"><stdio.h></span>""")
35 yield assert_count(expected_expr, result, 1)
36
37 # doctest block should not be translated but be highlighted
38 expected_expr = (
39 """<span class="gp">>>> </span>"""
40 """<span class="kn">import</span> <span class="nn">sys</span> """
41- """<span class="c"># sys importing</span>""")
42+ """<span class="c1"># sys importing</span>""")
43 yield assert_count(expected_expr, result, 1)
44
45 ## raw.txt
46@@ -754,14 +755,15 @@ def test_additional_targets_should_be_translated(app, status, warning):
47 yield assert_count(expected_expr, result, 1)
48
49 # C code block with lang should be translated and be *C* highlighted
50- expected_expr = """<span class="cp">#include <STDIO.H></span>"""
51+ expected_expr = ("""<span class="cp">#include</span> """
52+ """<span class="cpf"><STDIO.H></span>""")
53 yield assert_count(expected_expr, result, 1)
54
55 # doctest block should not be translated but be highlighted
56 expected_expr = (
57 """<span class="gp">>>> </span>"""
58 """<span class="kn">import</span> <span class="nn">sys</span> """
59- """<span class="c"># SYS IMPORTING</span>""")
60+ """<span class="c1"># SYS IMPORTING</span>""")
61 yield assert_count(expected_expr, result, 1)
62
63 ## raw.txt