1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-08-13 09:39:45 +01:00
Files
tests
rules
__init__.py
conftest.py
test_apt_get.py
test_brew_install.py
test_brew_unknown_command.py
test_brew_upgrade.py
test_cargo_no_command.py
test_cd_mkdir.py
test_cd_parent.py
test_composer_not_command.py
test_cp_omitting_directory.py
test_django_south_ghost.py
test_django_south_merge.py
test_dry.py
test_fix_alt_space.py
test_git_add.py
test_git_branch_list.py
test_git_checkout.py
test_git_diff_staged.py
test_git_not_command.py
test_git_pull.py
test_git_push.py
test_git_stash.py
test_go_run.py
test_grep_recursive.py
test_has_exists_script.py
test_java.py
test_javac.py
test_lein_not_task.py
test_ls_lah.py
test_man.py
test_man_no_space.py
test_mkdir_p.py
test_no_command.py
test_no_such_file.py
test_open.py
test_pacman.py
test_pip_unknown_command.py
test_python_command.py
test_python_execute.py
test_quotation_marks.py
test_rm_dir.py
test_rm_root.py
test_sl_ls.py
test_ssh_known_host.py
test_sudo.py
test_switch_lang.py
test_systemctl.py
test_tmux.py
test_whois.py
__init__.py
test_conf.py
test_logs.py
test_main.py
test_shells.py
test_types.py
test_utils.py
utils.py
thefuck
.gitignore
.travis.yml
LICENSE.md
MANIFEST.in
README.md
release.py
requirements.txt
setup.cfg
setup.py
tox.ini
thefuck/tests/rules/test_grep_recursive.py
2015-05-15 19:09:14 -03:00

13 lines
351 B
Python

from thefuck.rules.grep_recursive import match, get_new_command
from tests.utils import Command
def test_match():
assert match(Command('grep blah .', stderr='grep: .: Is a directory'), None)
assert not match(Command(), None)
def test_get_new_command():
assert get_new_command(
Command('grep blah .'), None) == 'grep -r blah .'