mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-30 06:34:09 +00:00
#N/A Add tests for fish
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import pytest
|
||||
from tests.functional.utils import spawn, functional
|
||||
from tests.functional.plots import with_confirmation, without_confirmation
|
||||
|
||||
containers = [('thefuck/ubuntu-python3-zsh', '''
|
||||
FROM ubuntu:latest
|
||||
@@ -23,17 +24,7 @@ CMD ["/bin/zsh"]
|
||||
def test_with_confirmation(tag, dockerfile):
|
||||
with spawn(tag, dockerfile) as proc:
|
||||
proc.sendline('eval $(thefuck-alias)')
|
||||
|
||||
proc.sendline('ehco test')
|
||||
proc.expect('command not found')
|
||||
|
||||
proc.sendline('fuck')
|
||||
proc.expect('echo test')
|
||||
proc.expect('enter')
|
||||
proc.expect_exact('ctrl+c')
|
||||
proc.send('\n')
|
||||
|
||||
proc.expect('test')
|
||||
with_confirmation(proc)
|
||||
|
||||
|
||||
@functional
|
||||
@@ -42,10 +33,4 @@ def test_without_confirmation(tag, dockerfile):
|
||||
with spawn(tag, dockerfile) as proc:
|
||||
proc.sendline('export THEFUCK_REQUIRE_CONFIRMATION=false')
|
||||
proc.sendline('eval $(thefuck-alias)')
|
||||
|
||||
proc.sendline('ehco test')
|
||||
proc.expect('command not found')
|
||||
|
||||
proc.sendline('fuck')
|
||||
proc.expect('echo test')
|
||||
proc.expect('test')
|
||||
without_confirmation(proc)
|
||||
|
||||
Reference in New Issue
Block a user