[1/1] SYMLINK _bin/cxx-asan oils-for-unix ysh 'ysh' -> 'oils-for-unix' *** 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-const-decl ===== CASE: -c const x = {}; const x = {}; ===== const x = {}; const x = {}; ^ [ -c flag ]:1: fatal: Can't assign to readonly value 'x' ===== CASE: -c const x; const x; ===== const x; const x; ^ [ -c flag ]:1: fatal: Can't assign to readonly value 'x' OK test-const-decl *** Running test-dict-convert ===== CASE: -c = dict(1) ===== = dict(1) ^ [ -c flag ]:1: fatal: dict() expected Dict or BashAssoc, got Int ===== CASE: -c = dict("foo") ===== = dict("foo") ^ [ -c flag ]:1: fatal: dict() expected Dict or BashAssoc, got Str ===== CASE: -c = dict(len) ===== = dict(len) ^~~ [ -c flag ]:1: fatal: dict() expected Dict or BashAssoc, got BuiltinFunc ===== CASE: -c = dict("foo"->startswith) ===== = dict("foo"->startswith) ^~~~~~~~~~ [ -c flag ]:1: fatal: Method 'startswith' does not exist on type Str ===== CASE: -c = dict([["too", "many", "parts"]]) ===== = dict([["too", "many", "parts"]]) ^ [ -c flag ]:1: fatal: dict() expected Dict or BashAssoc, got List OK test-dict-convert *** Running test-eggex ===== CASE: -c = / [ \x00 \xff ] / ===== (Eggex) ===== CASE: -c = / [ \x00-\xff ] / ===== (Eggex) ===== CASE: -c = / [ $'\x00 \xff' ] / ===== = / [ $'\x00 \xff' ] / ^~ [ -c flag ]:1: fatal: Use unquoted char literal for byte 255, which is >= 128 (avoid confusing a set of bytes with a sequence) ===== CASE: -c = / [ \u{0} ] / ===== (Eggex) ===== CASE: -c = / [ \u{0}-\u{1} ] / ===== (Eggex) ===== CASE: -c var x =/ [ \u{80} ] /; echo $x ===== var x =/ [ \u{80} ] /; echo $x ^~~~~~ [ -c flag ]:1: fatal: ERE can't express char code 128 ===== CASE: -c var x = / [ \u{7f}-\u{80} ] /; echo $x ===== var x = / [ \u{7f}-\u{80} ] /; echo $x ^~~~~~ [ -c flag ]:1: fatal: ERE can't express char code 128 ===== CASE: -c = / [ \\ '^-]' 'abc' ] / ===== (Eggex) ===== CASE: -c var x = / [ a-'^' ] /; echo $x ===== var x = / [ a-'^' ] /; echo $x ^ [ -c flag ]:1: fatal: Can't use char 94 as end of range in ERE syntax ===== CASE: -c var x = / [ '-'-z ] /; echo $x ===== var x = / [ '-'-z ] /; echo $x ^ [ -c flag ]:1: fatal: Can't use char 45 as start of range in ERE syntax ===== CASE: -c var x = / [ ']'-z ] /; echo $x ===== var x = / [ ']'-z ] /; echo $x ^ [ -c flag ]:1: fatal: Can't use char 93 as start of range in ERE syntax ===== CASE: -c var x = / ['^'] /; echo $x ===== [^] ===== CASE: -c var i = 42 = / @i / # splice object of wrong type ===== = / @i / # splice object of wrong type ^ [ -c flag ]:3: fatal: Eggex splice expected Str or Eggex, got Int ===== CASE: -c var i = 42 = / [a @i] / # char class splice object of wrong type ===== = / [a @i] / # char class splice object of wrong type ^ [ -c flag ]:3: fatal: Eggex char class splice expected Str, got Int OK test-eggex *** Running test-eggex-2 ===== CASE: -c var sq = / 'foo'+ / ===== ===== CASE: -c var sq = / ('foo')+ / echo $sq var sq2 = / + / echo $sq2 ===== (foo)+ (foo)+ ===== CASE: -c var literal = "foo" var svs = / @literal+ / echo $svs ===== var svs = / @literal+ / ^ [ -c flag ]:3: fatal: POSIX EREs don't have groups without capture, so this node needs () around it. OK test-eggex-2 *** Running test-eggex-api ===== CASE: -c = _group(0) ===== = _group(0) ^ [ -c flag ]:1: fatal: No regex capture groups ===== CASE: -c if ("foo" ~ /[a-z]/) { echo $[_group(1)] } ===== if ("foo" ~ /[a-z]/) { echo $[_group(1)] } ^ [ -c flag ]:1: fatal: Expected capture group less than 1, got 1 ===== CASE: -c if ("foo" ~ /[a-z]/) { echo $[_group("name")] } ===== if ("foo" ~ /[a-z]/) { echo $[_group("name")] } ^ [ -c flag ]:1: fatal: No such group 'name' ===== CASE: -c if ("foo" ~ "[a-z]") { echo $[_group(1)] } ===== if ("foo" ~ "[a-z]") { echo $[_group(1)] } ^ [ -c flag ]:1: fatal: Expected capture group less than 1, got 1 ===== CASE: -c if ("foo" ~ "[a-z]") { echo $[_group("name")] } ===== if ("foo" ~ "[a-z]") { echo $[_group("name")] } ^ [ -c flag ]:1: fatal: ERE captures don't have names ('name') ===== CASE: -c = _group("foo") ===== = _group("foo") ^ [ -c flag ]:1: fatal: No regex capture groups OK test-eggex-api *** Running test-eggex-convert-func ===== CASE: -c = / / ===== (Eggex) ===== CASE: -c = / / ===== (Eggex) ===== CASE: -c = / / ===== (Eggex) ===== CASE: -c = / / ===== = / / ^~~ [ -c flag ]:1: fatal: Expected 'BAD' to be a func, got Undef ===== CASE: -c = / / ===== = / / ^~~ [ -c flag ]:1: fatal: Expected 'BAD' to be a func, got Undef ===== CASE: -c var pat = / /; var m = "10" => search(pat) => group(1) ===== var pat = / /; var m = "10" => search(pat) => group(1) ^ [ -c flag ]:1: Fatal error calling Eggex conversion func 'evalExpr' from this Match accessor var pat = / /; var m = "10" => search(pat) => group(1) ^~~~~~~~ [ -c flag ]:1: fatal: Arg 1 should be a Expr, got Str OK test-eggex-convert-func *** Running test-equality ===== CASE: -c = ^[42] === ^[43] ===== = ^[42] === ^[43] ^~~ [ -c flag ]:2: fatal: Can't compare two values of type Expr ===== CASE: -c = ^(echo hi) === ^(echo yo) ===== = ^(echo hi) === ^(echo yo) ^~~ [ -c flag ]:2: fatal: Can't compare two values of type Command OK test-equality *** Running test-error-builtin ===== CASE: -c error ===== error ^~~~~ [ -c flag ]:1: 'error' expected a message to display error ^~~~~ [ -c flag ]:1: errexit PID 12871: command.Simple failed with status 2 ===== CASE: -c error -- ===== error -- ^~~~~ [ -c flag ]:1: 'error' expected a message to display error -- ^~~~~ [ -c flag ]:1: errexit PID 12873: command.Simple failed with status 2 ===== CASE: -c error -- oops ===== error -- oops ^~~~~ [ -c flag ]:1: fatal: oops ===== CASE: -c error oops ===== error oops ^~~~~ [ -c flag ]:1: fatal: oops ===== CASE: -c error oops (status=99) ===== error oops (status=99) ^~~~~ [ -c flag ]:1: fatal: oops test/ysh-runtime-errors.sh: expected status 99, got 10 FAIL test-error-builtin