*** Running test-EvalExpr-calls ===== CASE: -c json write (len(42)) ===== json write (len(42)) ^~ [ -c flag ]:1: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c = len(42) ===== = len(42) ^~ [ -c flag ]:1: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c call len(42) ===== call len(42) ^~ [ -c flag ]:1: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c echo $[len(42)] ===== echo $[len(42)] ^~ [ -c flag ]:1: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c echo $[len(z = 42)] ===== echo $[len(z = 42)] ^ [ -c flag ]:1: fatal: Expected at least 1 typed args, but only got 0 ===== CASE: -c echo @[len(42)] ===== echo @[len(42)] ^~ [ -c flag ]:1: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c echo @[len(z = 42)] ===== echo @[len(z = 42)] ^ [ -c flag ]:1: fatal: Expected at least 1 typed args, but only got 0 ===== CASE: -c const x = len(42) ===== const x = len(42) ^~ [ -c flag ]:1: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c setvar x += len(42) ===== setvar x += len(42) ^~ [ -c flag ]:1: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c var d = {} setvar d[len(42)] = "foo" ===== setvar d[len(42)] = "foo" ^~ [ -c flag ]:3: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c var d = {} setvar len(42).z = "foo" ===== setvar len(42).z = "foo" ^ [ -c flag ]:3: Subscript/Attribute not allowed on this LHS expression ===== CASE: -c hay define Package Package foo { x = len(42) } ===== x = len(42) ^~ [ -c flag ]:4: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c if (len(42)) { echo hi } ===== if (len(42)) { echo hi } ^~ [ -c flag ]:1: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c while (len(42)) { echo hi } ===== while (len(42)) { echo hi } ^~ [ -c flag ]:1: fatal: len() expected Str, List, or Dict, got Int ===== CASE: -c for x in (len(42)) { echo $x } ===== for x in (len(42)) { echo $x } ^~ [ -c flag ]:1: fatal: len() expected Str, List, or Dict, got Int OK test-EvalExpr-calls *** Running test-append-usage-error ===== CASE: -c append x ([]) ===== ===== CASE: -c append ===== append ^~~~~~ [ -c flag ]:1: fatal: Expected at least 1 typed args, but only got 0 ===== CASE: -c append x ===== append x ^~~~~~ [ -c flag ]:1: fatal: Expected at least 1 typed args, but only got 0 ===== CASE: -c append x ([], []) ===== append x ([], []) ^ [ -c flag ]:1: fatal: Expected 1 typed args, but got 2 OK test-append-usage-error *** Running test-assert ===== CASE: -c assert [0.0] ===== assert [0.0] ^ [ -c flag ]:1: fatal: Expression isn't true ===== CASE: -c assert [3 > 4] ===== assert [3 > 4] ^ [ -c flag ]:1: fatal: Expression isn't true ===== CASE: -c assert (0) ===== Value isn't true: (Int) 0 assert (0) ^ [ -c flag ]:1: fatal: assertion ===== CASE: -c assert (null === 42) ===== Value isn't true: (Bool) false assert (null === 42) ^ [ -c flag ]:1: fatal: assertion ===== CASE: -c assert [null === 42] ===== Expected: (Null) null Got: (Int) 42 assert [null === 42] ^~~ [ -c flag ]:1: fatal: Not equal ===== CASE: -c assert [null === list(1 .. 50)] ===== assert [null === list(1 .. 50)] ^~ [ -c flag ]:1: Use 1..<5 for an open range, or 1..=5 for a closed range test/ysh-runtime-errors.sh: fatal: test/ysh-runtime-errors.sh: expected status 3, got 2 FAIL test-assert