mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
treewide (cleaning): helpers.toLuaObject -> lib.nixvim.toLuaObject
This commit is contained in:
parent
78e295fa41
commit
ec24d496d5
65 changed files with 104 additions and 104 deletions
|
@ -50,7 +50,7 @@ let
|
|||
|
||||
results = lib.runTests {
|
||||
testToLuaObject = {
|
||||
expr = helpers.toLuaObject {
|
||||
expr = lib.nixvim.toLuaObject {
|
||||
foo = "bar";
|
||||
qux = [
|
||||
1
|
||||
|
@ -62,22 +62,22 @@ let
|
|||
};
|
||||
|
||||
testToLuaObjectRawLua = {
|
||||
expr = helpers.toLuaObject { __raw = "<lua code>"; };
|
||||
expr = lib.nixvim.toLuaObject { __raw = "<lua code>"; };
|
||||
expected = "<lua code>";
|
||||
};
|
||||
|
||||
testToLuaObjectInlineLua = {
|
||||
expr = helpers.toLuaObject (lib.generators.mkLuaInline "<lua code>");
|
||||
expr = lib.nixvim.toLuaObject (lib.generators.mkLuaInline "<lua code>");
|
||||
expected = "(<lua code>)";
|
||||
};
|
||||
|
||||
testToLuaObjectInlineLuaNested = {
|
||||
expr = helpers.toLuaObject { lua = lib.generators.mkLuaInline "<lua code>"; };
|
||||
expr = lib.nixvim.toLuaObject { lua = lib.generators.mkLuaInline "<lua code>"; };
|
||||
expected = "{ lua = (<lua code>) }";
|
||||
};
|
||||
|
||||
testToLuaObjectLuaTableMixingList = {
|
||||
expr = helpers.toLuaObject {
|
||||
expr = lib.nixvim.toLuaObject {
|
||||
"__unkeyed...." = "foo";
|
||||
bar = "baz";
|
||||
};
|
||||
|
@ -85,7 +85,7 @@ let
|
|||
};
|
||||
|
||||
testToLuaObjectNestedAttrs = {
|
||||
expr = helpers.toLuaObject {
|
||||
expr = lib.nixvim.toLuaObject {
|
||||
a = {
|
||||
b = 1;
|
||||
c = 2;
|
||||
|
@ -98,7 +98,7 @@ let
|
|||
};
|
||||
|
||||
testToLuaObjectNestedList = {
|
||||
expr = helpers.toLuaObject [
|
||||
expr = lib.nixvim.toLuaObject [
|
||||
1
|
||||
2
|
||||
[
|
||||
|
@ -115,7 +115,7 @@ let
|
|||
};
|
||||
|
||||
testToLuaObjectNonStringPrims = {
|
||||
expr = helpers.toLuaObject {
|
||||
expr = lib.nixvim.toLuaObject {
|
||||
a = 1.0;
|
||||
b = 2;
|
||||
c = true;
|
||||
|
@ -126,24 +126,24 @@ let
|
|||
};
|
||||
|
||||
testToLuaObjectNilPrim = {
|
||||
expr = helpers.toLuaObject null;
|
||||
expr = lib.nixvim.toLuaObject null;
|
||||
expected = "nil";
|
||||
};
|
||||
|
||||
testToLuaObjectStringPrim = {
|
||||
expr = helpers.toLuaObject ''
|
||||
expr = lib.nixvim.toLuaObject ''
|
||||
foo\bar
|
||||
baz'';
|
||||
expected = ''"foo\\bar\nbaz"'';
|
||||
};
|
||||
|
||||
testToLuaObjectDerivation = {
|
||||
expr = helpers.toLuaObject drv;
|
||||
expr = lib.nixvim.toLuaObject drv;
|
||||
expected = ''"${drv}"'';
|
||||
};
|
||||
|
||||
testToLuaObjectDerivationNested = {
|
||||
expr = helpers.toLuaObject {
|
||||
expr = lib.nixvim.toLuaObject {
|
||||
a = drv;
|
||||
b = {
|
||||
c = drv;
|
||||
|
@ -155,7 +155,7 @@ let
|
|||
};
|
||||
|
||||
testToLuaObjectFilters = {
|
||||
expr = helpers.toLuaObject {
|
||||
expr = lib.nixvim.toLuaObject {
|
||||
a = null;
|
||||
b = { };
|
||||
c = [ ];
|
||||
|
@ -168,7 +168,7 @@ let
|
|||
};
|
||||
|
||||
testToLuaObjectAttrListFilters = {
|
||||
expr = helpers.toLuaObject {
|
||||
expr = lib.nixvim.toLuaObject {
|
||||
a = null;
|
||||
b = { };
|
||||
c = [ ];
|
||||
|
@ -217,7 +217,7 @@ let
|
|||
};
|
||||
|
||||
testToLuaObjectEmptyTable = {
|
||||
expr = helpers.toLuaObject {
|
||||
expr = lib.nixvim.toLuaObject {
|
||||
a = null;
|
||||
b = { };
|
||||
c = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue