mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 06:54:47 +08:00
tests/pexpect: Fix \d escape
This commit is contained in:
parent
171869858a
commit
3af849d739
|
@ -65,7 +65,7 @@ expect_prompt("echo start2.*\r\necho start1")
|
|||
# Verify searching with a request for timestamps includes the timestamps.
|
||||
sendline("history search --show-time='# %F %T%n' --prefix 'echo start'")
|
||||
expect_prompt(
|
||||
"# \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\r\necho start2; .*\r\n# \d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\r\necho start1;"
|
||||
"# \\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d\r\necho start2; .*\r\n# \\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d\r\necho start1;"
|
||||
)
|
||||
|
||||
# ==========
|
||||
|
|
|
@ -45,7 +45,7 @@ expect_re("Job.*Group.*(CPU)?.*State.*Command")
|
|||
expect_re(".*running.*sleep 20 &")
|
||||
expect_prompt()
|
||||
sendline("echo $my_pid")
|
||||
m = expect_re("\d+\r\n")
|
||||
m = expect_re("\\d+\r\n")
|
||||
expect_prompt()
|
||||
os.kill(int(m.group()), signal.SIGTERM)
|
||||
expect_re("[0-9]+:0:sleep 20 &:SIGTERM:Polite quit request", timeout=20)
|
||||
|
|
|
@ -83,10 +83,10 @@ expect_prompt()
|
|||
# Save the pids for later to check if they are still running.
|
||||
pids = []
|
||||
send("sleep 130 & echo $last_pid\r")
|
||||
pids += [expect_re("\d+\r\n").group().strip()]
|
||||
pids += [expect_re("\\d+\r\n").group().strip()]
|
||||
expect_prompt()
|
||||
send("sleep 131 & echo $last_pid\r")
|
||||
pids += [expect_re("\d+\r\n").group().strip()]
|
||||
pids += [expect_re("\\d+\r\n").group().strip()]
|
||||
expect_prompt()
|
||||
send("sleep 9999999\r")
|
||||
sleep(0.500) # ensure fish kicks off the above sleep before it gets HUP - see #7288
|
||||
|
|
Loading…
Reference in New Issue
Block a user