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 @@ -460,6 +460,19 @@ edit mode."
460
460
(equal (deadgrep--arguments " foo" 'words 'ignore '(3 . 2 ))
461
461
'(" --color=ansi" " --line-number" " --no-heading" " --no-column" " --with-filename" " --fixed-strings" " --word-regexp" " --ignore-case" " --type-add=custom:*.el" " --type=custom" " --before-context=3" " --after-context=2" " --" " foo" " ." )))))
462
462
463
+ (ert-deftest deadgrep--arguments-custom-file-types ()
464
+ (let ((deadgrep-file-type-alist '((tests . " --type=TEST" )
465
+ (no-tests . " --type-not=TEST" ))))
466
+ (let ((deadgrep--file-type 'tests ))
467
+ (should
468
+ (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" " ." ))))
470
+ (let ((deadgrep--file-type 'no-tests ))
471
+ (should
472
+ (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" " ." )))))
474
+ )
475
+
463
476
(ert-deftest deadgrep--arguments-error-cases ()
464
477
(should-error
465
478
(deadgrep--arguments " foo" 'foo 'smart nil ))
You can’t perform that action at this time.
0 commit comments