Skip to content

Commit

Permalink
fix tests on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
lotabout committed Feb 15, 2021
1 parent 1131d44 commit f253e3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_skim.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,9 +891,9 @@ def test_query_history(self):
self.tmux.until(lambda lines: lines[-1].startswith('> cd'))
self.tmux.send_keys(Key('Enter'))

self.tmux.until(lambda _lines: os.stat(history_file).st_mtime > history_mtime)
with open(history_file) as fp:
self.assertEqual('a\nb\nc\ncd', fp.read())
self.tmux.send_keys(f'[[ "$(echo -n $(cat {history_file}))" == "a b c cd" ]] && echo ok')
self.tmux.send_keys(Key('Enter'))
self.tmux.until(lambda lines: lines[-1].startswith('ok'))

def test_cmd_history(self):
"""query history should work"""
Expand Down

0 comments on commit f253e3e

Please sign in to comment.