@@ -0,0 +1,2133 @@
+# -*- coding: utf-8 -*-%0A%22%22%22%0A    Tests for inheritance in RegexLexer%0A    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%0A%0A    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.%0A    :license: BSD, see LICENSE for details.%0A%22%22%22%0A%0Aimport unittest%0A%0Afrom pygments.lexer import RegexLexer, inherit%0Afrom pygments.token import Text%0A%0A%0Aclass InheritTest(unittest.TestCase):%0A    def test_single_inheritance_position(self):%0A        t = Two()%0A        pats = %5Bx%5B0%5D.__self__.pattern for x in t._tokens%5B'root'%5D%5D%0A        self.assertEqual(%5B'x', 'a', 'b', 'y'%5D, pats)%0A    def test_multi_inheritance_beginning(self):%0A        t = Beginning()%0A        pats = %5Bx%5B0%5D.__self__.pattern for x in t._tokens%5B'root'%5D%5D%0A        self.assertEqual(%5B'x', 'a', 'b', 'y', 'm'%5D, pats)%0A    def test_multi_inheritance_end(self):%0A        t = End()%0A        pats = %5Bx%5B0%5D.__self__.pattern for x in t._tokens%5B'root'%5D%5D%0A        self.assertEqual(%5B'm', 'x', 'a', 'b', 'y'%5D, pats)%0A%0A    def test_multi_inheritance_position(self):%0A        t = Three()%0A        pats = %5Bx%5B0%5D.__self__.pattern for x in t._tokens%5B'root'%5D%5D%0A        self.assertEqual(%5B'i', 'x', 'a', 'b', 'y', 'j'%5D, pats)%0A%0A    def test_single_inheritance_with_skip(self):%0A        t = Skipped()%0A        pats = %5Bx%5B0%5D.__self__.pattern for x in t._tokens%5B'root'%5D%5D%0A        self.assertEqual(%5B'x', 'a', 'b', 'y'%5D, pats)%0A%0A%0Aclass One(RegexLexer):%0A    tokens = %7B%0A        'root': %5B%0A            ('a', Text),%0A            ('b', Text),%0A        %5D,%0A    %7D%0A%0Aclass Two(One):%0A    tokens = %7B%0A        'root': %5B%0A            ('x', Text),%0A            inherit,%0A            ('y', Text),%0A        %5D,%0A    %7D%0A%0Aclass Three(Two):%0A    tokens = %7B%0A        'root': %5B%0A            ('i', Text),%0A            inherit,%0A            ('j', Text),%0A        %5D,%0A    %7D%0A%0Aclass Beginning(Two):%0A    tokens = %7B%0A        'root': %5B%0A            inherit,%0A            ('m', Text),%0A        %5D,%0A    %7D%0A%0Aclass End(Two):%0A    tokens = %7B%0A        'root': %5B%0A            ('m', Text),%0A            inherit,%0A        %5D,%0A    %7D%0A%0Aclass Empty(One):%0A    tokens = %7B%7D%0A%0Aclass Skipped(Empty):%0A    tokens = %7B%0A        'root': %5B%0A            ('x', Text),%0A            inherit,%0A            ('y', Text),%0A        %5D,%0A    %7D%0A%0A

Add test for RegexLexer inheritance (fails with current code).