Skip to content

Commit

Permalink
Fix helm-git-grep-get-input-symbol test case
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuyk committed Oct 8, 2016
1 parent 0a7e62e commit 0435d35
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions test/helm-git-grep-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,15 @@
(should (helm-git-grep-persistent-action expected))))))

(ert-deftest ert--helm-git-grep-get-input-symbol ()
(let ((expected "helm"))
(with-temp-buffer
(insert expected)
(goto-char (point-min))
(should-equal (helm-git-grep-get-input-symbol) expected))
(let ((expected " helm"))
(with-temp-buffer
(insert expected)
(goto-char (point-min))
(activate-mark)
(goto-char (point-max))
(should-equal (helm-git-grep-get-input-symbol) expected))))
(goto-char (1+ (point-min)))
(should-equal (helm-git-grep-get-input-symbol) "helm"))
(let ((mark-active t))
(mocker-let ((use-region-p () ((:output t)))
(helm-git-grep-get-regin-substring () ((:output expected))))
(should-equal (helm-git-grep-get-input-symbol) expected)))))

(ert-deftest ert--helm-git-grep-get-isearch-input-symbol ()
;; return isearch-string
Expand Down

0 comments on commit 0435d35

Please sign in to comment.