fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Daniel Rainerci: disable pexpect and tmux tests in sanitizer jobs64e3b419b

master
797 B34 linesraw
1#!/usr/bin/env python3
2from pexpect_helper import SpawnedProc
3import re
4import sys
5
6sp = SpawnedProc()
7send, sendline, sleep, expect_prompt, expect_re, expect_str = (
8    sp.send,
9    sp.sendline,
10    sp.sleep,
11    sp.expect_prompt,
12    sp.expect_re,
13    sp.expect_str,
14)
15expect_prompt()
16
17sendline("echo cat dog")
18expect_prompt("cat dog")
19
20sendline("eval (string replace dog tiger -- $history[1])")
21expect_prompt("cat tiger")
22
23sendline("eval (string replace dog tiger -- $history[1])")
24expect_re(
25    "fish: The call stack limit has been exceeded.*"
26    + "\r\nin command substitution"
27    + "\r\nfish: Unable to evaluate string substitution"
28    + re.escape("\r\neval (string replace dog tiger -- $history[1])")
29    + "\r\n *\\^~+\\^\\w*"
30)
31expect_prompt()
32
33sendline("\x04")  # <c-d>
34sys.exit(0)