spec test index / oilshell.org
22 passed, 0 OK, 0 not implemented, 0 BUG, 16 failed, 0 timeouts, 0 cases skipped
ysh-cpp | 0 integers expression and augmented assignment [ysh-cpp stdout] Expected 'x=7\nx=11\n', got '' [ysh-cpp status] Expected 0, got 1 stdout: stderr: echo x=$x ^~ [ stdin ]:2: fatal: Undefined variable 'x' |
ysh-cpp | 2 top-level dynamic check: const can't be be mutated [ysh-cpp stdout] Expected 'x=foo\n', got '' stdout: stderr: echo x=$x ^~ [ stdin ]:4: fatal: Undefined variable 'x' |
ysh-cpp | 3 top level: var can be redefined by var/const [ysh-cpp stdout] Expected 'x=global\nx=local\nx=g2\nx=now-const\n', got '' stdout: stderr: echo x=$x ^~ [ stdin ]:2: fatal: Undefined variable 'x' |
ysh-cpp | 4 setvar mutates local [ysh-cpp stdout] Expected 'x=global\nx=local\nx=mutated\nx=global\n', got '' [ysh-cpp status] Expected 0, got 1 stdout: stderr: echo x=$x ^~ [ stdin ]:9: fatal: Undefined variable 'x' |
ysh-cpp | 5 top level: setvar creates global [ysh-cpp stdout] Expected 'x=global\nx=g2\n', got '' [ysh-cpp status] Expected 0, got 1 stdout: stderr: echo x=$x ^~ [ stdin ]:2: fatal: Undefined variable 'x' |
ysh-cpp | 6 top level: setvar mutates var [ysh-cpp stdout] Expected '42\n50\n', got '' [ysh-cpp status] Expected 0, got 1 stdout: stderr: echo $x ^~ [ stdin ]:3: fatal: Undefined variable 'x' |
ysh-cpp | 8 setglobal [ysh-cpp stdout] Expected 'x=global\nx=local\nx=mutated\n', got '' [ysh-cpp status] Expected 0, got 1 stdout: stderr: echo x=$x ^~ [ stdin ]:7: fatal: Undefined variable 'x' |
ysh-cpp | 9 setglobal of undeclared var is allowed [ysh-cpp stdout] Expected 'x=XX\nx=xx\n', got '' [ysh-cpp status] Expected 0, got 1 stdout: stderr: echo x=$x ^~ [ stdin ]:2: fatal: Undefined variable 'x' |
ysh-cpp | 10 var/setvar x, y = 1, 2 [ysh-cpp stdout] Expected 'x=3 y=4\nx=1 y=9\nx=9 y=1\n', got '' [ysh-cpp status] Expected 0, got 1 stdout: stderr: echo "x=$x y=$y" ^~ [ stdin ]:2: fatal: Undefined variable 'x' |
ysh-cpp | 11 setvar d.key = 42 (setitem) [ysh-cpp stdout] Expected 'f3=43\nf2=42\n', got '' [ysh-cpp status] Expected 0, got 1 stdout: stderr: echo f3=$f3 ^~~ [ stdin ]:9: fatal: Undefined variable 'f3' |
ysh-cpp | 12 setvar mylist[1] = 42 (setitem) [ysh-cpp stdout] Expected '1 42 3\n', got '' [ysh-cpp status] Expected 0, got 1 stdout: stderr: write --sep ' ' @mylist ^~~~~~~ [ stdin ]:5: fatal: Can't splice 'mylist' |
ysh-cpp | 13 mixing assignment builtins and Oil assignment [ysh-cpp stdout] Expected 'x=2\nstatus=0\nstatus=1\n', got 'x=1\n' [ysh-cpp status] Expected 0, got 1 stdout: x=1stderr: echo status=$_status ^~~~~~~~ [ stdin ]:16: fatal: Undefined variable '_status' |
ysh-cpp | 14 setref out = 'YY' [ysh-cpp stdout] Expected 'x=XX\nx=YY\nu=YY\n', got '' [ysh-cpp status] Expected 0, got 2 stdout: stderr: proc p (s, out Ref) { ^~~ [ stdin ]:1: proc param types should be Ref, Expr, or Block |
ysh-cpp | 15 setref composes: 2 levels deep [ysh-cpp stdout] Expected 'x=XX\nq s=dummy\nx=YY\n', got '' [ysh-cpp status] Expected 0, got 2 stdout: stderr: proc q(s, out Ref) { ^~~ [ stdin ]:1: proc param types should be Ref, Expr, or Block |
ysh-cpp | 16 circular dict [ysh-cpp stdout] Expected "(OrderedDict) <'name': 'foo'>\n(OrderedDict) <'name': 123>\n(OrderedDict) <'name': 'mystr'>\n(OrderedDict) <'name': ...>\n" Got '' stdout: stderr: |
ysh-cpp | 17 circular list [ysh-cpp stdout] Expected '(List) [1, 2, 3]\n(List) [[...], 2, 3]\n' Got '' stdout: stderr: |