~/git/oilshell/oil/opy/_tmp/repo-with-opy ~/git/oilshell/oil/opy asdl/arith_parse_test.pyc Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/opy_.py", line 88, in main(sys.argv) File "/home/andy/git/oilshell/oil/bin/opy_.py", line 72, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/opy_.py", line 64, in AppBundleMain return opy_main.OpyCommandMain(main_argv) File "/home/andy/git/oilshell/oil/opy/opy_main.py", line 502, in OpyCommandMain num_ticks = ovm.run_code_object(co, opy_argv) File "/home/andy/git/oilshell/oil/opy/byterun/execfile.py", line 36, in run_code_object pyvm2.run_code(vm, code, f_globals=main_mod.__dict__) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 88, in run_code val = vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb ImportError: cannot import name typed_demo_asdl asdl/demo_asdl_test.pyc ......... ---------------------------------------------------------------------- Ran 9 tests in 0.006s OK -- COMPOUND SUM -- (arith_expr.ArithVar name:x) (arith_expr.ArithVar name:y) (arith_expr.Slice a:(arith_expr.ArithVar name:foo)) (arith_expr.FuncCall name:f) (arith_expr.Const i:66) (arith_expr.Slice a:(arith_expr.Const i:1) begin:(arith_expr.Const i:5) end:(arith_expr.Const i:2)) -- PRODUCT -- (source_location path:hi line:1 col:2 length:3) -- SIMPLE SUM -- asdl/format_test.pyc (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x]) (assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x])(assign name:declare flags:[-r -x]) (op_array ops:[Plus Plus]) asdl/front_end_test.pyc . ---------------------------------------------------------------------- Ran 1 test in 0.143s OK asdl/typed_arith_parse_test.pyc --- 1+2+3 (arith_expr.Binary op: '+' left: (arith_expr.Binary op:'+' left:(arith_expr.Const i:1) right:(arith_expr.Const i:2)) right: (arith_expr.Const i:3) ) (B '+' (B '+' (1) (2)) (3)) --- 1+2*3 (arith_expr.Binary op: '+' left: (arith_expr.Const i:1) right: (arith_expr.Binary op:'*' left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) ) (B '+' (1) (B '*' (2) (3))) --- 4*(2+3) (arith_expr.Binary op: '*' left: (arith_expr.Const i:4) right: (arith_expr.Binary op:'+' left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) ) (B '*' (4) (B '+' (2) (3))) --- (2+3)*4 (arith_expr.Binary op: '*' left: (arith_expr.Binary op:'+' left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) right: (arith_expr.Const i:4) ) (B '*' (B '+' (2) (3)) (4)) --- 1<2 (arith_expr.Binary op:'<' left:(arith_expr.Const i:1) right:(arith_expr.Const i:2)) (B '<' (1) (2)) --- x=3 (arith_expr.Binary op:'=' left:(arith_expr.Var name:x) right:(arith_expr.Const i:3) spids:[42 43]) (arith_expr.Binary op:'=' left:($ x) right:(3)) --- x = 2*3 (arith_expr.Binary op: '=' left: (arith_expr.Var name:x) right: (arith_expr.Binary op:'*' left:(arith_expr.Const i:2) right:(arith_expr.Const i:3)) spids: [42 43] ) (arith_expr.Binary op:'=' left:($ x) right:(B '*' (2) (3))) --- x = y (arith_expr.Binary op:'=' left:(arith_expr.Var name:x) right:(arith_expr.Var name:y) spids:[42 43]) (arith_expr.Binary op:'=' left:($ x) right:($ y)) --- x*y - y*z (arith_expr.Binary op: - left: (arith_expr.Binary op:'*' left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:'*' left:(arith_expr.Var name:y) right:(arith_expr.Var name:z)) ) (B - (B '*' ($ x) ($ y)) (B '*' ($ y) ($ z))) --- x/y - y%z (arith_expr.Binary op: - left: (arith_expr.Binary op:/ left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:'%' left:(arith_expr.Var name:y) right:(arith_expr.Var name:z)) ) (B - (B / ($ x) ($ y)) (B '%' ($ y) ($ z))) --- x = y (arith_expr.Binary op:'=' left:(arith_expr.Var name:x) right:(arith_expr.Var name:y) spids:[42 43]) (arith_expr.Binary op:'=' left:($ x) right:($ y)) --- 2 ** 3 ** 2 (arith_expr.Binary op: '**' left: (arith_expr.Const i:2) right: (arith_expr.Binary op:'**' left:(arith_expr.Const i:3) right:(arith_expr.Const i:2)) ) (B '**' (2) (B '**' (3) (2))) --- a = b = 10 (arith_expr.Binary op: '=' left: (arith_expr.Var name:a) right: (arith_expr.Binary op: '=' left: (arith_expr.Var name:b) right: (arith_expr.Const i:10) spids: [42 43] ) spids: [42 43] ) (arith_expr.Binary op:'=' left:($ a) right:(arith_expr.Binary op:'=' left:($ b) right:(10))) --- x = ((y*4)-2) (arith_expr.Binary op: '=' left: (arith_expr.Var name:x) right: (arith_expr.Binary op: - left: (arith_expr.Binary op:'*' left:(arith_expr.Var name:y) right:(arith_expr.Const i:4)) right: (arith_expr.Const i:2) ) spids: [42 43] ) (arith_expr.Binary op:'=' left:($ x) right:(B - (B '*' ($ y) (4)) (2))) --- x - -y (arith_expr.Binary op: - left: (arith_expr.Var name:x) right: (arith_expr.Unary op:- a:(arith_expr.Var name:y)) ) (B - ($ x) (U - ($ y))) --- -1 * -2 (arith_expr.Binary op: '*' left: (arith_expr.Unary op:- a:(arith_expr.Const i:1)) right: (arith_expr.Unary op:- a:(arith_expr.Const i:2)) ) (B '*' (U - (1)) (U - (2))) --- -x * -y (arith_expr.Binary op: '*' left: (arith_expr.Unary op:- a:(arith_expr.Var name:x)) right: (arith_expr.Unary op:- a:(arith_expr.Var name:y)) ) (B '*' (U - ($ x)) (U - ($ y))) --- x - -234 (arith_expr.Binary op: - left: (arith_expr.Var name:x) right: (arith_expr.Unary op:- a:(arith_expr.Const i:234)) ) (B - ($ x) (U - (234))) --- x += y += 3 (arith_expr.Binary op: '+=' left: (arith_expr.Var name:x) right: (arith_expr.Binary op: '+=' left: (arith_expr.Var name:y) right: (arith_expr.Const i:3) spids: [42 43] ) spids: [42 43] ) (B '+=' ($ x) (B '+=' ($ y) (3))) --- x[1,2] (arith_expr.Index a: (arith_expr.Var name:x) index: (arith_expr.Binary op:',' left:(arith_expr.Const i:1) right:(arith_expr.Const i:2)) ) (arith_expr.Index a:($ x) index:(B ',' (1) (2))) --- +1 - +2 (arith_expr.Binary op: - left: (arith_expr.Unary op:'+' a:(arith_expr.Const i:1)) right: (arith_expr.Unary op:'+' a:(arith_expr.Const i:2)) ) (B - (U '+' (1)) (U '+' (2))) --- f[x] += 1 (arith_expr.Binary op: '+=' left: (arith_expr.Index a:(arith_expr.Var name:f) index:(arith_expr.Var name:x)) right: (arith_expr.Const i:1) spids: [42 43] ) (B '+=' (arith_expr.Index a:($ f) index:($ x)) (1)) --- ~1 | ~2 (arith_expr.Binary op: '|' left: (arith_expr.Unary op:'~' a:(arith_expr.Const i:1)) right: (arith_expr.Unary op:'~' a:(arith_expr.Const i:2)) ) (B '|' (U '~' (1)) (U '~' (2))) --- x & y | a & b (arith_expr.Binary op: '|' left: (arith_expr.Binary op:'&' left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:'&' left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) ) (B '|' (B '&' ($ x) ($ y)) (B '&' ($ a) ($ b))) --- ~x ^ y (arith_expr.Binary op: '^' left: (arith_expr.Unary op:'~' a:(arith_expr.Var name:x)) right: (arith_expr.Var name:y) ) (B '^' (U '~' ($ x)) ($ y)) --- x << y | y << z (arith_expr.Binary op: '|' left: (arith_expr.Binary op:'<<' left:(arith_expr.Var name:x) right:(arith_expr.Var name:y)) right: (arith_expr.Binary op:'<<' left:(arith_expr.Var name:y) right:(arith_expr.Var name:z)) ) (B '|' (B '<<' ($ x) ($ y)) (B '<<' ($ y) ($ z))) --- a ^= b-1 (arith_expr.Binary op: '^=' left: (arith_expr.Var name:a) right: (arith_expr.Binary op:- left:(arith_expr.Var name:b) right:(arith_expr.Const i:1)) spids: [42 43] ) (B '^=' ($ a) (B - ($ b) (1))) --- a && b || c && d (arith_expr.Binary op: '||' left: (arith_expr.Binary op:'&&' left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) right: (arith_expr.Binary op:'&&' left:(arith_expr.Var name:c) right:(arith_expr.Var name:d)) ) (B '||' (B '&&' ($ a) ($ b)) (B '&&' ($ c) ($ d))) --- !a && !b (arith_expr.Binary op: '&&' left: (arith_expr.Unary op:'!' a:(arith_expr.Var name:a)) right: (arith_expr.Unary op:'!' a:(arith_expr.Var name:b)) ) (B '&&' (U '!' ($ a)) (U '!' ($ b))) --- a != b && c == d (arith_expr.Binary op: '&&' left: (arith_expr.Binary op:'!=' left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) right: (arith_expr.Binary op:'==' left:(arith_expr.Var name:c) right:(arith_expr.Var name:d)) ) (B '&&' (B '!=' ($ a) ($ b)) (B '==' ($ c) ($ d))) --- a > b ? 0 : 1 (arith_expr.Ternary cond: (arith_expr.Binary op:'>' left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) true_expr: (arith_expr.Const i:0) false_expr: (arith_expr.Const i:1) ) (arith_expr.Ternary cond:(B '>' ($ a) ($ b)) true_expr:(0) false_expr:(1)) --- a > b ? x+1 : y+1 (arith_expr.Ternary cond: (arith_expr.Binary op:'>' left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) true_expr: (arith_expr.Binary op:'+' left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) false_expr: (arith_expr.Binary op:'+' left:(arith_expr.Var name:y) right:(arith_expr.Const i:1)) ) (arith_expr.Ternary cond:(B '>' ($ a) ($ b)) true_expr:(B '+' ($ x) (1)) false_expr:(B '+' ($ y) (1))) --- 1 ? true1 : 2 ? true2 : false (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Var name:true1) false_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:true2) false_expr: (arith_expr.Var name:false) ) ) (arith_expr.Ternary cond: (1) true_expr: ($ true1) false_expr: (arith_expr.Ternary cond:(2) true_expr:($ true2) false_expr:($ false)) ) --- 1 ? true1 : (2 ? true2 : false) (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Var name:true1) false_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:true2) false_expr: (arith_expr.Var name:false) ) ) (arith_expr.Ternary cond: (1) true_expr: ($ true1) false_expr: (arith_expr.Ternary cond:(2) true_expr:($ true2) false_expr:($ false)) ) --- 1 ? (2 ? true : false1) : false2 (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:true) false_expr: (arith_expr.Var name:false1) ) false_expr: (arith_expr.Var name:false2) ) (arith_expr.Ternary cond: (1) true_expr: (arith_expr.Ternary cond:(2) true_expr:($ true) false_expr:($ false1)) false_expr: ($ false2) ) --- 1 ? 2 ? true : false1 : false2 (arith_expr.Ternary cond: (arith_expr.Const i:1) true_expr: (arith_expr.Ternary cond: (arith_expr.Const i:2) true_expr: (arith_expr.Var name:true) false_expr: (arith_expr.Var name:false1) ) false_expr: (arith_expr.Var name:false2) ) (arith_expr.Ternary cond: (1) true_expr: (arith_expr.Ternary cond:(2) true_expr:($ true) false_expr:($ false1)) false_expr: ($ false2) ) --- x ? 1 : 2, y ? 3 : 4 (arith_expr.Binary op: ',' left: (arith_expr.Ternary cond: (arith_expr.Var name:x) true_expr: (arith_expr.Const i:1) false_expr: (arith_expr.Const i:2) ) right: (arith_expr.Ternary cond: (arith_expr.Var name:y) true_expr: (arith_expr.Const i:3) false_expr: (arith_expr.Const i:4) ) ) (B ',' (arith_expr.Ternary cond:($ x) true_expr:(1) false_expr:(2)) (arith_expr.Ternary cond:($ y) true_expr:(3) false_expr:(4)) ) --- !x (arith_expr.Unary op:'!' a:(arith_expr.Var name:x)) (U '!' ($ x)) --- x-- (arith_expr.Unary op:-- a:(arith_expr.Var name:x)) (U -- ($ x)) --- x[1]-- (arith_expr.Unary op:-- a:(arith_expr.Index a:(arith_expr.Var name:x) index:(arith_expr.Const i:1))) (U -- (arith_expr.Index a:($ x) index:(1))) --- --x (arith_expr.Unary op:-- a:(arith_expr.Var name:x)) (U -- ($ x)) --- ++x[1] (arith_expr.Unary op:'++' a:(arith_expr.Index a:(arith_expr.Var name:x) index:(arith_expr.Const i:1))) (U '++' (arith_expr.Index a:($ x) index:(1))) --- !x-- (arith_expr.Unary op:'!' a:(arith_expr.Unary op:-- a:(arith_expr.Var name:x))) (U '!' (U -- ($ x))) --- ~x++ (arith_expr.Unary op:'~' a:(arith_expr.Unary op:'++' a:(arith_expr.Var name:x))) (U '~' (U '++' ($ x))) --- x++ - y++ (arith_expr.Binary op: - left: (arith_expr.Unary op:'++' a:(arith_expr.Var name:x)) right: (arith_expr.Unary op:'++' a:(arith_expr.Var name:y)) ) (B - (U '++' ($ x)) (U '++' ($ y))) --- ++x - ++y (arith_expr.Binary op: - left: (arith_expr.Unary op:'++' a:(arith_expr.Var name:x)) right: (arith_expr.Unary op:'++' a:(arith_expr.Var name:y)) ) (B - (U '++' ($ x)) (U '++' ($ y))) --- x[1] (arith_expr.Index a:(arith_expr.Var name:x) index:(arith_expr.Const i:1)) (arith_expr.Index a:($ x) index:(1)) --- x[a+b] (arith_expr.Index a: (arith_expr.Var name:x) index: (arith_expr.Binary op:'+' left:(arith_expr.Var name:a) right:(arith_expr.Var name:b)) ) (arith_expr.Index a:($ x) index:(B '+' ($ a) ($ b))) --- x[1:2] (arith_expr.Slice a:(arith_expr.Var name:x) begin:(arith_expr.Const i:1) end:(arith_expr.Const i:2)) (arith_expr.Slice a:($ x) begin:(1) end:(2)) --- x = y(2)*3 + y(4)*5 (arith_expr.Binary op: '=' left: (arith_expr.Var name:x) right: (arith_expr.Binary op: '+' left: (arith_expr.Binary op: '*' left: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:2)]) right: (arith_expr.Const i:3) ) right: (arith_expr.Binary op: '*' left: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:4)]) right: (arith_expr.Const i:5) ) ) spids: [42 43] ) (arith_expr.Binary op: '=' left: ($ x) right: (B '+' (B '*' (arith_expr.FuncCall name:y args:[(2)]) (3)) (B '*' (arith_expr.FuncCall name:y args:[(4)]) (5)) ) ) --- x(1,2)+y(3,4) (arith_expr.Binary op: '+' left: (arith_expr.FuncCall name:x args:[(arith_expr.Const i:1) (arith_expr.Const i:2)]) right: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:3) (arith_expr.Const i:4)]) ) (B '+' (arith_expr.FuncCall name:x args:[(1) (2)]) (arith_expr.FuncCall name:y args:[(3) (4)])) --- x(a,b,c[d]) (arith_expr.FuncCall name: x args: [ (arith_expr.Var name:a) (arith_expr.Var name:b) (arith_expr.Index a:(arith_expr.Var name:c) index:(arith_expr.Var name:d)) ] ) (arith_expr.FuncCall name:x args:[($ a) ($ b) (arith_expr.Index a:($ c) index:($ d))]) --- x(1,2)*j+y(3,4)*k+z(5,6)*l (arith_expr.Binary op: '+' left: (arith_expr.Binary op: '+' left: (arith_expr.Binary op: '*' left: (arith_expr.FuncCall name:x args:[(arith_expr.Const i:1) (arith_expr.Const i:2)]) right: (arith_expr.Var name:j) ) right: (arith_expr.Binary op: '*' left: (arith_expr.FuncCall name:y args:[(arith_expr.Const i:3) (arith_expr.Const i:4)]) right: (arith_expr.Var name:k) ) ) right: (arith_expr.Binary op: '*' left: (arith_expr.FuncCall name:z args:[(arith_expr.Const i:5) (arith_expr.Const i:6)]) right: (arith_expr.Var name:l) ) ) (B '+' (B '+' (B '*' (arith_expr.FuncCall name:x args:[(1) (2)]) ($ j)) (B '*' (arith_expr.FuncCall name:y args:[(3) (4)]) ($ k)) ) (B '*' (arith_expr.FuncCall name:z args:[(5) (6)]) ($ l)) ) --- print(test(2,3)) (arith_expr.FuncCall name: print args: [(arith_expr.FuncCall name:test args:[(arith_expr.Const i:2) (arith_expr.Const i:3)])] ) (arith_expr.FuncCall name:print args:[(arith_expr.FuncCall name:test args:[(2) (3)])]) --- print("x") (arith_expr.FuncCall name:print args:[(arith_expr.Var name:x)]) (arith_expr.FuncCall name:print args:[($ x)]) --- min(255,n*2) (arith_expr.FuncCall name: min args: [ (arith_expr.Const i:255) (arith_expr.Binary op:'*' left:(arith_expr.Var name:n) right:(arith_expr.Const i:2)) ] ) (arith_expr.FuncCall name:min args:[(255) (B '*' ($ n) (2))]) --- c = pal[i*8] (arith_expr.Binary op: '=' left: (arith_expr.Var name:c) right: (arith_expr.Index a: (arith_expr.Var name:pal) index: (arith_expr.Binary op:'*' left:(arith_expr.Var name:i) right:(arith_expr.Const i:8)) ) spids: [42 43] ) (arith_expr.Binary op:'=' left:($ c) right:(arith_expr.Index a:($ pal) index:(B '*' ($ i) (8)))) --- x=1,y=2,z=3 (arith_expr.Binary op: ',' left: (arith_expr.Binary op: ',' left: (arith_expr.Binary op: '=' left: (arith_expr.Var name:x) right: (arith_expr.Const i:1) spids: [42 43] ) right: (arith_expr.Binary op: '=' left: (arith_expr.Var name:y) right: (arith_expr.Const i:2) spids: [42 43] ) ) right: (arith_expr.Binary op: '=' left: (arith_expr.Var name:z) right: (arith_expr.Const i:3) spids: [42 43] ) ) (B ',' (B ',' (arith_expr.Binary op:'=' left:($ x) right:(1)) (arith_expr.Binary op:'=' left:($ y) right:(2))) (arith_expr.Binary op:'=' left:($ z) right:(3)) )got expected error for }: Unexpected end of input got expected error for ]: can't be used in prefix position got expected error for {: Unexpected end of input got expected error for x+1 = y: Can't assign to (arith_expr.Binary op:'+' left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) got expected error for (x+1)++: Can't assign to (arith_expr.Binary op:'+' left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) got expected error for foo ? 1 :: Unexpected end of input got expected error for foo ? 1 : expected :, got got expected error for %: can't be used in prefix position got expected error for }: Unexpected end of input got expected error for {: Unexpected end of input got expected error for ]: can't be used in prefix position got expected error for 1 ( 2: (arith_expr.Const i:1) can't be called got expected error for (x+1) ( 2 ): (arith_expr.Binary op:'+' left:(arith_expr.Var name:x) right:(arith_expr.Const i:1)) can't be called got expected error for 1 [ 2 ]: (arith_expr.Const i:1) can't be indexed core/alloc_test.pyc .. ---------------------------------------------------------------------- Ran 2 tests in 0.006s OK core/completion_test.pyc Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/opy_.py", line 88, in main(sys.argv) File "/home/andy/git/oilshell/oil/bin/opy_.py", line 72, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/opy_.py", line 64, in AppBundleMain return opy_main.OpyCommandMain(main_argv) File "/home/andy/git/oilshell/oil/opy/opy_main.py", line 502, in OpyCommandMain num_ticks = ovm.run_code_object(co, opy_argv) File "/home/andy/git/oilshell/oil/opy/byterun/execfile.py", line 36, in run_code_object pyvm2.run_code(vm, code, f_globals=main_mod.__dict__) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 88, in run_code val = vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb ImportError: No module named testdata.completion core/id_kind_test.pyc . True ['Arith_Amp', 'Arith_AmpEqual', 'Arith_Bang', 'Arith_Caret', 'Arith_CaretEqual', 'Arith_Colon', 'Arith_Comma', 'Arith_DAmp', 'Arith_DEqual', 'Arith_DGreat', 'Arith_DGreatEqual', 'Arith_DLess', 'Arith_DLessEqual', 'Arith_DMinus', 'Arith_DPipe', 'Arith_DPlus', 'Arith_DStar', 'Arith_Equal', 'Arith_Great', 'Arith_GreatEqual', 'Arith_LBracket', 'Arith_LParen', 'Arith_Less', 'Arith_LessEqual', 'Arith_Minus', 'Arith_MinusEqual', 'Arith_NEqual', 'Arith_Percent', 'Arith_PercentEqual', 'Arith_Pipe', 'Arith_PipeEqual', 'Arith_Plus', 'Arith_PlusEqual', 'Arith_QMark', 'Arith_RBrace', 'Arith_RBracket', 'Arith_RParen', 'Arith_Semi', 'Arith_Slash', 'Arith_SlashEqual', 'Arith_Star', 'Arith_StarEqual', 'Arith_Tilde', 'Assign_Declare', 'Assign_Local', 'Assign_None', 'Assign_Readonly', 'Assign_Typeset', 'Backtick_Other', 'Backtick_Quoted', 'Backtick_Right', 'BoolBinary_DEqual', 'BoolBinary_Equal', 'BoolBinary_EqualTilde', 'BoolBinary_GlobDEqual', 'BoolBinary_GlobEqual', 'BoolBinary_GlobNEqual', 'BoolBinary_NEqual', 'BoolBinary_ef', 'BoolBinary_eq', 'BoolBinary_ge', 'BoolBinary_gt', 'BoolBinary_le', 'BoolBinary_lt', 'BoolBinary_ne', 'BoolBinary_nt', 'BoolBinary_ot', 'BoolUnary_G', 'BoolUnary_L', 'BoolUnary_N', 'BoolUnary_O', 'BoolUnary_R', 'BoolUnary_S', 'BoolUnary_a', 'BoolUnary_b', 'BoolUnary_c', 'BoolUnary_d', 'BoolUnary_e', 'BoolUnary_f', 'BoolUnary_g', 'BoolUnary_h', 'BoolUnary_n', 'BoolUnary_o', 'BoolUnary_p', 'BoolUnary_r', 'BoolUnary_s', 'BoolUnary_t', 'BoolUnary_u', 'BoolUnary_v', 'BoolUnary_w', 'BoolUnary_x', 'BoolUnary_z', 'Char_BadBackslash', 'Char_Hex', 'Char_Literals', 'Char_Octal3', 'Char_Octal4', 'Char_OneChar', 'Char_Stop', 'Char_Unicode4', 'Char_Unicode8', 'ControlFlow_Break', 'ControlFlow_Continue', 'ControlFlow_Exit', 'ControlFlow_Return', 'Eof_Backtick', 'Eof_RParen', 'Eof_Real', 'Eol_Tok', 'ExtGlob_At', 'ExtGlob_Bang', 'ExtGlob_Plus', 'ExtGlob_QMark', 'ExtGlob_Star', 'Fd_Name', 'Fd_Number', 'Glob_BadBackslash', 'Glob_Bang', 'Glob_Caret', 'Glob_CleanLiterals', 'Glob_Eof', 'Glob_EscapedChar', 'Glob_LBracket', 'Glob_OtherLiteral', 'Glob_QMark', 'Glob_RBracket', 'Glob_Star', 'History_Num', 'History_Op', 'History_Other', 'History_Search', 'Ignored_Comment', 'Ignored_LineCont', 'Ignored_Space', 'KW_Bang', 'KW_Case', 'KW_Const', 'KW_DLeftBracket', 'KW_Do', 'KW_Done', 'KW_Elif', 'KW_Else', 'KW_Esac', 'KW_Fi', 'KW_For', 'KW_Fork', 'KW_Func', 'KW_Function', 'KW_If', 'KW_In', 'KW_Match', 'KW_Proc', 'KW_Set', 'KW_SetGlobal', 'KW_Shell', 'KW_Then', 'KW_Time', 'KW_Until', 'KW_Var', 'KW_While', 'KW_With', 'Left_ArithSub', 'Left_ArithSub2', 'Left_Backtick', 'Left_BraceSub', 'Left_BracketSub', 'Left_CommandSub', 'Left_DollarDoubleQuote', 'Left_DollarSingleQuote', 'Left_DoubleQuote', 'Left_ParenSub', 'Left_ProcSubIn', 'Left_ProcSubOut', 'Left_SingleQuote', 'Left_VarSub', 'Lit_ArithVarLike', 'Lit_ArrayLhsClose', 'Lit_ArrayLhsOpen', 'Lit_At', 'Lit_Chars', 'Lit_Comma', 'Lit_CompDummy', 'Lit_DRightBracket', 'Lit_Digits', 'Lit_EscapedChar', 'Lit_LBrace', 'Lit_Other', 'Lit_Percent', 'Lit_Pound', 'Lit_RBrace', 'Lit_RegexMeta', 'Lit_Slash', 'Lit_TildeLike', 'Lit_VarLike', 'Node_AndOr', 'Node_Assign', 'Node_BinaryExpr', 'Node_Block', 'Node_Command', 'Node_ConstInt', 'Node_ForEach', 'Node_ForExpr', 'Node_Fork', 'Node_FuncCall', 'Node_FuncDef', 'Node_NoOp', 'Node_PostDMinus', 'Node_PostDPlus', 'Node_Subshell', 'Node_TernaryExpr', 'Node_UnaryExpr', 'Node_UnaryMinus', 'Node_UnaryPlus', 'Op_Amp', 'Op_Bang', 'Op_DAmp', 'Op_DLeftParen', 'Op_DPipe', 'Op_DRightParen', 'Op_DSemi', 'Op_LBrace', 'Op_LBracket', 'Op_LParen', 'Op_Newline', 'Op_Pipe', 'Op_PipeAmp', 'Op_RBrace', 'Op_RBracket', 'Op_RParen', 'Op_Semi', 'PS_BadBackslash', 'PS_LBrace', 'PS_Literals', 'PS_Octal3', 'PS_RBrace', 'PS_Subst', 'Redir_AndDGreat', 'Redir_AndGreat', 'Redir_Clobber', 'Redir_DGreat', 'Redir_DGreatPlus', 'Redir_DLess', 'Redir_DLessDash', 'Redir_Great', 'Redir_GreatAnd', 'Redir_GreatPlus', 'Redir_Less', 'Redir_LessAnd', 'Redir_LessGreat', 'Redir_TLess', 'Right_ArithSub', 'Right_ArrayLiteral', 'Right_Backtick', 'Right_CasePat'.., 'Right_CommandSub', 'Right_DollarDoubleQuote', 'Right_DollarSingleQuote', 'Right_DoubleQuote', 'Right_ExtGlob', 'Right_FuncDef', 'Right_SingleQuote', 'Right_Subshell', 'Right_VarSub', 'Undefined_Tok', 'Unknown_Tok', 'VOp0_A', 'VOp0_E', 'VOp0_P', 'VOp0_Q', 'VOp0_a', 'VOp1_Caret', 'VOp1_Comma', 'VOp1_DCaret', 'VOp1_DComma', 'VOp1_DPercent', 'VOp1_DPound', 'VOp1_Percent', 'VOp1_Pound', 'VOp2_Colon', 'VOp2_LBracket', 'VOp2_RBracket', 'VOp2_Slash', 'VSub_At', 'VSub_Bang', 'VSub_Dollar', 'VSub_DollarName', 'VSub_Hyphen', 'VSub_Name', 'VSub_Number', 'VSub_Pound', 'VSub_QMark', 'VSub_Star', 'VTest_ColonEquals', 'VTest_ColonHyphen', 'VTest_ColonPlus', 'VTest_ColonQMark', 'VTest_Equals', 'VTest_Hyphen', 'VTest_Plus', 'VTest_QMark', 'WS_Space', 'Word_Compound', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__'] {'-G': , '-L': , '-O': , '-N': , '-S': , '-R': , '-e': , '-d': , '-g': , '-f': , '-a': , '-c': , '-b': , '-o': , '-n': , '-h': , '-u': , '-t': , '-w': , '-v': , '-p': , '-s': , '-r': , '-x': , '-z': } STATS: 299 tokens in 31 groups: [1, 1, 1, 3, 3, 1, 19, 3, 4, 17, 14, 2, 14, 13, 5, 10, 8, 5, 8, 4, 43, 19, 1, 27, 5, 4, 9, 11, 6, 25, 13] 13 BIG groups: [9, 10, 11, 13, 13, 14, 14, 17, 19, 19, 25, 27, 43] (token id:Op_Newline val:'\n' span_id:None) -- Arith Assign Backtick BoolBinary BoolUnary Char ControlFlow Eof Eol ExtGlob Fd Glob History Ignored KW Left Lit Node Op PS Redir Right Undefined Unknown VOp0 VOp1 VOp2 VSub VTest WS Word Number of Kinds: 31 Number of IDs: 302 ['AddBoolKinds', 'AddKinds', 'IdSpec', 'SetupTestBuiltin', '_BINARY_INT', '_BINARY_PATH', '_Dash', '_UNARY_OTHER_CHARS', '_UNARY_PATH_CHARS', '_UNARY_STR_CHARS', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'log', 'print_function', 'util'] core/process_test.pyc .osh warning: PID 11967 stopped, but osh didn't start it osh warning: PID 11968 stopped, but osh didn't start it Eosh warning: PID 11969 stopped, but osh didn't start it osh warning: PID 11971 stopped, but osh didn't start it osh warning: PID 11972 stopped, but osh didn't start it EFri Feb 15 23:28:14 PST 2019 date returned 0 osh error: 'does-not-exist': No such file or directory E. ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.077s FAILED (errors=3) BEFORE ['0', '1', '2', '3'] ------------------------------------------------------------ ls | cut -d . -f 1 | head FDS BEFORE ['0', '1', '2', '3', '5', '7'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist .. ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ---------------------------------------------------------------------- Ran 5 tests in 0.092s FAILED (errors=2) BEFORE ['0', '1', '2', '3'] ------------------------------------------------------------ ls | cut -d . -f 1 | head FDS BEFORE ['0', '1', '2', '3', '5', '7'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist 1 FDS AFTER ['0', '1', '2', '3', '5', '7'] EEEdate returned 0 date returned 0 Fri Feb 15 23:28:14 PST 2019 date returned 0 osh error: 'does-not-exist': No such file or directory EEosh error: 'does-not-exist': No such file or directory Eosh error: 'does-not-exist': No such file or directory Edate returned 0 . ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.181s FAILED (errors=3) . ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.183s FAILED (errors=3) osh error: 'does-not-exist': No such file or directory E. ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.186s FAILED (errors=3) BEFORE ['0', '1', '2', '3'] ------------------------------------------------------------ ls | cut -d . -f 1 | head [-1, -1, 1] FDS BEFORE ['0', '1', '2', '3', '5', '7', '9'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist . ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.189s FAILED (errors=3) .. ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ---------------------------------------------------------------------- Ran 5 tests in 0.201s FAILED (errors=2) ..... ====================================================================== ERROR: testPipeline (__main__.ProcessTest)====================================================================== ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ERROR: testPipeline2 (__main__.ProcessTest)---------------------------------------------------------------------- ----------------------------------------------------------------------Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ----------------------------------------------------------------------ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ----------------------------------------------------------------------Ran 5 tests in 0.208s FAILEDRan 5 tests in 0.208s (errors=2) FAILED (errors=2) BEFORE ['0', '1', '2', '3'] ------------------------------------------------------------ ls | cut -d . -f 1 | head [-1, -1, 1] FDS BEFORE ['0', '1', '2', '3', '5', '7', '9'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist 1 FDS AFTER ['0', '1', '2', '3', '5', '7', '9'] . ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ---------------------------------------------------------------------- Ran 5 tests in 0.210s FAILED (errors=2) osh warning: PID 11977 stopped, but osh didn't start it .Fri Feb 15 23:28:14 PST 2019 date returned 0 osh error: 'does-not-exist': No such file or directory E. ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.237s FAILED (errors=2) BEFORE ['0', '1', '2', '3'] ------------------------------------------------------------ ls | cut -d . -f 1 | head [-1, -1, 1] [1, -1, 1, 1] FDS BEFORE ['0', '1', '2', '3', '5', '7', '9'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist .. ====================================================================== ERROR: testPipeline (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ---------------------------------------------------------------------- Ran 5 tests in 0.253s FAILED (errors=1) BEFORE ['0', '1', '2', '3'] ------------------------------------------------------------ ls | cut -d . -f 1 | head [-1, -1, 1] [1, -1, 1, 1] FDS BEFORE ['0', '1', '2', '3', '5', '7', '9'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist 1 FDS AFTER ['0', '1', '2', '3', '5', '7', '9'] pipe_status: [-1, -1, -1, 1] .osh warning: PID 11990 stopped, but osh didn't start it osh warning: PID 11991 stopped, but osh didn't start it EFri Feb 15 23:28:14 PST 2019 date returned 0 osh error: 'does-not-exist': No such file or directory E. ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.307s FAILED (errors=2) BEFORE ['0', '1', '2', '3'] AFTER ['0', '1', '2', '3', '7'] ------------------------------------------------------------ ls | cut -d . -f 1 | head FDS BEFORE ['0', '1', '2', '3', '5', '7'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist .. ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ---------------------------------------------------------------------- Ran 5 tests in 0.324s FAILED (errors=1) BEFORE ['0', '1', '2', '3'] AFTER ['0', '1', '2', '3', '7'] ------------------------------------------------------------ ls | cut -d . -f 1 | head FDS BEFORE ['0', '1', '2', '3', '5', '7'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist 1 FDS AFTER ['0', '1', '2', '3', '5', '7'] EEdate returned 0 Edate returned 0 osh error: 'does-not-exist': No such file or directory EFri Feb 15 23:28:14 PST 2019 osh error: 'does-not-exist': No such file or directory date returned 0 EF ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ====================================================================== FAIL: testStdinRedirect (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AssertionError: 'one\n' != '' ---------------------------------------------------------------------- Ran 5 tests in 0.413s FAILED (failures=1, errors=2) .E ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.414s FAILED (errors=2) osh error: 'does-not-exist': No such file or directory Edate returned 0 . ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.422s FAILED (errors=2) BEFORE ['0', '1', '2', '3'] AFTER ['0', '1', '2', '3', '7'] ------------------------------------------------------------ ls | cut -d . -f 1 | head [-1, -1, 1] FDS BEFORE ['0', '1', '2', '3', '5', '7', '9'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist osh error: 'does-not-exist': No such file or directory E... ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.431s FAILED (errors=2) . ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ---------------------------------------------------------------------- Ran 5 tests in 0.435s FAILED (errors=1) . ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ---------------------------------------------------------------------- Ran 5 tests in 0.435s FAILED (errors=1) ... ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ---------------------------------------------------------------------- Ran 5 tests in 0.445s FAILED (errors=1) BEFORE ['0', '1', '2', '3'] AFTER ['0', '1', '2', '3', '7'] ------------------------------------------------------------ ls | cut -d . -f 1 | head [-1, -1, 1] FDS BEFORE ['0', '1', '2', '3', '5', '7', '9'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist 1 FDS AFTER ['0', '1', '2', '3', '5', '7', '9'] osh warning: PID 11996 stopped, but osh didn't start it . ====================================================================== ERROR: testPipeline2 (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb AttributeError: 'NoneType' object has no attribute 'Exec' ---------------------------------------------------------------------- Ran 5 tests in 0.451s FAILED (errors=1) osh warning: PID 11995 stopped, but osh didn't start it .Fri Feb 15 23:28:14 PST 2019 date returned 0 osh error: 'does-not-exist': No such file or directory E. ====================================================================== ERROR: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 121, in __call__ return self.im_func(self.im_self, *args, **kwargs) File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 102, in __call__ retval = self._vm.run_frame(frame) File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame raise exctype, value, tb SystemExit: 127 ---------------------------------------------------------------------- Ran 5 tests in 0.475s FAILED (errors=1) BEFORE ['0', '1', '2', '3'] AFTER ['0', '1', '2', '3', '7'] ------------------------------------------------------------ ls | cut -d . -f 1 | head [-1, -1, 1] [-1, -1, 1, 1] FDS BEFORE ['0', '1', '2', '3', '5', '7', '9'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist .. ---------------------------------------------------------------------- Ran 5 tests in 0.492s OK BEFORE ['0', '1', '2', '3'] AFTER ['0', '1', '2', '3', '7'] ------------------------------------------------------------ ls | cut -d . -f 1 | head [-1, -1, 1] [-1, -1, 1, 1] FDS BEFORE ['0', '1', '2', '3', '5', '7', '9'] ------------------------------------------------------------ date ------------------------------------------------------------ does-not-exist 1 FDS AFTER ['0', '1', '2', '3', '5', '7', '9'] core/ui_test.pyc . ---------------------------------------------------------------------- Ran 1 test in 0.009s OK core/util_test.pyc hello 42 . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK frontend/args_test.pyc ....... ---------------------------------------------------------------------- Ran 7 tests in 0.060s OK - None -- None --+ None --- None ---invalid None -port ['-port', 'port', ''] --port ['--port', 'port', ''] --port-num ['--port-num', 'port-num', ''] --port-num=8000 ['--port-num=8000', 'port-num', '=8000'] --port-num= ['--port-num=', 'port-num', '='] --port-num=x=y ['--port-num=x=y', 'port-num', '=x=y'] --port-num+ None frontend/lexer_gen_test.pyc . ---------------------------------------------------------------------- Ran 1 test in 0.069s OK --- a '"a" ' --- [a-z] '[a-z]' --- [a-zA-Z.]+ '[a-zA-Z.]+ ' --- [a-zA-Z_][a-zA-Z0-9_]*\+?= '[a-zA-Z_][a-zA-Z0-9_]* "+" ? "=" ' --- [."]* '[."]* ' --- \$ '"$" ' --- .* '.* ' --- '\x00' '"\\x00" ' --- \0 '"\\x00" ' --- \\ '"\\\\" ' --- [\\] '"\\\\" ' --- . '.' --- [^a] '[^a]' --- [^a-z] '[^a-z]' --- [a\.] '[a.]' --- [0-7]{1,3} '[0-7]{1,3} ' frontend/lexer_test.pyc ... ---------------------------------------------------------------------- Ran 3 tests in 0.003s OK 97 86 70 52 31 29 28 26 24 19 13 12 4 2 1 Number of lex states: 15 Number of token dispatches: 494 (token id:Lit_Chars val:abc span_id:None) (token id:Lit_LBrace val:'{' span_id:None) (token id:Op_Semi val:';' span_id:None) frontend/lex_test.pyc .................. ---------------------------------------------------------------------- Ran 18 tests in 0.111s OK --- echo \" \\ hi` --- (token id:Backtick_Other val:'echo ' span_id:0) (token id:Backtick_Quoted val:'\\"' span_id:1) (token id:Backtick_Other val:' ' span_id:2) (token id:Backtick_Quoted val:'\\\\' span_id:3) (token id:Backtick_Other val:' hi' span_id:4) (token id:Backtick_Right val:'`' span_id:5) (token id:Eof_Real val:'' span_id:6) --- ` --- (token id:Backtick_Right val:'`' span_id:0) (token id:Eof_Real val:'' span_id:1) --- --- (token id:Eof_Real val:'' span_id:0) (token id:Char_Literals val:'foo bar' span_id:0) (token id:Char_OneChar val:'\\n' span_id:1) (token id:Left_SingleQuote val:"'" span_id:0) [(, 'newline '), (, '\\n'), (, ' NUL '), (, '\\0'), (, ' octal '), (, '\\0377'), (, ' hex '), (, '\\x00')] [(, 'unicode '), (, '\\u0065'), (, ' '), (, '\\U00000065')] [(, '\\'), (, 'd '), (, '\\e'), (, ' '), (, '\\f'), (, ' '), (, '\\'), (, 'g')] [(, 'echo hi')] [(, 'echo '), (, '!!'), (, ' '), (, '!*'), (, ' '), (, '!^'), (, ' '), (, '!$')] [(, 'echo '), (, '\\!'), (, '!')] [(, 'echo '), (, '!3'), (, '...')] [(, 'echo '), (, '!-5'), (, '...')] [(, 'echo '), (, '!x/foo.py'), (, ' bar')] --- [(, 'echo '), (, "'!!'"), (, ' $'), (, "'!!'"), (, ' ')] [(, 'echo '), (, "'!! ")] [(, 'echo '), (, "\\'"), (, ' '), (, '!!'), (, ' ')] [(, 'foo')] [(, '\\h'), (, ' '), (, '\\w'), (, ' '), (, '\\$')] P '[^\\\\\\0]+' frontend/reader_test.pyc history length = 1 .! echo ${two:-}history length = 2 Couldn't parse historical command 'echo ( a )': , ) None (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:4))]) None> .history length = 2 ! echo -lhistory length = 2 ! echo xxhistory length = 2 .! echo yyhistory length = 3 ! echo "${five@P}"history length = 3 ! echo $threehistory length = 3 .! echo -n $three ${4:-} "${five@P}"history length = 4 ! echo ${two:-}history length = 4 ! echo ${two:-}history length = 4 ! echo 1history length = 4 ! ls /echo/history length = 4 ! echo ${two:-}history length = 4 history length = 4 history length = 4 ! ls /echo/history length = 4 ... ---------------------------------------------------------------------- Ran 7 tests in 0.343s OK ! echo /echo/ osh/arith_parse_test.pyc . ) ( () ( 1 , (word.TokenWord token:(token id:Eof_Real val:'' span_id:3))) None (word.TokenWord token:(token id:Eof_Real val:'' span_id:3)) None> (1 + (3 * 4) , (word.TokenWord token:(token id:Eof_Real val:'' span_id:12))) None (word.TokenWord token:(token id:Eof_Real val:'' span_id:12)) None> (1 + (3 * 4) 5 , (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Digits val:5 span_id:13))])) None (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Digits val:5 span_id:13))]) None> ; - ; expression: (7) node: (arith_expr.ArithWord w: (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Digits val:7 span_id:1))]) ) expression: 1 + 2 - 3 node: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:1 span_id:0))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:4))] ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:8))] ) ) ) expression: 1 + 2 * 3 node: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:1 span_id:0))] ) ) right: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:4))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:8))] ) ) ) ) expression: 7 - 9 * (2 - 3) node: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:7 span_id:0))] ) ) right: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:9 span_id:4))] ) ) right: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:9))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:13))] ) ) ) ) ) expression: 2 * 3 * 4 node: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:0))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:4))] ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:4 span_id:8))] ) ) ) expression: 2 ** 3 ** 4 node: (arith_expr.ArithBinary op_id: Arith_DStar left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:0))] ) ) right: (arith_expr.ArithBinary op_id: Arith_DStar left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:4))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:4 span_id:8))] ) ) ) ) expression: (2 ** 3) ** 4 node: (arith_expr.ArithBinary op_id: Arith_DStar left: (arith_expr.ArithBinary op_id: Arith_DStar left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:1))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:5))] ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:4 span_id:10))] ) ) ) expression: 5 node: (arith_expr.ArithWord w: (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Digits val:5 span_id:0))]) ) expression: 4 + 2 node: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:4 span_id:0))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:4))] ) ) ) expression: 9 - 8 - 7 node: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:9 span_id:0))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:8 span_id:4))] ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:7 span_id:8))] ) ) ) expression: 9 - (8 - 7) node: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:9 span_id:0))] ) ) right: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:8 span_id:5))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:7 span_id:9))] ) ) ) ) expression: (9 - 8) - 7 node: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:9 span_id:1))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:8 span_id:5))] ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:7 span_id:10))] ) ) ) expression: 2 + 3 ** 2 * 3 + 4 node: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:0))] ) ) right: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithBinary op_id: Arith_DStar left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:4))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:8))] ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:12))] ) ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:4 span_id:16))] ) ) ) expression: 4 * 3 / 2 node: (arith_expr.ArithBinary op_id: Arith_Slash left: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:4 span_id:0))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:4))] ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:8))] ) ) ) expression: 3 * 2 % 4 node: (arith_expr.ArithBinary op_id: Arith_Percent left: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:0))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:4))] ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:4 span_id:8))] ) ) ) expression: + 1 node: (arith_expr.ArithUnary op_id: Node_UnaryPlus child: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:1 span_id:2))] ) ) ) expression: - 5 node: (arith_expr.ArithUnary op_id: Node_UnaryMinus child: (arith_expr.ArithWord w: (word.CompoundWord. parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:5 span_id:2))] ) ) ) expression: -2-3 node: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithUnary op_id: Node_UnaryMinus child: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:1))] ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:3))] ) ) ) expression: 1 ? 2 : 3, 4 ? 5 : 6 node: (arith_expr.ArithBinary op_id: Arith_Comma left: (arith_expr.TernaryOp cond: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:1 span_id:0))] ) ) true_expr: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:4))] ) ) false_expr: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:8))] ) ) ) right: (arith_expr.TernaryOp cond: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:4 span_id:11))] ) ) true_expr: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:5 span_id:15))] ) ) false_expr: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:6 span_id:19))] ) ) ) ) expression: 1 , 2, 3 node: (arith_expr.ArithBinary op_id: Arith_Comma left: (arith_expr.ArithBinary op_id: Arith_Comma left: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:1 span_id:0))] ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:2 span_id:4))] ) ) ) right: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:3 span_id:7))] ) ) ) expression: 011 node: (arith_expr.ArithWord w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Digits val:011 span_id:0))] ) ) expression: 0xA node: (arith_expr.ArithWord w: (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Digits val:0 span_id:0)) (word_part.LiteralPart token:(token id:Lit_ArithVarLike val:xA span_id:1)) ] ) ) expression: 64#z node: (arith_expr.ArithWord w: (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Digits val:64 span_id:0)) (word_part.LiteralPart token:(token id:Lit_Pound val:'#' span_id:1)) (word_part.LiteralPart token:(token id:Lit_ArithVarLike val:z span_id:2)) ] ) ) expression: 64#Z node: (arith_expr.ArithWord w: (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Digits val:64 span_id:0)) (word_part.LiteralPart token:(token id:Lit_Pound val:'#' span_id:1)) (word_part.LiteralPart token:(token id:Lit_ArithVarLike val:Z span_id:2)) ] ) ) expression: 64#@ node: (arith_expr.ArithWord w: (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Digits val:64 span_id:0)) (word_part.LiteralPart token:(token id:Lit_Poun. ---------------------------------------------------------------------- Ran 3 tests in 0.708s OK d val:'#' span_id:1)) (word_part.LiteralPart token:(token id:Lit_At val:'@' span_id:2)) ] ) ) expression: 64#_ node: (arith_expr.ArithWord w: (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Digits val:64 span_id:0)) (word_part.LiteralPart token:(token id:Lit_Pound val:'#' span_id:1)) (word_part.LiteralPart token:(token id:Lit_ArithVarLike val:_ span_id:2)) ] ) ) osh/bool_parse_test.pyc .....(bool_expr.LogicalOr left: (bool_expr.WordTest w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:0))] ) ) right: (bool_expr.LogicalNot child: (bool_expr.WordTest w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:bar span_id:6))] ) ) ) ) (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:0))] ) right: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:4))] ) ) (bool_expr.WordTest w: (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:0))]) ) (bool_expr.WordTest w: (word.CompoundWord parts: [ (word_part.SimpleVarSub token:(token id:VSub_DollarName val:'$foo' span_id:0)) (word_part.DoubleQuotedPart parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:bar span_id:2))] spids: [1 3] ) ] ) ) ------------- (bool_expr.BoolUnary op_id: BoolUnary_z child: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:2))] ) ) (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:0))] ) right: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:bar span_id:4))] ) ) (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:2))] ) right: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:bar span_id:6))] ) ) (bool_expr.WordTest w: (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:0))]) ) (bool_expr.LogicalNot child: (bool_expr.WordTest w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:2))] ) ) ) (bool_expr.LogicalAnd left: (bool_expr.WordTest w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:zoo span_id:0))] ) ) right: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:6))] ) right: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:bar span_id:10))] ) ) ) (bool_expr.LogicalAnd left: (bool_expr.WordTest w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:0))] ) ) right: (bool_expr.LogicalNot child: (bool_expr.WordTest w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:bar span_id:6))] ) ) ) ) (bool_expr.LogicalAnd left: (bool_expr.WordTest w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:0))] ) ) right: (bool_expr.LogicalAnd left: (bool_expr.LogicalNot child: (bool_expr.WordTest w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:bar span_id:6))] ) ) ) right: (bool_expr.WordTest w: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:baz span_id:10))] ) ) ) ) (bool_expr.LogicalAnd left: (bool_expr.BoolUnary op_id: BoolUnary_z . ---------------------------------------------------------------------- Ran 6 tests in 0.286s OK child: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:2))] ) ) right: (bool_expr.BoolUnary op_id: BoolUnary_z child: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:bar span_id:8))] ) ) ) osh/braces_test.pyc --- } {(Lit_RBrace '}')} --- , {(Lit_Comma ',')} --- B-{a,b}-E {(B-) (Lit_LBrace '{') (a) (Lit_Comma ',') (b) (Lit_RBrace '}') (-E)}(word.BracedWordTree parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:4))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:6)) ] )-- --- B-{a"a",b"b",c"c"}-E {(B-) (Lit_LBrace '{') (a) (DQ (a)) (Lit_Comma ',') (b) (DQ (b)) (Lit_Comma ',') (c) (DQ (c)) (Lit_RBrace '}') (-E) }(word.BracedWordTree parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2)) (word_part.DoubleQuotedPart parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:4))] spids: [3 5] ) ] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:7)) (word_part.DoubleQuotedPart parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:9))] spids: [8 10] ) ] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:c span_id:12)) (word_part.DoubleQuotedPart parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:c span_id:14))] spids: [13 15] ) ] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:17)) ] )-- --- B-{a,b}--{c,d}-E {(B-) (Lit_LBrace '{') (a) (Lit_Comma ',') (b) (Lit_RBrace '}') (--) (Lit_LBrace '{') (c) (Lit_Comma ',') (d) (Lit_RBrace '}') (-E) }(word.BracedWordTree parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:4))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:-- span_id:6)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:c span_id:8))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:d span_id:10))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:12)) ] )-- --- B-{a,b,c,={d,e}}-E {(B-) (Lit_LBrace '{') (a) (Lit_Comma ',') (b) (Lit_Comma ',') (c) (Lit_Comma ',') (Lit_Other '=') (Lit_LBrace '{') (d) (Lit_Comma ',') (e) (Lit_RBrace '}') (Lit_RBrace '}') (-E) }(word.BracedWordTree parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:4))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:c span_id:6))] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:8)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:d span_id:10))] ) (word.CompoundWord . parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:e span_id:12))] ) ] ) ] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:15)) ] ) --- B-{a,={b,c}=,d}-E {(B-) (Lit_LBrace '{') (a) (Lit_Comma ',') (Lit_Other '=') (Lit_LBrace '{') (b) (Lit_Comma ',') (c) (Lit_RBrace '}') (Lit_Other '=') (Lit_Comma ',') (d) (Lit_RBrace '}') (-E) }(word.BracedWordTree parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2))] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:4)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:6))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:c span_id:8))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:10)) ] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:d span_id:12))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:14)) ] )(word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2))]) --- {a,b,} {(Lit_LBrace '{') (a) (Lit_Comma ',') (b) (Lit_Comma ',') (Lit_RBrace '}')}(word.BracedWordTree parts: [ (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:1))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:3))] ) (word.CompoundWord) ] ) ] ) --- hi {(hi)}(word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Chars val:hi span_id:0))]) --- B-{a,b}-E {(B-) (Lit_LBrace '{') (a) (Lit_Comma ',') (b) (Lit_RBrace '}') (-E)}(word.BracedWordTree parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:4))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:6)) ] )(word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2)) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:6)) ] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:4)) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:6)) ] ) --- B-{a,={b,c,d}=,e}-E {(B-) (Lit_LBrace '{') (a) (Lit_Comma ',') (Lit_Other '=') (Lit_LBrace '{') (b) (Lit_Comma ',') (c) (Lit_Comma ',') (d) (Lit_RBrace '}') (Lit_Other '=') (Lit_Comma ',') (e) (Lit_RBrace '}') (-E) }(word.BracedWordTree parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2))] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:4)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:6))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:c span_id:8))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:d span_id:10))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:12)) ] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:e span_id:14))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:16)) ] )(word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2)) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:16)) ] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:4)) (word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:6)) (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:12)) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:16)) ] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:4)) (word_part.LiteralPart token:(token id:Lit_Chars val:c span_id:8)) (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:12)) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:16)) ] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:4)) (word_part.LiteralPart token:(token id:Lit_Chars val:d span_id:10)) (word_part.LiteralPart token:(token id:Lit_Other val:'=' span_id:12)) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:16)) ] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Chars val:e span_id:14)) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:16)) ] ) --- B-{a,b}-{c,d}-E {(B-) (Lit_LBrace '{') (a) (Lit_Comma ',') (b) (Lit_RBrace '}') (-) (Lit_LBrace '{') (c) (Lit_Comma ',') (d) (Lit_RBrace '}') (-E) }(word.BracedWordTree parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:4))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:- span_id:6)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:c span_id:8))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:d span_id:10))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:12)) ] )(word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2)) (word_part.LiteralPart token:(token id:Lit_Chars val:- span_id:6)) (word_part.LiteralPart token:(token id:Lit_Chars val:c span_id:8)) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:12)) ] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:2)) (word_part.LiteralPart token:(token id:Lit_Chars val:- span_id:6)) (word_part.LiteralPart token:(token id:Lit_Chars val:d span_id:10)) . ---------------------------------------------------------------------- Ran 2 tests in 1.721s OK (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:12)) ] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:4)) (word_part.LiteralPart token:(token id:Lit_Chars val:- span_id:6)) (word_part.LiteralPart token:(token id:Lit_Chars val:c span_id:8)) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:12)) ] ) (word.CompoundWord parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:B- span_id:0)) (word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:4)) (word_part.LiteralPart token:(token id:Lit_Chars val:- span_id:6)) (word_part.LiteralPart token:(token id:Lit_Chars val:d span_id:10)) (word_part.LiteralPart token:(token id:Lit_Chars val:-E span_id:12)) ] ) osh/builtin_comp_test.pyc . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK osh/builtin_test.pyc . ---------------------------------------------------------------------- Ran 1 test in 0.008s OK --- 'Aa b \\ a\\ b' 2 3 4 5 6 8 9 11 --- --- 'a b c ' 1 2 3 4 5 --- osh/cmd_exec_test.pyc .. ---------------------------------------------------------------------- Ran 2 tests in 0.035s OK (command.SimpleCommand words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:echo span_id:0))] ) (word.BracedWordTree parts: [ (word_part.LiteralPart token:(token id:Lit_Chars val:_ span_id:2)) (word_part.BracedAltPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:a span_id:4))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:b span_id:6))] ) ] ) (word_part.LiteralPart token:(token id:Lit_Chars val:_ span_id:8)) ] ) ] ) [(part_value.String s:'' do_split_glob:T)] [(part_value.String s:xxx do_split_glob:T)] [(part_value.String s:default do_split_glob:T)] [(part_value.String s:xxx do_split_glob:T)] osh/cmd_parse_test.pyc Line 1 of '' ls array=(a b c) ^~~~~~ Commands can't contain array literals Line 1 of '' array=(a b c) ls ^~~~~~ Environment bindings can't contain array literals .....(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:empty) op:Equal rhs:{(word_part.ArrayLiteralPart)})] ) ] )(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:array) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{(a)} {(b)} {(c)}])} ) ] ) ] )(command.CommandList children: [ (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:array) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{(a)} {(b)} {(c)}])} ) ] ) terminator: ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:array2) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{(d)} {(e)} {(f)}])} ) ] ) ] )(C {(ls)} {(foo)})(command.Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F)(command.AndOr ops:[Op_DPipe] children:[(C {(ls)} {(foo)}) (C {(die)})])(command.AndOr ops: [Op_DPipe] children: [(command.Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (C {(die)})] )(command.Case to_match:{(foo)})(command.Case to_match: {(word)} arms: [(case_arm pat_list:[{(foo)} {(foo2)} {(foo3)}] action:[(C {(echo)} {(hi)})])] )(command.Case to_match: {(word)} arms: [(case_arm pat_list:[{(foo)}] action:[(C {(echo)} {(one-line)})])] )(command.Case to_match: {(word)} arms: [ (case_arm pat_list:[{(foo)}] action:[(C {(echo)} {(foo)})]) (case_arm pat_list:[{(bar)}] action:[(C {(echo)} {(bar)})]) ] )(command.Case to_match: {(word)} arms: [ (case_arm pat_list:[{(foo)}] action:[(C {(echo)} {(foo)})]) (case_arm pat_list: [{(bar)}] action: [(command.Sentence child:(C {(echo)} {(bar)}) terminator:)] ) ] )(command.Case to_match: {(word)} arms: [ (case_arm pat_list:[{(foo)}] action:[(C {(echo)} {(foo)})]) (case_arm pat_list:[{(bar)}] action:[(C {(echo)} {(bar)})]) ] )(command.SimpleCommand words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:ls span_id:0))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:foo span_id:2))] ) ] ) (command.FuncDef name: func body: (command.BraceGroup children: [ (command.Sentence child: (command.SimpleCommand words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:echo span_id:6))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:hi span_id:8))] ) ] ) terminator: (token id:Op_Semi val:';' span_id:9) ) ] spids: [4] ) spids: [0 3] ) (C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(12)})]) left_token: ) (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(34)})]) left_token: ) } )(C {(echo)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(12)})]) left_token: ) (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(34)})]) left_token: ) ) } )(command.CommandList children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id:BoolBinary_gt left:{($ VSub_Pound '$#')} right:{(1)}) ) ] )(command.CommandList children: [ (command.DB.....racket expr: (bool_expr.LogicalAnd left: (bool_expr.BoolBinary op_id:BoolBinary_gt left:{($ VSub_Pound '$#')} right:{(1)}) right: (bool_expr.WordTest w:{(foo)}) ) ) ] )(command.CommandList children: [ (command.If arms: [ (if_arm cond: [ (command.DBracket expr: (bool_expr.BoolBinary op_id:BoolBinary_gt left:{($ VSub_Pound '$#')} right:{(1)}) ) ] action: [(C {(echo)} {(hi)})] ) ] ) ] )(command.CommandList children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id:BoolBinary_EqualTilde left:{(foo)} right:{(foo)}) ) ] )(command.CommandList children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_EqualTilde left: {(foo)} right: {(Lit_Other '(') (foo) (Lit_Other '|') (bar) (Lit_Other ')')} ) ) ] )(command.CommandList children: [ (command.DParen child: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) ] )(command.CommandList children: [ (command.ForEach iter_name: i iter_words: [{(1)} {(2)} {(3)}] do_arg_iter: F body: (command.DoGroup children:[(C {(echo)} {($ VSub_DollarName '$i')})]) ) ] )(command.CommandList children: [ (command.ForEach iter_name: i do_arg_iter: F body: (command.DoGroup children:[(C {(echo)} {($ VSub_DollarName '$i')})]) ) ] )(command.CommandList children: [ (command.ForEach iter_name: i do_arg_iter: T body: (command.DoGroup children: [ (command.Sentence child: (C {(echo)} {($ VSub_DollarName '$i')}) terminator: ) ] ) ) ] )(command.CommandList children: [ (command.ForEach iter_name: i do_arg_iter: T body: (command.DoGroup children:[(C {(echo)} {($ VSub_DollarName '$i')})]) ) ] )(command.CommandList children: [ (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (lhs_expr.LhsName name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.ArithBinary op_id: Arith_Less left: (arith_expr.ArithVarRef token:) right: (arith_expr.ArithWord w:{(Lit_Digits 5)}) ) update: (arith_expr.UnaryAssign op_id:Arith_DPlus child:(lhs_expr.LhsName name:i)) body: (command.DoGroup children:[(C {(echo)} {($ VSub_DollarName '$i')})]) ) ] )(command.CommandList children: [ (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (lhs_expr.LhsName name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.ArithBinary op_id: Arith_Less left: (arith_expr.ArithVarRef token:) right: (arith_expr.ArithWord w:{(Lit_Digits 5)}) ) update: (arith_expr.UnaryAssign op_id:Arith_DPlus child:(lhs_expr.LhsName name:i)) body: (command.DoGroup children:[(C {(echo)} {($ VSub_DollarName '$i')})]) ) ] )(command.CommandList children: [ (command.ForExpr body:(command.DoGroup children:[(C {(echo)} {($ VSub_DollarName '$i')})])) ] )(command.CommandList children: [ (command.FuncDef name: foo body: (command.BraceGroup children: [(command.Sentence child:(C {(echo)} {(hi)}) terminator:)] ) ) ] )(command.CommandList children: [ (command.FuncDef name: foo body: (command.Subshell command_list:(command.CommandList children:[(C {(echo)} {(hi)})])) ) ] )(command.CommandList children: [ (command.FuncDef name: foo body: (command.ForEach i...Line 1 of '' ls foo| ^ Unexpected EOF while parsing command ..ter_name: i iter_words: [{(x)}] do_arg_iter: F body: (command.DoGroup children: [ (command.Sentence child: (C {(echo)} {($ VSub_DollarName '$i')}) terminator: ) ] ) ) ) ] )(command.CommandList children: [ (command.FuncDef name: foo body: (command.BraceGroup children: [(command.Sentence child:(C {(echo)} {(hi)}) terminator:)] ) ) ] )(command.CommandList children: [ (command.FuncDef name: foo body: (command.BraceGroup children: [(command.Sentence child:(C {(echo)} {(hi)}) terminator:)] ) ) ] )(command.CommandList children: [ (command.FuncDef name: foo body: (command.Subshell command_list:(command.CommandList children:[(C {(echo)} {(hi)})])) ) ] )(command.CommandList children: [ (command.FuncDef name: foo body: (command.ForEach iter_name: i iter_words: [{(x)}] do_arg_iter: F body: (command.DoGroup children: [ (command.Sentence child: (C {(echo)} {($ VSub_DollarName '$i')}) terminator: ) ] ) ) ) ] )(command.CommandList children: [ (command.FuncDef name: foo body: (command.ForEach iter_name: i iter_words: [{(x)}] do_arg_iter: F body: (command.DoGroup children: [ (command.Sentence child: (C {(echo)} {($ VSub_DollarName '$i')}) terminator: ) ] ) ) ) ] )(command.CommandList children: [ (command.FuncDef name: foo body: (command.BraceGroup children: [(command.Sentence child:(C {(echo)} {(hi)}) terminator:)] ) redirects: [ (redir.Redir op:&'> fd:1 arg_word:{(2)}) (redir.Redir op:'> fd:2 arg_word:{(/dev/null)}) ] ) ] )(command.CommandList children: [ (command.If arms: [ (if_arm cond: [(command.Sentence child:(C {(true)}) terminator:)] action: [(command.Sentence child:(C {(echo)} {(yes)}) terminator:)] ) ] ) ] )(command.CommandList children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list:(command.CommandList children:[(C {(true)})])) terminator: ) ] action: [(command.Sentence child:(C {(echo)} {(yes)}) terminator:)] ) ] ) ] )(command.CommandList children:[(C {(ifFOO)})])(C {(ls)} {(foo)})(command.Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F)(command.Pipeline children:[(C {(echo)} {(foo)}) (C {(grep)} {(foo)})] negated:T)(command.Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)}) (C {(less)})] negated:F)(command.CommandList children: [ (command.Pipeline children:[(C {(ls)}) (C {(cat)}) (C {(cat)})] negated:F stderr_indices:[1]) ] )(command.CommandList children: [ (command.Pipeline children:[(C {(ls)}) (C {(cat)}) (C {(cat)})] negated:F stderr_indices:[0]) ] )(command.CommandList children: [ (command.Pipeline children: [(C {(ls)}) (C {(cat)}) (C {(cat)})] negated: F stderr_indices: [0 1] ) ] )(command.CommandList children: [ (C {(ls)} {(word_part.TildeSubPart token:)} {(word_part.TildeSubPart token:)} {(word_part.TildeSubPart token:) (/src)} {(word_part.TildeSubPart token:) (/src/foo)} {(word_part.TildeSubPart token:.....Line 1 of '' (( 1 + )) ^ Token can't be used in prefix position .Line 1 of '' A= (1 2) ^ Expected ( after =, got ' ' .Line 1 of '' [[ foo bar ]] ^~~ Expected ]] Line 1 of '' [[ foo -eq ]] ^ Expected ]] Line 1 of '' [[ foo$(echo <) -eq foo ]] ^ Invalid token after redirect operator .Line 1 of '' ls < ^ Invalid token after redirect operator Line 1 of '' ls < < ^ Invalid token after redirect operator Line 1 of '' echo foo$(ls <)bar ^ Invalid token after redirect operator Line 1 of '' BAD_ENV=(1 2 3) ls ^~~~~~~~ Environment bindings can't contain array literals Line 1 of '' ls BAD_ENV=(1 2 3) ^~~~~~~~ Commands can't contain array literals Line 1 of '' ENV1=A ENV2=B local foo=bar ^~~~~ Assignments shouldn't have environment bindings Line 1 of '' for ((i=1; i<)); do echo $i; done ^ Token can't be used in prefix position Line 1 of '' for ((i=1; i<5; ++i)) OOPS echo $i; ERR ^~~~ Invalid word after for expression Line 1 of '' for ((i=1; i<5; ++i)); OOPS echo $i; ERR ^~~~ Expected word type , got Line 1 of '' for $bad in 1 2; do echo hi; done ^~~~ Loop variable name should be a constant Line 1 of '' for foo BAD ^~~ Unexpected word after for loop variable Line 1 of '' if foo; then echo hi; z ^ Expected word type , got Line 1 of '' foo$(invalid) () { echo hi; } ^~~ Invalid function name .Line 1 of '' foo="" echo "bar ^ Unexpected EOF reading double-quoted string that began here ..Line 1 of '' for x in 1 2 $( ^ Invalid word in for loop .Line 1 of '' for ( i = 1; i < 10; i++ ) ^ Loop variable name should be a constant Line 1 of '' for = in a ^ Invalid loop variable name .Line 1 of '' for x in 1 2 $(cat <' foo"bar" () { ^~~ Invalid function name .Line 1 of '' x=1 >/dev/null ^~ Global assignment shouldn't have redirects Line 1 of '' echo hi; x=1 >/dev/null ^~ Global assignment shouldn't have redirects Line 1 of '' declare x=1 >/dev/null ^~~~~~~ Assignments shouldn't have redirects ..) (/src)} {(Lit_TildeLike '~weird') (KW_Bang '!') (name/blah) (KW_Bang '!') (blah)} ) ] )(command.CommandList children: [ (command.WhileUntil keyword: cond: [(command.Sentence child:(C {(false)}) terminator:)] body: (command.DoGroup children: [(C {(echo)} {(hi)}) (command.ControlFlow token:)] ) ) ] )(command.CommandList children: [ (command.WhileUntil keyword: cond: [(command.Sentence child:(C {(true)}) terminator:)] body: (command.DoGroup children: [(C {(echo)} {(hi)}) (command.ControlFlow token:)] ) ) ] )(command.CommandList children: [ (command.WhileUntil keyword: cond: [(C {(true)})] body: (command.DoGroup children: [(C {(echo)} {(hi)}) (command.ControlFlow token:)] ) ) ] )(command.SimpleCommand words: [{(ls)} {(foo)}] redirects: [(redir.Redir op:'> fd:2 arg_word:{(/dev/null)})] )(command.Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F)(command.AndOr ops: [Op_DPipe] children: [(command.Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (C {(die)})] )(command.CommandList children: [ (command.Sentence child: (command.AndOr ops: [Op_DPipe] children: [ (command.Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (C {(die)}) ] ) terminator: ) (C {(ls)} {(/)}) ] )(command.CommandList children:[(C {(ls)} {(foo)})])(command.CommandList children: [ (command.Sentence child: (command.AndOr ops: [Op_DPipe] children: [ (command.Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (C {(die)}) ] ) terminator: ) (C {(ls)} {(/)}) ] )(command.CommandList children: [ (command.Sentence child: (command.AndOr ops: [Op_DPipe] children: [ (command.Pipeline children:[(C {(ls)} {(foo)}) (C {(wc)} {(-l)})] negated:F) (C {(echo)} {(fail)}) ] ) terminator: ) (command.AndOr ops: [Op_DPipe] children: [ (command.Pipeline children:[(C {(echo)} {(bar)}) (C {(wc)} {(-c)})] negated:F) (C {(echo)} {(f2)}) ] ) ] )(command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 17 stdin_parts: [ ('1 ') (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(2)}) (C {(echo)} {(3)})]) left_token: ) (' 4\n') ] ) ] )(command.AndOr ops: [Op_DPipe] children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) (C {(echo)} {(hi)}) ] )(command.AndOr ops: [Op_DAmp] children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 14 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) (C {(echo)} {(hi)}) ] )(command.AndOr ops: [Op_DAmp] children: [ (command.SimpleCommand words: [{(tac)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF1)} here_end_span_id: 15 stdin_parts: [('PIPE A1\n') ('PIPE A2\n'........)] ) ] ) (command.SimpleCommand words: [{(tac)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF2)} here_end_span_id: 19 stdin_parts: [('PIPE B1\n') ('PIPE B2\n')] ) ] ) ] )(command.Pipeline children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 12 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) (C {(tac)}) ] negated: F )(command.Pipeline children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) (C {(tac)}) ] negated: F )(command.CommandList children: [ (command.Sentence child: (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) terminator: ) (C {(echo)} {(hi)}) ] )(command.CommandList children: [ (command.Sentence child: (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 14 stdin_parts: [('PIPE 1\n') ('PIPE 2\n')] ) ] ) terminator: ) (C {(echo)} {(hi)}) ] )(command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [('one tab then foo: ') ($ VSub_DollarName '$foo') ('\n')] ) ] )(command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(DQ (EOF))} here_end_span_id: 9 stdin_parts: [('$v\n') ('"two\n')] ) ] )(command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(SQ )} here_end_span_id: 8 stdin_parts: [('single-quoted: $var\n')] ) ] )(command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EO) (word_part.EscapedLiteralPart token:)} here_end_span_id: 8 stdin_parts: [('single-quoted: $var\n')] ) ] )(command.CommandList children: [ (command.Pipeline children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF1)} here_end_span_id: 15 stdin_parts: [('PIPE A1\n') ('PIPE A2\n')] ) ] ) (command.SimpleCommand words: [{(tac)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF2)} here_end_span_id: 19 stdin_parts: [('PIPE B1\n') ('PIPE B2\n')] ) ] ) ] negated: F ) ] )(command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [($ VSub_DollarName '$v') ('\n') (Right_DoubleQuote '"') ('two\n')] ) ] )(C {(echo)} { (word_part.CommandSubPa...rt command_list: (command.CommandList children: [ (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 2)}) right: (arith_expr.ArithWord w:{(Lit_Digits 3)}) ) ) ) } ) ] ) left_token: ) } )(command.CommandList children: [ (command.Subshell command_list: (command.CommandList children: [ (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 2)}) right: (arith_expr.ArithWord w:{(Lit_Digits 3)}) ) ) ) } ) ] ) ) ] )(C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) } ) ] ) left_token: ) } )(command.CommandList children: [ (command.Subshell command_list: (command.CommandList children: [ (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) } ) ] ) ) ] )(command.CommandList children: [ (C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:array) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{(a)} {(b)} {(c)}])} ) ] ) ] ) left_token: ) } ) ] )(command.CommandList children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:array) op: Equal rhs: {(word_part.ArrayLiteralPart words:[{(a)} {(b)} {(c)}])} ) ] ) ] ) ) ] )(command.CommandList children: [ (C { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Case to_match: {(f.....oo)} arms: [(case_arm pat_list:[{(one)}] action:[(C {(echo)} {(hi)})])] ) ] ) left_token: ) } ) ] )(command.CommandList children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Case to_match: {(foo)} arms: [(case_arm pat_list:[{(one)}] action:[(C {(echo)} {(hi)})])] ) ] ) ) ] )(command.CommandList children: [ (C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Case to_match: {(foo)} arms: [(case_arm pat_list:[{(one)}] action:[(C {(echo)} {(comsub)})])] ) ] ) left_token: ) } ) ] )(command.CommandList children: [ (C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Case to_match: {(foo)} arms: [(case_arm pat_list:[{(one)}] action:[(C {(echo)} {(comsub1)})])] ) (command.Case to_match: {(bar)} arms: [(case_arm pat_list:[{(two)}] action:[(C {(echo)} {(comsub2)})])] ) ] ) left_token: ) } ) ] )(C {(echo)} { (DQ ('double ') (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(hi)})]) left_token: ) (' quoted') ) } {(two)} )(command.CommandList children: [ (command.Sentence child:(C {(echo)} {(one)}) terminator:) (command.Sentence child: (C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Case to_match: {(one)} arms: [ (case_arm pat_list: [ { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(one)})]) left_token: ) } ] action: [ (C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(comsub)})]) left_token: ) } ) ] ) ] ) ] ) left_token: ) } ) terminator: ) (C {(echo)} {(two)}) ] )(command.CommandList children: [ (command.Subshell command_list: (command.CommandList children:[(command.Case to_match:{(foo)})]) ) ] )(command.CommandList children: [ (C { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (lhs_expr.LhsName name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.ArithBinary op...._id: Arith_Less left: (arith_expr.ArithVarRef token:) right: (arith_expr.ArithWord w:{(Lit_Digits 3)}) ) update: (arith_expr.UnaryAssign op_id:Arith_DPlus child:(lhs_expr.LhsName name:i)) body: (command.DoGroup children:[(C {(echo)} {(hi)})]) ) ] ) left_token: ) } ) ] )(command.CommandList children: [ (command.Subshell command_list: (command.CommandList children: [ (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (lhs_expr.LhsName name:i) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) cond: (arith_expr.ArithBinary op_id: Arith_Less left: (arith_expr.ArithVarRef token:) right: (arith_expr.ArithWord w:{(Lit_Digits 3)}) ) update: (arith_expr.UnaryAssign op_id:Arith_DPlus child:(lhs_expr.LhsName name:i)) body: (command.DoGroup children:[(C {(echo)} {(hi)})]) ) ] ) ) ] )(command.CommandList children: [ (C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Sentence child: (command.FuncDef name: func body: (command.BraceGroup children: [ (command.Sentence child: (C {(echo)} {(hi)}) terminator: ) ] ) ) terminator: ) (C {(func)}) ] ) left_token: ) } ) ] )(command.CommandList children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (command.FuncDef name: func body: (command.BraceGroup children: [(command.Sentence child:(C {(echo)} {(hi)}) terminator:)] ) ) terminator: ) (C {(func)}) ] ) ) ] )(C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.BinaryAssign op_id: Arith_Equal left: (lhs_expr.LhsIndexedName name: a index: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 2)}) right: (arith_expr.ArithWord w:{(Lit_Digits 3)}) ) ) ) right: (arith_expr.ArithVarRef token:) ) ) } )(C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(one) (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(two)})]) left_token: ) (one) } ) ] ) left_token: ) } {(three)} )(command.BraceGroup children: [ (command.Sentence child:(C {(cd)} {.....(/)}) terminator:) (command.Sentence child:(C {(echo)} {(PWD)}) terminator:) ] )(command.CommandList children: [ (command.Sentence child: (command.BraceGroup children: [ (command.Sentence child:(C {(cd)} {(/)}) terminator:) (command.Sentence child:(C {(echo)} {(PWD)}) terminator:) ] ) terminator: ) (C {(echo)} {(PWD)}) ] )(command.CommandList children: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child:(C {(cd)} {(/)}) terminator:) (C {(echo)} {(PWD)} {(1)}) ] ) ) terminator: ) (C {(echo)} {(PWD)} {(2)}) ] )(command.CommandList children: [ (command.Sentence child:(C {(echo)} {(one)}) terminator:) (command.Sentence child: (C {(echo)} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(cd)} {(/)}) terminator: ) (C {(echo)} {(subshell_PWD)}) ] ) ) terminator: ) (C {(echo)} {(comsub_PWD)}) ] ) left_token: ) } ) terminator: ) (C {(echo)} {(two)}) ] )(command.CommandList children: [ (C { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Case to_match: {(foo)} arms: [(case_arm pat_list:[{(one)}] action:[(C {(echo)} {(hi)})])] ) ] ) left_token: ) } ) ] )(command.CommandList children: [ (command.Subshell command_list: (command.CommandList children: [ (command.Case to_match: {(foo)} arms: [(case_arm pat_list:[{(one)}] action:[(C {(echo)} {(hi)})])] ) ] ) ) ] )(C {(echo)} {(ab) (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(hi)})]) left_token: ) (cd) } {(ef)} )(command.CommandList children: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolUnary op_id: BoolUnary_n child: { (DQ (word_part.BracedVarSub token: bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {(${ VSub_Name tag_marker) (Lit_Digits 002) (${ VSub_Name cons_ptr)} ) ) ) ) } ) ) terminator: ) ] )(command.CommandList children: [ (C {(echo)} { (word_part.ArithSubPart anode: (arith_expr.ArithWord w: {(Lit_Digits 0) (Lit_ArithVarLike x) ($ VSub_DollarName '$foo')} ) .Line 1 of '' errcmd=( "${SETUP_STATE[$err.cmd]}" ) ^ Unexpected token in arithmetic context .... ) } ) ] )(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:errcmd) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (DQ (word_part.BracedVarSub token: bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(DQ ($ VSub_DollarName '$err') (.cmd))}) ) ) ) } ] ) } ) ] ) ] )(command.CommandList children: [ (C {(echo)} {(word_part.CommandSubPart command_list:(command.NoOp) left_token:)} ) ] )(command.CommandList children: [ (C {(echo)} {(word_part.CommandSubPart command_list:(command.NoOp) left_token:)}) ] )(command.CommandList children: [ (C {(cmd)} {(flag)} {(word_part.CommandSubPart command_list:(command.NoOp) left_token:)} {(flag2)} ) ] )(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:FOO) op: Equal rhs: {(DQ (bar)) (word_part.CommandSubPart command_list: (command.NoOp) left_token: ) (DQ (baz)) } ) ] ) ] )(command.CommandList children: [ (command.If arms: [ (if_arm cond: [(command.Sentence child:(C {(true)}) terminator:)] action: [ (command.Subshell command_list: (command.CommandList children:[(C {(echo)} {(hi)})]) ) ] ) ] ) ] )(command.CommandList children: [ (command.WhileUntil keyword: cond: [(command.Sentence child:(C {(true)}) terminator:)] body: (command.DoGroup children: [ (command.BraceGroup children: [(C {(echo)} {(hi)}) (command.ControlFlow token:)] ) ] ) ) ] )(command.CommandList children: [ (command.If arms: [ (if_arm cond: [(command.Sentence child:(C {(true)}) terminator:)] action: [ (command.Subshell command_list: (command.CommandList children:[(C {(echo)} {(hi)})]) ) ] ) ] ) ] )(command.CommandList children: [ (command.If arms: [ (if_arm cond: [(command.Sentence child:(C {(true)}) terminator:)] action: [ (command.If arms: [ (if_arm cond: [(command.Sentence child:(C {(true)}) terminator:)] action: [(C {(echo)} {(hi)})] ) ] ) ] ) ] ) (C {(echo)} {(hi)}) ] )(command.CommandList children: [ (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(cd)} {(DQ ($ VSub_DollarName '$PACKDIR'))}) (command.ForEach iter_name: e iter_words: [{($ VSub_DollarName '$existing')}] do_arg_iter: F body: (command.DoGroup children: [ (command.Case to_match: {(DQ (' ') ($ VSub_DollarName '$fullbases') (' '))} arms: [ (case_arm pat_li..............st: [ {(Lit_Other '*') (DQ (' ') ($ VSub_DollarName '$e') (' ')) (Lit_Other '*') } ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(rm)} {(-f)} {(DQ ($ VSub_DollarName '$e') (.pack))} {(DQ ($ VSub_DollarName '$e') (.idx))} {(DQ ($ VSub_DollarName '$e') (.keep))} ) ] ) ] ) ] ) ) ] ) ] ) ) ] )(command.CommandList children: [ (command.Sentence child: (C {(.)} {(DQ ($ VSub_DollarName '$TEST_DIRECTORY')) (/diff-lib.sh)}) terminator: ) ] )(command.CommandList children:[(C {(echo)} {(foo) (Lit_Pound '#') (bar)})])(command.CommandList children:[(C {(echo)} {(foo)})])(command.CommandList children:[(C {(echo)} {(foo)})])(command.Case to_match: {(DQ ($ VSub_DollarName '$fd') (',') ($ VSub_DollarName '$command'))} arms: [ (case_arm pat_list: [{(3) (Lit_Comma ',') (Lit_Pound '#') (Lit_Other '*')} {(3) (Lit_Comma ',')}] ) ] )(command.CommandList children: [ (command.Case to_match: {(foo)} arms: [ (case_arm pat_list: [ { (word_part.SingleQuotedPart left: tokens: [] ) } ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ret) op: PlusEqual rhs: {(DQ (word_part.EscapedLiteralPart token:)) (word_part.EscapedLiteralPart token: ) } ) ] ) ] ) ] ) ] )(command.CommandList children: [ (C { (word_part.SingleQuotedPart left: tokens: [ ] ) } ) ] )(command.SimpleCommand words: [{(echo)} {(hi)}] redirects: [(redir.Redir op:|'> fd:16777215 arg_word:{(clobbered.txt)})] )(redir.Redir op:&'> fd:1 arg_word:{(2)})(redir.HereDoc op: fd:16777215 here_begin:{(EOF)} here_end_span_id:None)(redir.HereDoc op: fd:16777215 here_begin:{(EOF)} here_end_span_id:None)(command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: fd: 16777215 here_begin: {(EOF)} here_end_span_id: 10 stdin_parts: [('hi\n')] ) (redir.Redir op:'> fd:16777215 arg_word:{(out.txt)}) ] )(redir.Redir op:'> fd:16777215 arg_word:{(out.txt)})(redir.HereDoc op: fd:16777215 here_begin:{(EOF)} here_end_span_id:None)(command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op:'> fd:16777215 arg_word:{(out.txt)}) (redir.Redir op:&'> fd:1 arg_word:{(2)}) ] )(command.SimpleCommand words: [{(cat)}] redirects: [(redir.Redir op: fd:16777215 arg_word:{(3)})] )(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs:(lhs_expr.LhsName name:ONE) op:Equal rhs:{(1)}) (assign_pair lhs:(lhs_expr.LhsName name:TWO) op:Equal rhs:{(2)}) ] ) ] )(command.CommandList children: [ (command.SimpleCommand redirect..Line 1 of '' FOO=bar local foo=$(env) ^~~~ Assignments shouldn't have environment bindings ..... ---------------------------------------------------------------------- Ran 83 tests in 14.684s OK s: [(redir.Redir op:'> fd:16777215 arg_word:{(out.txt)})] ) ] )(C {(echo)} {(DQ (one)) (two)} {(DQ (three)) (DQ (four))} {(five)})(command.CommandList children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs:(lhs_expr.LhsName name:foo) op:Equal rhs:{(bar)}) (assign_pair lhs:(lhs_expr.LhsName name:spam) op:Equal) (assign_pair lhs:(lhs_expr.LhsName name:eggs) op:Equal) (assign_pair lhs:(lhs_expr.LhsName name:one) op:Equal rhs:{(1)}) ] ) ] )(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:foo) op:Equal rhs:{(bar)})] ) ] )(command.CommandList children: [ (command.SimpleCommand words: [{(env)}] redirects: [(redir.Redir op:'> fd:16777215 arg_word:{(out.txt)})] more_env: [(env_pair name:PYTHONPATH val:{(.)})] ) ] )(command.CommandList children: [ (command.SimpleCommand words: [{(echo)} {(1)} {(2)} {(3)}] redirects: [(redir.Redir op:'> fd:16777215 arg_word:{(out.txt)})] ) ] )(C {(ls)} {(foo)})(command.SimpleCommand words:[{(ls)} {(foo)}] more_env:[(env_pair name:FOO val:{(bar)})])(command.SimpleCommand words: [{(ls)} {(foo)}] redirects: [(redir.Redir op:'> fd:16777215 arg_word:{(output.txt)})] more_env: [(env_pair name:FOO val:{(bar)}) (env_pair name:SPAM val:{(eggs)})] )(command.SimpleCommand words: [{(ls)} {(foo)}] redirects: [ (redir.Redir op:'> fd:16777215 arg_word:{(output.txt)}) (redir.Redir op:'> fd:16777215 arg_word:{(output2.txt)}) ] more_env: [(env_pair name:FOO val:{(bar)}) (env_pair name:SPAM val:{(eggs)})] )(command.CommandList children: [ (command.Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs:(lhs_expr.LhsName name:ONE) op:Equal rhs:{(1)}) (assign_pair lhs:(lhs_expr.LhsName name:TWO) op:Equal rhs:{(2)}) (assign_pair lhs:(lhs_expr.LhsName name:THREE) op:Equal) ] ) ] )osh/glob_test.pyc ...... ---------------------------------------------------------------------- Ran 6 tests in 0.163s OK [] [(, '*'), (, '.'), (, 'py')] [(, '\\*'), (, '.'), (, 'py')] [(, '['), (, 'abc'), (, ']')] [(, '\\')] [(, '\\x')] [(, '\\\\')] [(, '['), (, '['), (, ':'), (, 'alpha'), (, ':'), (, ']'), (, ']')] [(, '['), (, '?'), (, ']')] === *.py regex : .*\.py warnings: [] === *.? regex : .*\.. warnings: [] === <*> regex : <.*> warnings: [] === \**+ regex : \*.*\+ warnings: [] === \** regex : \*.* warnings: [] === *.[ch]pp regex : .*\.[ch]pp warnings: [] === abc regex : abc warnings: [] === \* regex : \* warnings: [] === c:\foo regex : c:foo warnings: [] === strange]one regex : strange\]one warnings: ['Got unescaped right bracket'] === [[:space:]abc] regex : [[:space:]abc] warnings: [] === [abc] regex : [abc] warnings: [] === [\a\b\c] regex : [\a\b\c] warnings: [] === [abc\[] regex : [abc\[] warnings: [] === [!not] regex : [^not] warnings: [] === [^also_not] regex : [^also_not] warnings: [] === [!*?!\[] regex : [^*?!\[] warnings: [] === [!\]foo] regex : [^\]foo] warnings: [] === not_closed[a-z regex : not_closed\[a-z warnings: ['Malformed character class; treating as literal'] === [[:spa[ce:]] regex : \[\[:spa\[ce:\]\] warnings: ['Malformed character class; treating as literal'] === [ regex : \[ warnings: ['Malformed character class; treating as literal'] === \ regex : \\ warnings: ['Got unescaped trailing backslash'] === ] regex : \] warnings: ['Got unescaped right bracket'] osh/split_test.pyc ....... ---------------------------------------------------------------------- Ran 7 tests in 0.106s OK '' PARTS [] 'a' 1 PARTS ['a'] ' a ' 1 2 PARTS ['a'] '\tab\n' 1 3 PARTS ['ab'] 'a b\n' 1 3 4 PARTS ['a', 'b'] 'a\\ b' 1 2 4 PARTS ['a b'] 'a\\ b' 2 3 4 PARTS ['a\\', 'b'] '\\\\*.sh' 1 6 PARTS ['\\*.sh'] 'Aa b \\ a\\ b' 2 3 4 5 6 8 9 11 PARTS ['Aa', 'b', ' a b'] '' PARTS [] 'a_b' 1 2 3 PARTS ['a', 'b'] ' a b ' 1 2 3 4 PARTS ['a', 'b'] 'a _ b' 1 4 5 PARTS ['a', 'b'] ' a _ b ' 2 3 6 7 PARTS ['a', 'b'] 'a _ _ b' 1 4 4 6 7 PARTS ['a', '', 'b'] 'a __ b' 1 3 3 5 6 PARTS ['a', '', 'b'] 'a _ _ _ b' 1 5 5 7 7 10 11 PARTS ['a', '', '', 'b'] ' a _ ' 2 3 6 PARTS ['a'] ' _ a _ ' 1 1 1 3 4 7 PARTS ['', 'a'] 'a\\ b' 1 2 4 PARTS ['a b'] 'a\\ b' 2 3 4 PARTS ['a\\', 'b'] '' PARTS [] '_' 0 0 1 PARTS [''] 'a_' 1 2 PARTS ['a'] '__a_b_' 0 0 1 1 2 3 4 5 6 PARTS ['', '', 'a', 'b'] 'a\\_b' 1 2 4 PARTS ['a_b'] 'a\\_b' 2 3 4 PARTS ['a\\', 'b'] [(, 4), (, 5), (, 8)] ' x\\ y' 1 2 3 5 PARTS ['x y'] ' ab\\ ' 1 3 4 5 PARTS ['ab '] ' ab\\ ' 1 3 4 5 PARTS ['ab '] 'a__b---c_d' 1 2 2 3 4 5 5 6 6 7 8 9 10 PARTS ['a', '', 'b', '', '', 'c', 'd'] 'a\\_\\-b' 1 2 3 4 6 PARTS ['a_-b'] 'a\\_\\-b' 2 3 4 5 6 PARTS ['a\\', '\\', 'b'] '' PARTS [] '\t' 1 PARTS [] 'a\t' 1 PARTS ['a'] '\t\ta\tb\t' 2 3 4 5 PARTS ['a', 'b'] 'a\\\tb' 1 2 4 PARTS ['a\tb'] 'a\\\tb' 2 3 4 PARTS ['a\\', 'b'] osh/state_test.pyc ......<=;|&(:') exported:F readonly:F is_assoc_array:F) UID (cell val:(value.Str s:1000) exported:F readonly:F is_assoc_array:F) IFS (cell val:(value.Str s:' \t\n') exported:F readonly:F is_assoc_array:F) OPTIND (cell val:(value.Str s:1) exported:F readonly:F is_assoc_array:F) HOSTNAME (cell val:(value.Str s:lisa) exported:F readonly:F is_assoc_array:F) PWD (cell val: (value.Str s:/home/andy/git/oilshell/oil/opy/_tmp/repo-with-opy) exported: F readonly: F is_assoc_array: F ) U (cell val:(value.Undef) exported:T readonly:F is_assoc_array:F) EUID (cell val:(value.Str s:1000) exported:F readonly:F is_assoc_array:F) HOME (cell val:(value.Str s:/home/andy) exported:F readonly:F is_assoc_array:F) OSTYPE (cell val:(value.Str s:linux) exported:F readonly:F is_assoc_array:F) SHELLOPTS (cell val:(value.Str s:'') exported:F readonly:T is_assoc_array:F) PS4 (cell val:(value.Str s:'+ ') exported:F readonly:F is_assoc_array:F) > <=;|&(:') exported:F readonly:F is_assoc_array:F) UID (cell val:(value.Str s:1000) exported:F readonly:F is_assoc_array:F) IFS (cell val:(value.Str s:' \t\n') exported:F readonly:F is_assoc_array:F) OPTIND (cell val:(value.Str s:1) exported:F readonly:F is_assoc_array:F) HOSTNAME (cell val:(value.Str s:lisa) exported:F readonly:F is_assoc_array:F) PWD (cell val: (value.Str s:/home/andy/git/oilshell/oil/opy/_tmp/repo-with-opy) exported: F readonly: F is_assoc_array: F ) U (cell val:(value.Str s:u) exported:T readonly:F is_assoc_array:F) EUID (cell val:(value.Str s:1000) exported:F readonly:F is_assoc_array:F) HOME (cell val:(value.Str s:/home/andy) exported:F readonly:F is_assoc_array:F) OSTYPE (cell val:(value.Str s:linux) exported:F readonly:F is_assoc_array:F) SHELLOPTS (cell val:(value.Str s:'') exported:F readonly:T is_assoc_array:F) PS4 (cell val:(value.Str s:'+ ') exported:F readonly:F is_assoc_array:F) > (value.Str s:/home/andy) (value.Undef) <=;|&(:') exported:F readonly:F is_assoc_array:F) UID (cell val:(value.Str s:1000) exported:F readonly:F is_assoc_array:F) IFS (cell val:(value.Str s:' \t\n') exported:F readonly:F is_assoc_array:F) OPTIND (cell val:(value.Str s:1) exported:F readonly:F is_assoc_array:F) HOSTNAME (cell val:(value.Str s:lisa) exported:F readonly:F is_assoc_array:F) PWD (cell val: (value.Str s:/home/andy/git/oilshell/oil/opy/_tmp/repo-with-opy) exported: F readonly: F is_assoc_array: F ) EUID (cell val:(value.Str s:1000) exported:F readonly:F is_assoc_array:F) HOME (cell val:(value.Str s:/home/andy) exported:F readonly:F is_assoc_array:F) OSTYPE (cell val:(value.Str s:linux) exported:F readonly:F is_assoc_array:F) SHELLOPTS (cell val:(value.Str s:'') exported:F readonly:T is_assoc_array:F) PS4 (cell val:(value.Str s:'+ ') exported:F readonly:F is_assoc_array:F) > <=;|&(:') exported:F readonly:F is_assoc_array:F) UID (cell val:(value.Str s:1000) exported:F readonly:F is_assoc_array:F) IFS (cell val:(value.Str s:' \t\n') exported:F readonly:F is_assoc_array:F) OPTIND (cell val:(value.Str s:1) exported:F readonly:F is_assoc_array:F) PYTHONPATH (cell val:(value.Str s:/lib) exported:T readonly:F is_assoc_array:F) HOSTNAME (cell val:(value.Str s:lisa) exported:F readonly:F is_assoc_array:F) g2 (cell val:(value.Undef) exported:T readonly:F is_assoc_array:F) PWD (cell val: (value.Str s:/home/andy/git/oilshell/oil/opy/_tmp/repo-with-opy) exported: F readonly: F is_assoc_array: F ) r (cell val:(value.Str s:1) exported:F readonly:T is_assoc_array:F) COMPREPLY (cell val:(value.StrArray strs:[1 2 3]) exported:T readonly:F is_assoc_array:F) EUID (cell val:(value.Str s:1000) exported:F readonly:F is_assoc_array:F) HOME (cell val:(value.Str s:/home/andy) exported:F readonly:F is_assoc_array:F) OSTYPE (cell val:(value.Str s:li.. ---------------------------------------------------------------------- Ran 8 tests in 0.053s OK nux) exported:F readonly:F is_assoc_array:F) SHELLOPTS (cell val:(value.Str s:'') exported:F readonly:T is_assoc_array:F) PS4 (cell val:(value.Str s:'+ ') exported:F readonly:F is_assoc_array:F) myglobal (cell val:(value.Str s:g) exported:T readonly:T is_assoc_array:F) -- 1 -- x (cell val:(value.Str s:YYY) exported:F readonly:F is_assoc_array:F) -- 2 -- > osh/string_ops_test.pyc ... ---------------------------------------------------------------------- Ran 3 tests in 0.008s OK ## shortest prefix 1 test 'a' return 'bcd' 2 test 'ab' return 'cd' 3 test 'abc' return 'd' 4 test 'abcd' return '' # longest prefix 4 test 'abcd' return '' 3 test 'abc' return 'd' 2 test 'ab' return 'cd' 1 test 'a' return 'bcd' % shortest suffix 3 test 'd' return 'abc' 2 test 'cd' return 'ab' 1 test 'bcd' return 'a' 0 test 'abcd' return '' %% longest suffix 0 test 'abcd' return '' 1 test 'bcd' return 'a' 2 test 'cd' return 'ab' 3 test 'd' return 'abc' Utf8Encode case 'e' 101 Utf8Encode case '\xc4\x80' 256 Utf8Encode case '\xe1\x88\xb4' 4660 Utf8Encode case '\xf0\xa0\x80\x80' 131072 Utf8Encode case '\xef\xbf\xbd' 268566528 osh/word_compile_test.pyc ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK osh/word_eval_test.pyc . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK osh/word_parse_test.pyc ... --- ${array[0]} { (word_part.BracedVarSub token: bracket_op: (bracket_op.ArrayIndex expr:(arith_expr.ArithWord w:{(Lit_Digits 0)})) ) } --- ${array[5+5]} { (word_part.BracedVarSub token: bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 5)}) right: (arith_expr.ArithWord w:{(Lit_Digits 5)}) ) ) ) } --- ${array[@]} {(word_part.BracedVarSub token: bracket_op:(bracket_op.WholeArray op_id:Lit_At))} --- ${array[*]} {(word_part.BracedVarSub token: bracket_op:(bracket_op.WholeArray op_id:Arith_Star))} --- ${#} {(${ VSub_Pound '#')} --- ${!} {(${ VSub_Bang '!')} --- ${?} {(${ VSub_QMark '?')} --- ${var} {(${ VSub_Name var)} --- ${15} {(${ VSub_Number 15)} --- ${#var} {(word_part.BracedVarSub token: prefix_op:VSub_Pound)} --- ${!ref} {(word_part.BracedVarSub token: prefix_op:VSub_Bang)} --- ${##} {(word_part.BracedVarSub token: prefix_op:VSub_Pound)} --- ${array[0]} { (word_part.BracedVarSub token: bracket_op: (bracket_op.ArrayIndex expr:(arith_expr.ArithWord w:{(Lit_Digits 0)})) ) } --- ${array[@]} {(word_part.BracedVarSub token: bracket_op:(bracket_op.WholeArray op_id:Lit_At))} --- ${#array[0]} { (word_part.BracedVarSub token: prefix_op: VSub_Pound bracket_op: (bracket_op.ArrayIndex expr:(arith_expr.ArithWord w:{(Lit_Digits 0)})) ) } --- ${!array[0]} { (word_part.BracedVarSub token: prefix_op: VSub_Bang bracket_op: (bracket_op.ArrayIndex expr:(arith_expr.ArithWord w:{(Lit_Digits 0)})) ) } --- ${var#prefix} { (word_part.BracedVarSub token: suffix_op: (suffix_op.StringUnary op_id:VOp1_Pound arg_word:{(prefix)}) ) } --- ${!var#prefix} { (word_part.BracedVarSub token: prefix_op: VSub_Bang suffix_op: (suffix_op.StringUnary op_id:VOp1_Pound arg_word:{(prefix)}) ) } --- ${#var#prefix} Got expected ParseError: --- ${##2} Got expected ParseError: --- ${undef:- Got expected ParseError: --- ${undef:-$ Got expected ParseError: --- ${undef:-$F Got expected ParseError: --- ${x@ Got expected ParseError: --- ${x@Q Got expected ParseError: --- ${x% Got expected ParseError: --- ${x/ Got expected ParseError: --- ${x/a/ Got expected ParseError: --- ${x/a/b Got expected ParseError: --- ${x: Got expected ParseError: --- ${#@} {(word_part.BracedVarSub token: prefix_op:VSub_Pound)} --- ${#11} {(word_part.BracedVarSub token: prefix_op:VSub_Pound)} --- ${#str} {(word_part.BracedVarSub token: prefix_op:VSub_Pound)} --- ${#array[0]} { (word_part.BracedVarS....ub token: prefix_op: VSub_Pound bracket_op: (bracket_op.ArrayIndex expr:(arith_expr.ArithWord w:{(Lit_Digits 0)})) ) } --- ${#array["key"]} { (word_part.BracedVarSub token: prefix_op: VSub_Pound bracket_op: (bracket_op.ArrayIndex expr:(arith_expr.ArithWord w:{(DQ (key))})) ) }--MULTI --- a=(1 2 3) {(Lit_VarLike 'a=') (word_part.ArrayLiteralPart words:[{(1)} {(2)} {(3)}])}a=(1 2 3) 0 (line_span line_id:0 col:0 length:2) --- foo {(foo)}foo 0 (line_span line_id:0 col:0 length:3) --- \$ {(word_part.EscapedLiteralPart token:)}\$ 0 (line_span line_id:0 col:0 length:2) --- '' {(SQ )}'' 0 (line_span line_id:0 col:0 length:1) --- 'sq' {(SQ )}'sq' 0 (line_span line_id:0 col:0 length:1) --- "" {(DQ )}"" 0 (line_span line_id:0 col:0 length:1) --- "dq" {(DQ (dq))}"dq" 0 (line_span line_id:0 col:0 length:1) --- $(echo command sub) { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(command)} {(sub)})]) left_token: ) }$(echo command sub) 0 (line_span line_id:0 col:0 length:2) --- $(( 1 + 2 )) { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) }$(( 1 + 2 )) 0 (line_span line_id:0 col:0 length:3) --- ~user {(Lit_TildeLike '~user')}~user 0 (line_span line_id:0 col:0 length:5) --- ${var#} {(word_part.BracedVarSub token: suffix_op:(suffix_op.StringUnary op_id:VOp1_Pound arg_word:{}))}${var#} 0 (line_span line_id:0 col:0 length:2) --- ${var/pat/replace} { (word_part.BracedVarSub token: suffix_op: (suffix_op.PatSub pat:{(pat)} replace:{(replace)} replace_mode:Undefined_Tok) ) } --- ${var//pat/replace} { (word_part.BracedVarSub token: suffix_op: (suffix_op.PatSub pat:{(pat)} replace:{(replace)} replace_mode:Lit_Slash) ) } --- ${var/%pat/replace} { (word_part.BracedVarSub token: suffix_op: (suffix_op.PatSub pat:{(pat)} replace:{(replace)} replace_mode:Lit_Percent) ) } --- ${var/#pat/replace} { (word_part.BracedVarSub token: suffix_op: (suffix_op.PatSub pat:{(pat)} replace:{(replace)} replace_mode:Lit_Pound) ) } --- ${var/pat} { (word_part.BracedVarSub token: suffix_op: (suffix_op.PatSub pat:{(pat)} replace_mode:Undefined_Tok) ) } --- ${var//pat} { (word_part.BracedVarSub token: suffix_op: (suffix_op.PatSub pat:{(pat)} replace_mode:Lit_Slash) ) } --- ${var/pat//} { (word_part.BracedVarSub token: suffix_op: (suffix_op.PatSub pat:{(pat)} replace:{(Lit_Slash /)} replace_mode:Undefined_Tok) ) } --- ${var/pat///} { (word_part.BracedVarSub token: suffix_op: (suffix_op.PatSub pat: {(pat)} replace: {(Lit_Slash /) (Lit_Slash /)} replace_mode: Undefined_Tok ) ) } --- ${var/pat/"//"} { (word_part.BracedVarSub token: suffix_op: (suffix_op.PatSub pat:{(pat)} replace:{(DQ (//))} replace_mode:Undefined_Tok) ) } --- ${var////\\/} { (word_part.BracedVarSub token: suffix_op: (suffix_op.PatSub pat: {(Lit_Slash /)} replace: {(word_part.EscapedLiteralPart token:) (Lit_Slash /)} replace_mode: Lit_Slash ) ) }--- ls "foo" {(ls)}{(DQ (foo))}(word.TokenWord token:)--- $(( 1 + 2 )) { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) }(word.TokenWord token:)--- $(echo $(( 1 )) ) { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(echo)} {(word_part.ArithSubPart anode:(arith_expr.ArithWord w:{(Lit_Digits 1)}).)})] ) left_token: ) }(word.TokenWord token:)--- echo ${#array[@]} b {(echo)}{ (word_part.BracedVarSub token: prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) }{(b)}(word.TokenWord token:)--- echo $(( ${#array[@]} )) {(echo)}{ (word_part.ArithSubPart anode: (arith_expr.ArithWord w: { (word_part.BracedVarSub token: prefix_op: VSub_Pound bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) } ) ) }(word.TokenWord token:)--- echo ${@%suffix} {(echo)}{ (word_part.BracedVarSub token: suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(suffix)}) ) }(word.TokenWord token:)--- ${@} {(${ VSub_At '@')}(word.TokenWord token:)--- echo ${var,,} {(echo)}{(word_part.BracedVarSub token: suffix_op:(suffix_op.StringUnary op_id:VOp1_DComma arg_word:{}))}(word.TokenWord token:)--- echo ${var,,?} {(echo)}{ (word_part.BracedVarSub token: suffix_op: (suffix_op.StringUnary op_id:VOp1_DComma arg_word:{('?')}) ) }(word.TokenWord token:)--- ${\ foo} {(${ VSub_Name foo)}(word.TokenWord token:)--- ${foo\ } {(${ VSub_Name foo)}(word.TokenWord token:)--- ${foo#\ yo} { (word_part.BracedVarSub token: suffix_op: (suffix_op.StringUnary op_id:VOp1_Pound arg_word:{(yo)}) ) }(word.TokenWord token:)--- "${foo#\ yo}" { (DQ (word_part.BracedVarSub token: suffix_op: (suffix_op.StringUnary op_id:VOp1_Pound arg_word:{(yo)}) ) ) }(word.TokenWord token:)--- 1 + 2 {(Lit_Digits 1)}(word.TokenWord token:){(Lit_Digits 2)}(word.TokenWord token:)--- a + b {(Lit_ArithVarLike a)}(word.TokenWord token:){(Lit_ArithVarLike b)}(word.TokenWord token:)--- $a * $b {($ VSub_DollarName '$a')}(word.TokenWord token:){($ VSub_DollarName '$b')}(word.TokenWord token:)--- ${a} * ${b} {(${ VSub_Name a)}(word.TokenWord token:){(${ VSub_Name b)}(word.TokenWord token:)--- $(echo 1) * $(echo 2) { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(1)})]) left_token: ) }(word.TokenWord token:){ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(2)})]) left_token: ) }(word.TokenWord token:)--- `echo 1` + 2 { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(echo)} {(1)})]) left_token: ) }(word.TokenWord token:){(Lit_Digits 2)}(word.TokenWord token:)--- $((1 + 2)) * $((3 + 4)) { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) }(word.TokenWord token:){ (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 3)}) right: (arith_expr.ArithWord w:{(Lit_Digits 4)}) ) ) }(word.TokenWord token:)--- 'single quoted' {(SQ <'single quoted'>)}(word.TokenWord token:)--- "${a}" + "${b}" {(DQ (${ VSub_Name a))}(word.TokenWord token:){(DQ (${ VSub_Name b))}(word.TokenWord token:)--- $# + $$ {($ VSub_Pound '$#')}(word.TokenWord token:){($ VSub_Dollar '$$')}(word.TokenWord token:)--- $(( x[0] < 5 )) { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Less left: (arith_expr.ArithBinary op_.......id: Arith_LBracket left: (arith_expr.ArithVarRef token:) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) right: (arith_expr.ArithWord w:{(Lit_Digits 5)}) ) ) }(word.TokenWord token:)--- $(( ++i )) { (word_part.ArithSubPart anode: (arith_expr.UnaryAssign op_id:Arith_DPlus child:(lhs_expr.LhsName name:i)) ) }(word.TokenWord token:)--- $(( i++ )) { (word_part.ArithSubPart anode: (arith_expr.UnaryAssign op_id:Node_PostDPlus child:(lhs_expr.LhsName name:i)) ) }(word.TokenWord token:)--- $(( x -= 1)) { (word_part.ArithSubPart anode: (arith_expr.BinaryAssign op_id: Arith_MinusEqual left: (lhs_expr.LhsName name:x) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) }(word.TokenWord token:)--- $(( x |= 1)) { (word_part.ArithSubPart anode: (arith_expr.BinaryAssign op_id: Arith_PipeEqual left: (lhs_expr.LhsName name:x) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) }(word.TokenWord token:)--- $(( x[0] = 1 )) { (word_part.ArithSubPart anode: (arith_expr.BinaryAssign op_id: Arith_Equal left: (lhs_expr.LhsIndexedName name:x index:(arith_expr.ArithWord w:{(Lit_Digits 0)})) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) }(word.TokenWord token:)--- $(( 1 | 0 )) { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Pipe left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) }(word.TokenWord token:)--- $((0x$size)) { (word_part.ArithSubPart anode: (arith_expr.ArithWord w:{(Lit_Digits 0) (Lit_ArithVarLike x) ($ VSub_DollarName '$size')}) ) }(word.TokenWord token:) --- $(( f(x) )) { (word_part.ArithSubPart anode: (arith_expr.FuncCall func: (arith_expr.ArithVarRef token:) args: [(arith_expr.ArithVarRef token:)] ) ) } --- $(( f(1, 2, 3, 4) )) { (word_part.ArithSubPart anode: (arith_expr.FuncCall func: (arith_expr.ArithVarRef token:) args: [ (arith_expr.ArithWord w:{(Lit_Digits 1)}) (arith_expr.ArithWord w:{(Lit_Digits 2)}) (arith_expr.ArithWord w:{(Lit_Digits 3)}) (arith_expr.ArithWord w:{(Lit_Digits 4)}) ] ) ) } --- ${foo:0} { (word_part.BracedVarSub token: suffix_op: (suffix_op.Slice begin:(arith_expr.ArithWord w:{(Lit_Digits 0)})) ) } --- ${foo:0:1} { (word_part.BracedVarSub token: suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 0)}) length: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } --- ${foo:1+2:2+3} { (word_part.BracedVarSub token: suffix_op: (suffix_op.Slice begin: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 1)}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) length: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{(Lit_Digits 2)}) right: (arith_expr.ArithWord w:{(Lit_Digits 3)}) ) ) ) } --- ${foo::1} { (word_part.BracedVarSub token: suffix_op: (suffix_op.Slice length:(arith_expr.ArithWord w:{(Lit_Digits 1)})) ) } --- ${var:-default]} { (word_part.BracedVarSub token: suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{('default]')}) ) } --- ~/git/oilshell/oil {(Lit_TildeLike '~') (/git/oilshell/oil)} --- ~andy/git/oilshell/oil {(Lit_TildeLike '~andy') (/git/oilshell/oil)} --- ~andy_c/git/oilshell/oil {(Lit_TildeLike '~andy_c') (/git/oilshell/oil)} --- ~andy.c/git/oilshell/oil {(Lit_Tild... ---------------------------------------------------------------------- Ran 18 tests in 3.847s OK eLike '~andy.c') (/git/oilshell/oil)} --- ~andy-c/git/oilshell/oil {(Lit_TildeLike '~andy-c') (/git/oilshell/oil)} --- ~andy-c:git/oilshell/oil {(Lit_TildeLike '~andy-c') (Lit_Other ':') (git/oilshell/oil)} --- ${var#} {(word_part.BracedVarSub token: suffix_op:(suffix_op.StringUnary op_id:VOp1_Pound arg_word:{}))} --- ${var#prefix} { (word_part.BracedVarSub token: suffix_op: (suffix_op.StringUnary op_id:VOp1_Pound arg_word:{(prefix)}) ) } --- ${var##} {(word_part.BracedVarSub token: suffix_op:(suffix_op.StringUnary op_id:VOp1_DPound arg_word:{}))} --- ${var##prefix} { (word_part.BracedVarSub token: suffix_op: (suffix_op.StringUnary op_id:VOp1_DPound arg_word:{(prefix)}) ) } --- ${var%suffix} { (word_part.BracedVarSub token: suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(suffix)}) ) } --- ${var%%suffix} { (word_part.BracedVarSub token: suffix_op: (suffix_op.StringUnary op_id:VOp1_DPercent arg_word:{(suffix)}) ) } --- ${name} {(${ VSub_Name name)} --- ${name[0]} { (word_part.BracedVarSub token: bracket_op: (bracket_op.ArrayIndex expr:(arith_expr.ArithWord w:{(Lit_Digits 0)})) ) } --- ${array[@]} {(word_part.BracedVarSub token: bracket_op:(bracket_op.WholeArray op_id:Lit_At))}osh/word_test.pyc -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Error: Error: -------------------------------------------------------------------------------- Error: Error: -------------------------------------------------------------------------------- more_env: [(env_pair name: s val: (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Chars val:1 span_id:1))]) spids: [0] )] assign_pair: (assign_pair lhs: (lhs_expr.LhsName name:s spids:[0]) op: Equal rhs: (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Chars val:1 span_id:1))]) spids: [0] ) -------------------------------------------------------------------------------- Error: assign_pair: (assign_pair lhs: (lhs_expr.LhsIndexedName name: a index: (arith_expr.ArithVarRef token:(token id:Lit_ArithVarLike val:x span_id:0)) spids: [0] ) op: Equal rhs: (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Chars val:1 span_id:3))]) spids: [0] ) -------------------------------------------------------------------------------- Error: assign_pair: (assign_pair lhs: (lhs_expr.LhsIndexedName name: a index: (arith_expr.ArithVarRef token:(token id:Lit_ArithVarLike val:x span_id:0)) spids: [0] ) op: PlusEqual rhs: (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Chars val:1 span_id:3))]) spids: [0] ) -------------------------------------------------------------------------------- Error: assign_pair: (assign_pair lhs: (lhs_expr.LhsIndexedName name: a index: (arith_expr.UnaryAssign op_id:Node_PostDPlus child:(lhs_expr.LhsName name:x spids:[0])) spids: [0] ) op: PlusEqual rhs: (word.CompoundWord parts:[(word_part.LiteralPart token:(token id:Lit_Chars val:1 span_id:5))]) spids: [0] ) -------------------------------------------------------------------------------- more_env: [(env_pair name: a val: (word.CompoundWord parts: [ (word_part.ArrayLiteralPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:1 span_id:2))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:2 span_id:4))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:3 span_id:6))] ) ] ) ] ) spids: [0] )] assign_pair: (assign_pair lhs: (lhs_expr.LhsName name:a spids:[0]) op: Equal rhs: (word.CompoundWord parts: [ (word_part.ArrayLiteralPart words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:1 span_id:2))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:2 span_id:4))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:3 span_id:6))] ) ] ) ] ) spids: [0] ) -------------------------------------------------------------------------------- Error: assign_pair: (assign_pair lhs: (lhs_expr.LhsIndexedName name: a index: (arith_expr.ArithVarRef token:(token id:Lit_ArithVarLike val:x span_id:0)) spids: [0] ) op: Equal rhs: (word.EmptyWord) spids: [0] ) -------------------------------------------------------------------------------- more_env: [(env_pair name: s val: (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_TildeLike val:'~foo' span_id:1))] ) spids: [0] )] assign_pair: (assign_pair lhs: (lhs_expr.LhsName name:s spids:[0]) op: Equal rhs: (word.CompoundWord parts: [(word_part.TildeSubPart token:(token id:Lit_TildeLike val:'~foo' span_id:1))] ) spids: [0] ) -------------------------------------------------------------------------------- Error: assign_pair: (assign_pair lhs: (lhs_expr.LhsIndexedName name: a index: (arith_expr.ArithVarRef token:(token id:Lit_ArithVarLike val:x span_id:0)) spids: [0] ) op: Equal rhs: (word.CompoundWord parts: [(word_part.TildeSubPart token:(token id:Lit_TildeLike val:'~' span_id:3))] ) spids: [0] ) . ---------------------------------------------------------------------- Ran 1 test in 0.360s OK --- foobar {(foobar)}None None 0 --- a[x {(Lit_ArrayLhsOpen 'a[') (x)}None None 0 --- a[]=$foo$bar {(Lit_ArrayLhsOpen 'a[') (Lit_ArrayLhsClose ']=') ($ VSub_DollarName '$foo') ($ VSub_DollarName '$bar')}(token id:Lit_ArrayLhsOpen val:'a[' span_id:0) (token id:Lit_ArrayLhsClose val:']=' span_id:1) 2 --- a[]+=$foo$bar {(Lit_ArrayLhsOpen 'a[') (Lit_ArrayLhsClose ']+=') ($ VSub_DollarName '$foo') ($ VSub_DollarName '$bar') }(token id:Lit_ArrayLhsOpen val:'a[' span_id:0) (token id:Lit_ArrayLhsClose val:']+=' span_id:1) 2 --- s=1 {(Lit_VarLike 's=') (1)}(token id:Lit_VarLike val:'s=' span_id:0) None 1 --- s+=1 {(Lit_VarLike 's+=') (1)}(token id:Lit_VarLike val:'s+=' span_id:0) None 1 --- a[x]=1 {(Lit_ArrayLhsOpen 'a[') (x) (Lit_ArrayLhsClose ']=') (1)}(token id:Lit_ArrayLhsOpen val:'a[' span_id:0) (token id:Lit_ArrayLhsClose val:']=' span_id:2) 3 --- a[x]+=1 {(Lit_ArrayLhsOpen 'a[') (x) (Lit_ArrayLhsClose ']+=') (1)}(token id:Lit_ArrayLhsOpen val:'a[' span_id:0) (token id:Lit_ArrayLhsClose val:']+=' span_id:2) 3 --- a[x++]+=1 {(Lit_ArrayLhsOpen 'a[') (x) (Lit_Other '+') (Lit_Other '+') (Lit_ArrayLhsClose ']+=') (1)}(token id:Lit_ArrayLhsOpen val:'a[' span_id:0) (token id:Lit_ArrayLhsClose val:']+=' span_id:4) 5 --- a=(1 2 3) {(Lit_VarLike 'a=') (word_part.ArrayLiteralPart words:[{(1)} {(2)} {(3)}])}(token id:Lit_VarLike val:'a=' span_id:0) None 1 --- a+=(1 2 3) {(Lit_VarLike 'a+=') (word_part.ArrayLiteralPart words:[{(1)} {(2)} {(3)}])}(token id:Lit_VarLike val:'a+=' span_id:0) None 1 --- s= {(Lit_VarLike 's=')}(token id:Lit_VarLike val:'s=' span_id:0) None 1 --- a[x]= {(Lit_ArrayLhsOpen 'a[') (x) (Lit_ArrayLhsClose ']=')}(token id:Lit_ArrayLhsOpen val:'a[' span_id:0) (token id:Lit_ArrayLhsClose val:']=' span_id:2) 3 --- s=~foo {(Lit_VarLike 's=') (Lit_TildeLike '~foo')}(token id:Lit_VarLike val:'s=' span_id:0) None 1 --- a[x]=~ {(Lit_ArrayLhsOpen 'a[') (x) (Lit_ArrayLhsClose ']=') (Lit_TildeLike '~')}(token id:Lit_ArrayLhsOpen val:'a[' span_id:0) (token id:Lit_ArrayLhsClose val:']=' span_id:2) 3 oil_lang/cmd_parse_test.pyc ParseSimpleCommand literal ParseSimpleCommand literal . ---------------------------------------------------------------------- Ran 1 test in 0.010s OK (oil_cmd.Simple words: [ (oil_word.Compound parts: [(oil_word_part.Literal token:(token id:Lit_Chars val:echo span_id:0))] ) (oil_word.Compound parts: [(oil_word_part.Literal token:(token id:Lit_Chars val:hi span_id:2))] ) ] ) ~/git/oilshell/oil/opy Ran 32 tests, 2 failures asdl/arith_parse_test.pyc core/completion_test.pyc