mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
lib: add applyPrefixToAttrs
This commit is contained in:
parent
e24e40e5f1
commit
1d50fa4f63
4 changed files with 30 additions and 1 deletions
|
@ -61,6 +61,17 @@ let
|
|||
expected = ''{ foo = "bar", qux = { 1, 2, 3 } }'';
|
||||
};
|
||||
|
||||
testApplyPrefixToAttrs = {
|
||||
expr = lib.nixvim.applyPrefixToAttrs "prefix_" {
|
||||
foo = 1;
|
||||
bar = 2;
|
||||
};
|
||||
expected = {
|
||||
prefix_foo = 1;
|
||||
prefix_bar = 2;
|
||||
};
|
||||
};
|
||||
|
||||
testToLuaObjectRawLua = {
|
||||
expr = lib.nixvim.toLuaObject { __raw = "<lua code>"; };
|
||||
expected = "<lua code>";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue