Ejemplo n.º 1
0
def test_ProxyToVim_showFileAtLine_wrong_file():
    from vimpdb.testing import ProxyToVimForTests
    to_vim = ProxyToVimForTests()
    to_vim.setState(to_vim.IS_REMOTE_SETUP_IS_TRUE)
    to_vim.showFileAtLine('bla.vim', 1)
    assert (to_vim.logged() ==
"""
""")
Ejemplo n.º 2
0
def test_ProxyToVim_showFileAtLine_existing_file():
    from vimpdb.testing import ProxyToVimForTests
    from vimpdb.proxy import getPackagePath
    to_vim = ProxyToVimForTests()
    to_vim.setState(to_vim.IS_REMOTE_SETUP_IS_TRUE)
    existingFile = getPackagePath(test_ProxyToVim_showFileAtLine_existing_file)
    to_vim.showFileAtLine(existingFile, 1)
    lines = to_vim.logged().splitlines()
    assert len(lines) == 4
    assert lines[1] == "expr: exists('*PDB_init')"
    assert lines[2] == "return: '1'"
    assert lines[3].startswith('send: :call PDB_show_file_at_line("')
    assert lines[3].endswith(' "1")<CR>')
    assert not '\\' in lines[3]