diff options
author | Mykola Orliuk <virkony@gmail.com> | 2023-04-23 19:35:52 +0200 |
---|---|---|
committer | Mykola Orliuk <virkony@gmail.com> | 2023-04-23 19:46:14 +0200 |
commit | e9b416168a8dc4ce8d9ebdd571e83b5162d18df5 (patch) | |
tree | cb127a9537a8c6a1eec5c6b397375828efb9bd2b /lib/tests/misc.nix | |
parent | a48fd10c8699c4ae3cd6b4565cf1ebf1d9b38333 (diff) | |
download | nixpkgs-e9b416168a8dc4ce8d9ebdd571e83b5162d18df5.tar nixpkgs-e9b416168a8dc4ce8d9ebdd571e83b5162d18df5.tar.gz nixpkgs-e9b416168a8dc4ce8d9ebdd571e83b5162d18df5.tar.bz2 nixpkgs-e9b416168a8dc4ce8d9ebdd571e83b5162d18df5.tar.lz nixpkgs-e9b416168a8dc4ce8d9ebdd571e83b5162d18df5.tar.xz nixpkgs-e9b416168a8dc4ce8d9ebdd571e83b5162d18df5.tar.zst nixpkgs-e9b416168a8dc4ce8d9ebdd571e83b5162d18df5.zip |
lib.generators.toLua: allow disabling multiline
Diffstat (limited to 'lib/tests/misc.nix')
-rw-r--r-- | lib/tests/misc.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 682b1a379fc..49336b8b963 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -950,13 +950,18 @@ runTests { }; testToLuaAttrsetWithSpaceInKey = { - expr = generators.toLua {} { "some space and double-quote (\")" = generators.mkLuaInline ''"abc" .. "def"''; }; + expr = generators.toLua {} { "some space and double-quote (\")" = 42; }; expected = '' { - ["some space and double-quote (\")"] = ("abc" .. "def") + ["some space and double-quote (\")"] = 42 }''; }; + testToLuaWithoutMultiline = { + expr = generators.toLua { multiline = false; } [ 41 43 ]; + expected = ''{ 41, 43 }''; + }; + testToLuaBasicExample = { expr = generators.toLua {} { cmd = [ "typescript-language-server" "--stdio" ]; |