Files
lix/tests/functional2/repl_characterization/repl_basics/input.md
T
rootile ab8cdcc9b8 tests(f2/repl): migrate basic tests
Change-Id: I22241734a7249d376c86b3a226c5f1a82c03fd33
2026-06-11 16:19:20 +02:00

928 B

args
args
-v

Adding variables gives simple user feedback

foo = 5
foo = 10
Added foo.

Updated foo.

Optional semicolon at the end, allow setting multiple variables in one line

foo = 2;
foo = 2; bar = 3;
Updated foo.

Updated foo.
Added bar.

String identifiers work

"silly name" = null
Added "silly name".

Attrset syntax works, but without dynamic attrs or merging

foo.bar = "baz"
foo
foo."this works" = 42
foo
foo.bar = "baz"; foo.more = "error"
${foo} = 10
Updated foo.

{ bar = "baz"; }

Updated foo.

{ "this works" = 42; }

error: attribute 'foo' already defined at «string»:1:18
       at «string»:1:12:
            1| foo.bar = "baz"; foo.more = "error"
             |            ^

error: dynamic attributes not allowed in REPL
       at «string»:1:1:
            1| ${foo} = 10
             | ^