1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-18 20:11:17 +00:00
thefuck/tests/rules/test_java.py

18 lines
511 B
Python
Raw Permalink Normal View History

2015-05-27 15:31:16 +08:00
import pytest
from thefuck.rules.java import match, get_new_command
from thefuck.types import Command
2015-05-27 15:31:16 +08:00
@pytest.mark.parametrize('command', [
Command('java foo.java', ''),
Command('java bar.java', '')])
2015-05-27 15:31:16 +08:00
def test_match(command):
assert match(command)
2015-05-27 15:31:16 +08:00
@pytest.mark.parametrize('command, new_command', [
(Command('java foo.java', ''), 'java foo'),
(Command('java bar.java', ''), 'java bar')])
2015-05-27 15:31:16 +08:00
def test_get_new_command(command, new_command):
assert get_new_command(command) == new_command