Skip to content

Commit

Permalink
Fix test interaction problems
Browse files Browse the repository at this point in the history
- Use default result buffer name in new default-directory test.
- Ensure the search is finished in this new test to avoid unfinished
  search problems in subsequent test.
  • Loading branch information
dajva committed Apr 23, 2022
1 parent d795ba4 commit 444a8cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/rg.el-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -1142,8 +1142,7 @@ and ungrouped otherwise."
(ert-deftest rg-integration/default-directory-search-from-results ()
"Verify default-directory when doing a search from results buffer."
:tags '(need-rg)
(let ((rg-buffer-name "rg results")
(search-dir1 (expand-file-name default-directory))
(let ((search-dir1 (expand-file-name default-directory))
(search-dir2 (file-name-directory
(expand-file-name
(concat default-directory "test/data")))))
Expand All @@ -1152,7 +1151,8 @@ and ungrouped otherwise."
(should (equal default-directory search-dir1))
(rg-wait-for-search-result)
(rg-run "foo" "*.baz" search-dir2)
(should (equal default-directory search-dir2)))))
(should (equal default-directory search-dir2))
(rg-wait-for-search-result))))

(provide 'rg.el-test)

Expand Down

0 comments on commit 444a8cc

Please sign in to comment.