tests/zsh: add highlighters overrride test
Test ability to drop main from arguments forcefully. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
d0cdb4101f
commit
9de7d83327
2 changed files with 25 additions and 0 deletions
|
|
@ -26,6 +26,7 @@
|
|||
zsh-session-variables = ./session-variables.nix;
|
||||
zsh-smart-formatting = ./smart-formatting.nix;
|
||||
zsh-syntax-highlighting = ./syntax-highlighting.nix;
|
||||
zsh-syntax-highlighting-override = ./syntax-highlighting-override.nix;
|
||||
zsh-xdg-default = ./xdg-default.nix;
|
||||
zsh-xdg-disabled = ./xdg-disabled.nix;
|
||||
zsh-zprof = ./zprof.nix;
|
||||
|
|
|
|||
24
tests/modules/programs/zsh/syntax-highlighting-override.nix
Normal file
24
tests/modules/programs/zsh/syntax-highlighting-override.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
package = pkgs.hello;
|
||||
highlighters = lib.mkForce [
|
||||
"brackets"
|
||||
"pattern"
|
||||
"cursor"
|
||||
];
|
||||
styles.comment = "fg=#6c6c6c";
|
||||
patterns."rm -rf *" = "fg=white,bold,bg=red";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContains home-files/.zshrc "source ${pkgs.hello}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_HIGHLIGHTERS=(brackets pattern cursor)"
|
||||
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_STYLES[comment]='fg=#6c6c6c'"
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue