Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
Adjust gotodefn test to work for multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
rneatherway committed Apr 28, 2015
1 parent 284b485 commit a6b5dc0
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions emacs/test/integration-tests.el
Expand Up @@ -71,7 +71,7 @@
(lambda ()
(find-file-and-wait-for-project-load "test/Test1/Program.fs")
(search-forward "X.func")
(delete-backward-char 2)
(delete-char -2)
(auto-complete)
(ac-complete)
(beginning-of-line)
Expand All @@ -89,7 +89,24 @@
(wait-for-condition (lambda () (/= (point) 88)))
(should= (point) 18)
(fsharp-ac/pop-gotodefn-stack)
(should= (point) 88))))
(should= (point) 88)
;; across files
(goto-char (point-min))
(search-forward "NewObjectType()")
(backward-char 7)
(fsharp-ac/gotodefn-at-point)
(wait-for-condition
(lambda () (progn
;; Command loop doesn't get executed so the buffer change
;; in the filter function doesn't take effect. Prod it manually.
(set-buffer (window-buffer (selected-window)))
(and (/= (point) 64)
(equal (buffer-name) "FileTwo.fs")))))
(should= (buffer-name) "FileTwo.fs")
(should= (point) 97)
(fsharp-ac/pop-gotodefn-stack)
(should= (buffer-name) "Program.fs")
(should= (point) 64))))

(ert-deftest check-tooltip ()
"Check tooltip request works"
Expand All @@ -113,7 +130,7 @@
(lambda ()
(find-file-and-wait-for-project-load "test/Test1/Program.fs")
(search-forward "X.func")
(delete-backward-char 1)
(delete-char -1)
(backward-char)
(fsharp-ac-parse-current-buffer t)
(wait-for-condition (lambda () (> (length (overlays-at (point))) 0)))
Expand Down

0 comments on commit a6b5dc0

Please sign in to comment.