mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-21 04:32:37 +01:00
#N/A Add tests for fish
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
from tests.functional.plots import with_confirmation, without_confirmation
|
||||
from tests.functional.utils import spawn, functional
|
||||
|
||||
containers = [('thefuck/ubuntu-python3-bash', '''
|
||||
@@ -23,17 +24,7 @@ CMD ["/bin/bash"]
|
||||
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