File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -476,6 +476,19 @@ edit mode."
476476 (equal (deadgrep--arguments " foo" 'words 'ignore '(3 . 2 ))
477477 '(" --no-config" " --color=ansi" " --line-number" " --no-heading" " --no-column" " --with-filename" " --fixed-strings" " --word-regexp" " --ignore-case" " --glob=*.el" " --before-context=3" " --after-context=2" " --" " foo" " ." )))))
478478
479+ (ert-deftest deadgrep--arguments-custom-file-types ()
480+ (let ((deadgrep-file-type-alist '((tests . " --type=TEST" )
481+ (no-tests . " --type-not=TEST" ))))
482+ (let ((deadgrep--file-type 'tests ))
483+ (should
484+ (equal (deadgrep--arguments " foo" 'string 'sensitive '(1 . 0 ))
485+ '(" --no-config" " --color=ansi" " --line-number" " --no-heading" " --no-column" " --with-filename" " --fixed-strings" " --case-sensitive" " --type=TEST" " --before-context=1" " --after-context=0" " --" " foo" " ." ))))
486+ (let ((deadgrep--file-type 'no-tests ))
487+ (should
488+ (equal (deadgrep--arguments " foo" 'string 'sensitive '(1 . 0 ))
489+ '(" --no-config" " --color=ansi" " --line-number" " --no-heading" " --no-column" " --with-filename" " --fixed-strings" " --case-sensitive" " --type-not=TEST" " --before-context=1" " --after-context=0" " --" " foo" " ." )))))
490+ )
491+
479492(ert-deftest deadgrep--arguments-error-cases ()
480493 (should-error
481494 (deadgrep--arguments " foo" 'foo 'smart nil ))
You can’t perform that action at this time.
0 commit comments