File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,14 @@ some results."
121121 (eq (get-text-property (point ) 'face )
122122 'deadgrep-match-face ))))
123123
124+ (ert-deftest deadgrep-visit-result ()
125+ " `deadgrep-visit-result' should open the file at point."
126+ (with-temp-deadgrep-buf
127+ (deadgrep-forward-match)
128+ (deadgrep-visit-result)
129+ (let ((buf-name (buffer-file-name )))
130+ (should (s-ends-with-p " deadgrep.el" buf-name)))))
131+
124132(ert-deftest deadgrep--split-line ()
125133 (-let* ((raw-line
126134 " [0m[35mdeadgrep.el[0m:[0m[32m123[0m: (when ([0m[31m[1mbuffer-live[0m-p buffer)" )
@@ -466,11 +474,11 @@ edit mode."
466474 (let ((deadgrep--file-type 'tests ))
467475 (should
468476 (equal (deadgrep--arguments " foo" 'string 'sensitive '(1 . 0 ))
469- '(" --color=ansi" " --line-number" " --no-heading" " --with-filename" " --fixed-strings" " --case-sensitive" " --type=TEST" " --before-context=1" " --after-context=0" " --" " foo" " ." ))))
477+ '(" --color=ansi" " --line-number" " --no-heading" " --no-column " " -- with-filename" " --fixed-strings" " --case-sensitive" " --type=TEST" " --before-context=1" " --after-context=0" " --" " foo" " ." ))))
470478 (let ((deadgrep--file-type 'no-tests ))
471479 (should
472480 (equal (deadgrep--arguments " foo" 'string 'sensitive '(1 . 0 ))
473- '(" --color=ansi" " --line-number" " --no-heading" " --with-filename" " --fixed-strings" " --case-sensitive" " --type-not=TEST" " --before-context=1" " --after-context=0" " --" " foo" " ." )))))
481+ '(" --color=ansi" " --line-number" " --no-heading" " --no-column " " -- with-filename" " --fixed-strings" " --case-sensitive" " --type-not=TEST" " --before-context=1" " --after-context=0" " --" " foo" " ." )))))
474482 )
475483
476484(ert-deftest deadgrep--arguments-error-cases ()
You can’t perform that action at this time.
0 commit comments