add test with skipped named field
This commit is contained in:
parent
6ec872969f
commit
88b86fb1dd
1 changed files with 8 additions and 0 deletions
|
@ -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";
|
||||||
|
|
Loading…
Reference in a new issue