Skip to content

Commit

Permalink
test/cd: make dir_at_point produce better debuggable failures
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jan 19, 2020
1 parent c23c807 commit a6cfbcd
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions test/t/test_cd.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,8 @@ def test_dir_at_point(self, bash):
bash.send(cmd + "\t")
bash.expect_exact(cmd.replace("\002", "\b"))
bash.send(MAGIC_MARK)
got = bash.expect(
[
r"\r\nbar bar\.d/\s+foo\.d/\r\n"
+ re.escape(PS1 + cmd.replace("\002", "\b") + MAGIC_MARK)
+ "foo\b\b\b",
pexpect.EOF,
pexpect.TIMEOUT,
]
bash.expect(
r"\r\nbar bar\.d/\s+foo\.d/\r\n"
+ re.escape(PS1 + cmd.replace("\002", "\b") + MAGIC_MARK)
+ "foo\b\b\b"
)
assert got == 0

0 comments on commit a6cfbcd

Please sign in to comment.