add test with skipped named field

This commit is contained in:
Dmitriy Pleshevskiy 2024-05-16 23:56:33 +03:00
parent 6ec872969f
commit 88b86fb1dd
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -119,6 +119,14 @@ with nix2lua; pkgs.lib.runTests {
]; ];
expected = ''{ "foo", foo = "hello", 10 }''; 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" = { "test returns raw string" = {
expr = toLua (raw "hello"); expr = toLua (raw "hello");
expected = "hello"; expected = "hello";