mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-24 05:41:14 -03:00
tests: Specifically #require fish_test_helper when needed
This commit is contained in:
@@ -26,6 +26,9 @@ fish_pid = sp.spawn.pid
|
||||
# Launch fish_test_helper.
|
||||
expect_prompt()
|
||||
exe_path = os.environ.get("fish_test_helper")
|
||||
if not exe_path:
|
||||
sys.exit(127)
|
||||
|
||||
sp.sendline(exe_path + " nohup_wait")
|
||||
|
||||
# We expect it to transfer tty ownership to fish_test_helper.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
from pexpect_helper import SpawnedProc
|
||||
import platform
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
sp = SpawnedProc()
|
||||
send, sendline, sleep, expect_prompt, expect_re, expect_str = (
|
||||
@@ -75,6 +76,10 @@ expect_prompt()
|
||||
sendline("jobs")
|
||||
expect_prompt("jobs: There are no jobs")
|
||||
|
||||
if not os.environ.get("fish_test_helper", ""):
|
||||
import sys
|
||||
sys.exit(127)
|
||||
|
||||
# Regression test for #2214: foregrounding from a key binding works!
|
||||
sendline(r"bind ctrl-r 'fg >/dev/null 2>/dev/null'")
|
||||
expect_prompt()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
from pexpect_helper import SpawnedProc
|
||||
import os
|
||||
|
||||
sp = SpawnedProc()
|
||||
send, sendline, expect_prompt, expect_str = (
|
||||
@@ -13,6 +14,10 @@ expect_prompt()
|
||||
sendline("function echo_wrap ; /bin/echo $argv ; sleep 0.1; end")
|
||||
expect_prompt()
|
||||
|
||||
if not os.environ.get("fish_test_helper", ""):
|
||||
import sys
|
||||
sys.exit(127)
|
||||
|
||||
for i in range(5):
|
||||
sendline(
|
||||
"echo_wrap 1 2 3 4 | $fish_test_helper become_foreground_then_print_stderr ; or exit 1"
|
||||
|
||||
@@ -12,6 +12,10 @@ send, sendline, expect_prompt, expect_str, sleep = (
|
||||
sp.sleep,
|
||||
)
|
||||
|
||||
if not os.environ.get("fish_test_helper", ""):
|
||||
import sys
|
||||
sys.exit(127)
|
||||
|
||||
# Launch fish_test_helper.
|
||||
expect_prompt()
|
||||
exe_path = os.environ.get("fish_test_helper")
|
||||
|
||||
Reference in New Issue
Block a user