diff --git a/tests/rules/test_remove_trailing_cedilla.py b/tests/rules/test_remove_trailing_cedilla.py index 377ff8fc..d139984d 100644 --- a/tests/rules/test_remove_trailing_cedilla.py +++ b/tests/rules/test_remove_trailing_cedilla.py @@ -2,12 +2,14 @@ import pytest from thefuck.rules.remove_trailing_cedilla import match, get_new_command, CEDILLA from tests.utils import Command + @pytest.mark.parametrize('command', [ Command(script='wrong' + CEDILLA), Command(script='wrong with args' + CEDILLA)]) def test_match(command): assert match(command) + @pytest.mark.parametrize('command, new_command', [ (Command('wrong' + CEDILLA), 'wrong'), (Command('wrong with args' + CEDILLA), 'wrong with args')]) diff --git a/thefuck/rules/remove_trailing_cedilla.py b/thefuck/rules/remove_trailing_cedilla.py index 31186448..d7ec1773 100644 --- a/thefuck/rules/remove_trailing_cedilla.py +++ b/thefuck/rules/remove_trailing_cedilla.py @@ -1,9 +1,11 @@ -# encoding=utf8 +# -*- encoding: utf-8 -*- CEDILLA = u"รง" + def match(command): return command.script.endswith(CEDILLA) + def get_new_command(command): return command.script[:-1]