mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
kakoune: simplify testcase
Instead of using several regex assertions, just state precisely what we are producing. While the regex was technically more flexible, since it would ignore differences in whitespace, it was also harder to read/edit.
This commit is contained in:
parent
223e3c38a1
commit
861690ff29
1 changed files with 3 additions and 10 deletions
|
@ -16,17 +16,10 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nmt.script = let
|
nmt.script = ''
|
||||||
lineStart =
|
|
||||||
"^add-highlighter\\s\\+global\\/\\?\\s\\+show-whitespaces\\s\\+"
|
|
||||||
+ "\\(-\\w\\+\\s\\+.\\s\\+\\)*";
|
|
||||||
in ''
|
|
||||||
assertFileExists home-files/.config/kak/kakrc
|
assertFileExists home-files/.config/kak/kakrc
|
||||||
assertFileRegex home-files/.config/kak/kakrc '${lineStart}-lf\s\+1\b'
|
assertFileContains home-files/.config/kak/kakrc \
|
||||||
assertFileRegex home-files/.config/kak/kakrc '${lineStart}-spc\s\+2\b'
|
"add-highlighter global/ show-whitespaces -tab 4 -tabpad 5 -spc 2 -nbsp 3 -lf 1"
|
||||||
assertFileRegex home-files/.config/kak/kakrc '${lineStart}-nbsp\s\+3\b'
|
|
||||||
assertFileRegex home-files/.config/kak/kakrc '${lineStart}-tab\s\+4\b'
|
|
||||||
assertFileRegex home-files/.config/kak/kakrc '${lineStart}-tabpad\s\+5\b'
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue