From 88b86fb1ddcbd221f156a27cc787e47dca905087 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Thu, 16 May 2024 23:56:33 +0300 Subject: [PATCH] add test with skipped named field --- lib.test.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib.test.nix b/lib.test.nix index a4c2c74..9b7d2fe 100644 --- a/lib.test.nix +++ b/lib.test.nix @@ -119,6 +119,14 @@ with nix2lua; pkgs.lib.runTests { ]; expected = ''{ "foo", foo = "hello", 10 }''; }; + "test returns table with skipped nullable named field" = { + expr = toLua [ + "foo" + (namedField "foo" null) + 10 + ]; + expected = ''{ "foo", 10 }''; + }; "test returns raw string" = { expr = toLua (raw "hello"); expected = "hello";