コード例 #1
0
    def test_equationExtract_inline_02(self):
        from texequation.toolswindowcontroller import ToolsWindowController

        text = '{$...$} {$a=b$} {$...$}'
        position = 10

        equation = ToolsWindowController.extractEquation(text, position)
        self.assertEqual(equation, 'a=b')
コード例 #2
0
    def test_equationExtract_empty(self):
        from texequation.toolswindowcontroller import ToolsWindowController

        text = ''
        position = 0

        equation = ToolsWindowController.extractEquation(text, position)
        self.assertEqual(equation, '')
コード例 #3
0
    def test_equationExtract_block_miss_02(self):
        from texequation.toolswindowcontroller import ToolsWindowController

        text = '{$$a=b$$}'
        position = 9

        equation = ToolsWindowController.extractEquation(text, position)
        self.assertEqual(equation, '')
コード例 #4
0
    def test_equationExtract_inline_02(self):
        from texequation.toolswindowcontroller import ToolsWindowController

        text = '{$...$} {$a=b$} {$...$}'
        position = 10

        equation = ToolsWindowController.extractEquation(text, position)
        self.assertEqual(equation, 'a=b')
コード例 #5
0
    def test_equationExtract_block_miss_02(self):
        from texequation.toolswindowcontroller import ToolsWindowController

        text = '{$$a=b$$}'
        position = 9

        equation = ToolsWindowController.extractEquation(text, position)
        self.assertEqual(equation, '')
コード例 #6
0
    def test_equationExtract_empty(self):
        from texequation.toolswindowcontroller import ToolsWindowController

        text = ''
        position = 0

        equation = ToolsWindowController.extractEquation(text, position)
        self.assertEqual(equation, '')
コード例 #7
0
ファイル: test_toolswindow.py プロジェクト: Jenyay/outwiker
    def test_equationExtract_block_03(self):
        from texequation.toolswindowcontroller import ToolsWindowController

        text = '{$$a=b$$}'
        position = 7

        equation, blockMode = ToolsWindowController.extractEquation(text,
                                                                    position)
        self.assertEqual(equation, 'a=b')
        self.assertTrue(blockMode)
コード例 #8
0
ファイル: test_toolswindow.py プロジェクト: Jenyay/outwiker
    def test_equationExtract_inline_01(self):
        from texequation.toolswindowcontroller import ToolsWindowController

        text = '{$a=b$}'
        position = 2

        equation, blockMode = ToolsWindowController.extractEquation(text,
                                                                    position)
        self.assertEqual(equation, 'a=b')
        self.assertFalse(blockMode)
コード例 #9
0
    def test_equationExtract_block_03(self):
        from texequation.toolswindowcontroller import ToolsWindowController

        text = '{$$a=b$$}'
        position = 7

        equation, blockMode = ToolsWindowController.extractEquation(text,
                                                                    position)
        self.assertEqual(equation, 'a=b')
        self.assertTrue(blockMode)
コード例 #10
0
    def test_equationExtract_inline_01(self):
        from texequation.toolswindowcontroller import ToolsWindowController

        text = '{$a=b$}'
        position = 2

        equation, blockMode = ToolsWindowController.extractEquation(text,
                                                                    position)
        self.assertEqual(equation, 'a=b')
        self.assertFalse(blockMode)