tests/test_none.py @ e90cf5cad060

Use @cmdutil.command decorator to define command table.

It's been available for 5 years (since Mercurial 1.9), and Mercurial 3.8
deprecates the use of hand-built command tables as of 38dc3f28f478.
author Kevin Bullock <kbullock@ringworld.org>
date Wed, 20 Apr 2016 10:15:36 -0500
parents 22fefa553086
children (none)
'''Test output without keywords.'''

from nose import *
from util import *


@with_setup(setup_sandbox, teardown_sandbox)
def test_blank():
    output = prompt(fs='')
    assert output == ''


@with_setup(setup_sandbox, teardown_sandbox)
def test_text():
    output = prompt(fs='test one two three')
    assert output == 'test one two three'


@with_setup(setup_sandbox, teardown_sandbox)
def test_invalid_keyword():
    output = prompt(fs='{invalidkeyword}')
    assert output == '{invalidkeyword}'