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."
476
476
(equal (deadgrep--arguments " foo" 'words 'ignore '(3 . 2 ))
477
477
'(" --color=ansi" " --line-number" " --no-heading" " --no-column" " --with-filename" " --no-config" " --fixed-strings" " --word-regexp" " --ignore-case" " --type-add=custom:*.el" " --type=custom" " --before-context=3" " --after-context=2" " --" " foo" " ." )))))
478
478
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
+ '(" --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
+ '(" --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
+
479
492
(ert-deftest deadgrep--arguments-error-cases ()
480
493
(should-error
481
494
(deadgrep--arguments " foo" 'foo 'smart nil ))
You can’t perform that action at this time.
0 commit comments