mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
Slight change to how assert works to support this. We no longer automatically add a semicolon to the expressions we require the user to right them. This updates the docs to illustrate that and reformats our integration test suite for this and readability.
40 lines
524 B
Plaintext
40 lines
524 B
Plaintext
let simpletpl = {
|
|
foo = "bar"
|
|
};
|
|
|
|
let stringfieldtpl = {
|
|
"field 1" = 1,
|
|
};
|
|
|
|
let nestedtpl = {
|
|
inner = {
|
|
field = "value",
|
|
},
|
|
scalar = 1,
|
|
list = [1, 2, 3, 4],
|
|
};
|
|
|
|
assert |
|
|
simpletpl.foo == "bar";
|
|
|;
|
|
assert |
|
|
stringfieldtpl."field 1" == 1;
|
|
|;
|
|
assert |
|
|
nestedtpl.scalar == 1;
|
|
|;
|
|
assert |
|
|
nestedtpl.inner.field == "value";
|
|
|;
|
|
assert |
|
|
nestedtpl.list.0 == 1;
|
|
|;
|
|
assert |
|
|
nestedtpl.list.1 == 2;
|
|
|;
|
|
assert |
|
|
nestedtpl.list.2 == 3;
|
|
|;
|
|
assert |
|
|
nestedtpl.list.3 == 4;
|
|
|; |