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 @@ -452,6 +452,19 @@ edit mode."
452452 (equal (deadgrep--arguments " foo" 'words 'ignore '(3 . 2 ))
453453 '(" --color=ansi" " --line-number" " --no-heading" " --with-filename" " --fixed-strings" " --word-regexp" " --ignore-case" " --type-add=custom:*.el" " --type=custom" " --before-context=3" " --after-context=2" " --" " foo" " ." )))))
454454
455+ (ert-deftest deadgrep--arguments-custom-file-types ()
456+ (let ((deadgrep-file-type-alist '((tests . " --type=TEST" )
457+ (no-tests . " --type-not=TEST" ))))
458+ (let ((deadgrep--file-type 'tests ))
459+ (should
460+ (equal (deadgrep--arguments " foo" 'string 'sensitive '(1 . 0 ))
461+ '(" --color=ansi" " --line-number" " --no-heading" " --with-filename" " --fixed-strings" " --case-sensitive" " --type=TEST" " --before-context=1" " --after-context=0" " --" " foo" " ." ))))
462+ (let ((deadgrep--file-type 'no-tests ))
463+ (should
464+ (equal (deadgrep--arguments " foo" 'string 'sensitive '(1 . 0 ))
465+ '(" --color=ansi" " --line-number" " --no-heading" " --with-filename" " --fixed-strings" " --case-sensitive" " --type-not=TEST" " --before-context=1" " --after-context=0" " --" " foo" " ." )))))
466+ )
467+
455468(ert-deftest deadgrep--arguments-error-cases ()
456469 (should-error
457470 (deadgrep--arguments " foo" 'foo 'smart nil ))
You can’t perform that action at this time.
0 commit comments