Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure ZSH-related tests succeed when TERM variable is set to linux #497

Merged
merged 2 commits into from
Aug 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def run_command(self, command, **kwargs):

def _repl_sh(command, args, non_printable_insert):
os.environ["PS1"] = "$"
os.environ["TERM"] = ""
child = pexpect.spawn(command, args, echo=False, encoding="utf-8")
ps1 = PEXPECT_PROMPT[:5] + non_printable_insert + PEXPECT_PROMPT[5:]
ps2 = PEXPECT_CONTINUATION_PROMPT[:5] + non_printable_insert + PEXPECT_CONTINUATION_PROMPT[5:]
Expand All @@ -79,7 +80,7 @@ def bash_repl(command="bash"):


def zsh_repl(command="zsh"):
sh = _repl_sh(command, ["--no-rcs", "-V"], non_printable_insert="%(!..)")
sh = _repl_sh(command, ["--no-rcs", "--no-globalrcs", "-V"], non_printable_insert="%(!..)")
# Require two tabs to print all options (some tests rely on this).
sh.run_command("setopt BASH_AUTO_LIST")
return sh
Expand Down