[asdl/format_test.py] .. ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK [asdl/front_end_test.py] ........ ---------------------------------------------------------------------- Ran 8 tests in 0.005s OK [asdl/gen_python_test.py] ........ ---------------------------------------------------------------------- Ran 8 tests in 0.001s OK [asdl/typed_arith_parse_test.py] [build/app_deps_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [core/alloc_test.py] .. ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK [core/completion_test.py] . -- PREFIX 'm' -- PREFIX 'opy/doc' -- PREFIX o -- PREFIX nonexistent/ -- PREFIX README. -- PREFIX core -- PREFIX asdl/R -- PREFIX opy/doc -- PREFIX opy/doc/ -- PREFIX /bi -- PREFIX /tmp/oil_comp_test/ -- PREFIX ./b -- PREFIX i ..Running completion function 'f' with arguments ['', 'f', ''] comp.first , commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[f1 f2]) ... --- Case 3: 'noflags foo:bar --color=auto\t' with flags [] Running completion function 'my_complete' with arguments ['noflags', '--color=auto', 'foo:bar'] comp.first noflags, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[dummy]) matches = ['noflags foo:bar dummy '] --- Case 4: 'noflags "foo:bar|" --color=auto\t' with flags [] Running completion function 'my_complete' with arguments ['noflags', '--color=auto', 'foo:bar|'] Non-fatal assertion failed: COMP_WORDS: Expected noflags "foo:bar|" --color = auto, got noflags foo : bar| --color = auto Non-fatal assertion failed: COMP_CWORD: Expected 4, got 6 Non-fatal assertion failed: COMP_WORDS: Expected noflags "foo:bar|" --color = auto, got noflags foo : bar| --color = auto Non-fatal assertion failed: cword: Expected 4, got 6 comp.first noflags, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[dummy]) matches = ['noflags "foo:bar|" dummy '] --- Case 5: 'noflags "foo:bar|\t' with flags [] matches = [] --- Case 6: 's foo:bar --color=auto\t' with flags ['-s'] Running completion function 'my_complete' with arguments ['s', '--color=auto', 'foo:bar'] comp.first s, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[dummy]) matches = ['s foo:bar dummy '] --- Case 7: 's foo:bar --color auto\t' with flags ['-s'] Running completion function 'my_complete' with arguments ['s', 'auto', '--color'] comp.first s, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[dummy]) matches = ['s foo:bar --color dummy '] --- Case 8: 'n foo:bar --color=auto\t' with flags ['-n', '='] Running completion function 'my_complete' with arguments ['n', '--color=auto', 'foo:bar'] comp.first n, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[dummy]) matches = ['n foo:bar dummy '] --- Case 9: 'n2 foo:bar --color=auto\t' with flags ['-n', ':='] Running completion function 'my_complete' with arguments ['n2', '--color=auto', 'foo:bar'] comp.first n2, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[dummy]) matches = ['n2 foo:bar dummy '] Ran 10 cases ........Running completion function '_bad' with arguments ['bad', '', 'bad'] comp.first bad, commands_changed: [] Function '_bad' returned 124, but the completion spec for 'bad' wasn't changed Running completion function '_both' with arguments ['both', '', 'both'] comp.first both, commands_changed: [] Function '_both' returned 124, but the completion spec for 'both' wasn't changed Running completion function '_both2' with arguments ['both2', '', 'both2'] comp.first both2, commands_changed: ['both2'] Got status 124 from '_both2' and ['both2'] commands changed .Running completion function 'complete_mywords' with arguments ['mywords', 't', 'mywords'] comp.first mywords, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[two three]) Running completion function 'complete_mywords' with arguments ['mywords_nospace', 't', 'mywords_nospace'] comp.first mywords_nospace, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[two three]) Running completion function 'complete_mywords' with arguments ['flagX', '', 'flagX'] comp.first flagX, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[one two three bin]) Running completion function 'complete_mywords' with arguments ['flagX_bang', '', 'flagX_bang'] comp.first flagX_bang, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[one two three bin]) Running completion function 'complete_mywords' with arguments ['flagX_prefix', '', 'flagX_prefix'] comp.first flagX_prefix, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[one two three bin]) Running completion function 'complete_mywords' with arguments ['prefix_plusdirs', 'b', 'prefix_plusdirs'] comp.first prefix_plusdirs, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[bin]) Running completion function 'complete_mywords' with arguments ['flagX_plusdirs', 'b', 'flagX_plusdirs'] comp.first flagX_plusdirs, commands_changed: [] COMPREPLY (value.MaybeStrArray strs:[bin]) . ---------------------------------------------------------------------- Ran 16 tests in 0.561s OK [core/comp_ui_test.py] ......... ---------------------------------------------------------------------- Ran 9 tests in 0.001s OK [core/process_test.py] . uniq -c ^~~~ process_test.py:1: 'uniq' not found pipe_status: [-1, -1, -1, 127] . head ^~~~ process_test.py:1: 'head' not found ls ^~ process_test.py:1: 'ls' not found cat ^~~ process_test.py:1: 'cat' not found sort --reverse head^ ~~~ ^~~~ process_test.py:1: 'head' not found process_test.py:1: 'sort' not found .date returned 0 F. ====================================================================== FAIL: testProcess (__main__.ProcessTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "core/process_test.py", line 112, in testProcess print(p.RunWait(self.waiter, why)) File "/home/travis/build/oilshell/oil/core/process.py", line 940, in RunWait self.Start(why) File "/home/travis/build/oilshell/oil/core/process.py", line 880, in Start self.thunk.Run() File "/home/travis/build/oilshell/oil/core/process.py", line 677, in Run self.ext_prog.Exec(self.argv0_path, self.cmd_val, self.environ) File "/home/travis/build/oilshell/oil/core/process.py", line 563, in Exec self._Exec(argv0_path, cmd_val.argv, cmd_val.arg_spids[0], environ, True) File "/home/travis/build/oilshell/oil/core/process.py", line 606, in _Exec span_id=argv0_spid) File "/home/travis/build/oilshell/oil/core/ui.py", line 280, in Print_ _PrintWithOptionalSpanId('', msg, span_id, self.arena) File "/home/travis/build/oilshell/oil/core/ui.py", line 188, in _PrintWithOptionalSpanId _PrintWithSpanId(prefix, msg, span_id, arena, f) File "/home/travis/build/oilshell/oil/core/ui.py", line 99, in _PrintWithSpanId line_span = arena.GetLineSpan(span_id) File "/home/travis/build/oilshell/oil/core/alloc.py", line 147, in GetLineSpan 'Span ID out of range: %d is greater than %d' % (span_id, len(self.spans)) AssertionError: Span ID out of range: 0 is greater than 0 ---------------------------------------------------------------------- Ran 5 tests in 0.018s FAILED (failures=1) .. ---------------------------------------------------------------------- Ran 5 tests in 0.030s OK [core/pyutil_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [core/state_test.py] ......... ---------------------------------------------------------------------- Ran 9 tests in 0.001s OK [core/ui_test.py] [??? no location ???] hello [line one] ^~ :1: zero [line one] ^~ :1: zero . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [core/util_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [doctools/make_help_test.py] .. ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK [doctools/oil_doc_test.py] .... ---------------------------------------------------------------------- Ran 4 tests in 0.001s OK [doctools/split_doc_test.py] .... ---------------------------------------------------------------------- Ran 4 tests in 0.000s OK [frontend/args_test.py] ....... ---------------------------------------------------------------------- Ran 7 tests in 0.001s OK [frontend/id_kind_def_test.py] .... ---------------------------------------------------------------------- Ran 4 tests in 0.001s OK [frontend/lexer_def_test.py] ...................... ---------------------------------------------------------------------- Ran 22 tests in 0.006s OK [frontend/lexer_gen_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [frontend/lexer_test.py] ... ---------------------------------------------------------------------- Ran 3 tests in 0.000s OK [frontend/match_test.py] Id.Range_Int '1' Id.Range_Dots '..' Id.Range_Int '3' Id.Eol_Tok '' .. ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK [frontend/reader_test.py] .. ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK [lazylex/html_test.py] ... tag = 'a' 0 'a' tag = 'a' 0 'a' 1 'novalue' tag = 'a' 0 'a' 1 'href' 3 'double quoted' tag = 'a' 0 'a' 1 'href' 2 'foo' 1 'class' 3 'bar' tag = 'a' 0 'a' 1 'href' 2 'foo' 1 'class' 3 'bar' . ---------------------------------------------------------------------- Ran 4 tests in 0.000s OK [mycpp/format_strings_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [mycpp/mylib_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [mycpp/pass_state_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [native/fanos_test.py] ......num_bytes = 3 chunk 'foo' num_bytes = 25 chunk 'https://www.oilshell.org/' .. ---------------------------------------------------------------------- Ran 8 tests in 0.000s OK [native/libc_test.py] ..... real 0.100 user 0.200 sys 0.300 ........ ---------------------------------------------------------------------- Ran 13 tests in 0.001s OK [native/line_input_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [native/posix_test.py] ........ ---------------------------------------------------------------------- Ran 8 tests in 0.000s OK [oil_lang/builtin_oil_test.py] BOOL .DICT .FLOAT .INT .OVERFLOW .LIST ...STRING DECODE .STRING ENCODE . ---------------------------------------------------------------------- Ran 10 tests in 0.000s OK [oil_lang/expr_parse_test.py] . var x = $(echo hi) var x = ${x} var x = "quoted ${x}" . var x = y + 2 * 3; var x = r'one\ntwo\n'; var x = $'one\ntwo\n'; var x = "one\\ntwo\\n"; var x = [1,2,3]; var x = [4+5, 6+7*8] var x = [] var x = [x for x in y] . var x = %(a b); var x = %('c' $'string\n'); var x = %($(echo command) $(echo sub)); var x = %(a b) * %($c ${d}); var x = %( a b c ); . var x = $(echo hi); var x = $(echo $(echo hi)); var x = $(echo hi) var x = $(echo $((1+2))); var x = $(for i in 1 2 3; do echo $i; done); var x = %(a b) . ---------------------------------------------------------------------- Ran 5 tests in 0.031s OK [oil_lang/objects_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [osh/arith_parse_test.py] ... ---------------------------------------------------------------------- Ran 3 tests in 0.039s OK [osh/bool_parse_test.py] ...... ---------------------------------------------------------------------- Ran 6 tests in 0.016s OK [osh/braces_test.py] ..'' None '1' None '1..' None '1' (word_part.BracedRange kind:Id.Range_Int start:1 end:3 step:1 spids:[-1]) '3' (word_part.BracedRange kind:Id.Range_Int start:3 end:-10 step:-2 spids:[-1]) '3..-10..-2..' None 'a' None 'a..' None 'a' (word_part.BracedRange kind:Id.Range_Char start:a end:z step:1 spids:[-1]) 'a..z..' None 'z' (word_part.BracedRange kind:Id.Range_Char start:z end:a step:-1 spids:[-1]) . ---------------------------------------------------------------------- Ran 3 tests in 0.020s OK [osh/builtin_bracket_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.001s OK [osh/builtin_comp_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [osh/builtin_lib_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [osh/builtin_misc_test.py] .. ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK [osh/cmd_eval_test.py] .. ---------------------------------------------------------------------- Ran 2 tests in 0.002s OK [osh/cmd_parse_test.py] array=(a b c) ls ^~~~~~ :1: Environment bindings can't contain array literals ............. ls foo| ^ :1: Unexpected EOF while parsing command ....... (( 1 + )) ^ :1: Token can't be used in prefix position . A= (1 2) ^ :1: Expected ( after = . [[ foo bar ]] ^~~ :1: Expected ]] [[ foo -eq ]] ^ :1: Expected ]] [[ foo$(echo <) -eq foo ]] ^ :1: Invalid token after redirect operator . ls < ^ :1: Invalid token after redirect operator ls < < ^ :1: Invalid token after redirect operator echo foo$(ls <)bar ^ :1: Invalid token after redirect operator BAD_ENV=(1 2 3) ls ^~~~~~~~ :1: Environment bindings can't contain array literals for ((i=1; i<)); do echo $i; done ^ :1: Token can't be used in prefix position for ((i=1; i<5; ++i)) OOPS echo $i; ERR ^~~~ :1: Invalid word after for expression for ((i=1; i<5; ++i)); OOPS echo $i; ERR ^~~~ :1: Expected word type Id.KW_Do, got Id.Word_Compound for $bad in 1 2; do echo hi; done ^~~~ :1: Loop variable name should be a constant for foo BAD ^~~ :1: Unexpected word after for loop variable if foo; then echo hi; z ^ :1: Expected word type Id.KW_Fi, got Id.Eof_Real foo$(invalid) () { echo hi; } ^~~ :1: Invalid function name . foo="" echo "bar ^ :1: Unexpected EOF reading double-quoted string that began here .. for x in 1 2 $( ^ :1: Invalid word in for loop . for [ i = 1; i < 10; i++ ] ^ :1: Invalid loop variable name for = in a ^ :1: Invalid loop variable name . for x in 1 2 $(cat <:1: Couldn't find terminator for here doc that starts here . foo"bar" () { ^~~ :1: Invalid function name ............................ errcmd=( "${SETUP_STATE[$err.cmd]}" ) ^ :1: Unexpected token while parsing arithmetic: '.' ...................... ---------------------------------------------------------------------- Ran 79 tests in 0.175s OK [osh/glob_test.py] ...... ---------------------------------------------------------------------- Ran 6 tests in 0.001s OK [osh/history_test.py] ..... ---------------------------------------------------------------------- Ran 5 tests in 0.007s OK [osh/prompt_test.py] .... ---------------------------------------------------------------------- Ran 4 tests in 0.002s OK [osh/split_test.py] ....... ---------------------------------------------------------------------- Ran 7 tests in 0.001s OK [osh/string_ops_test.py] ..... ---------------------------------------------------------------------- Ran 5 tests in 0.000s OK [osh/word_compile_test.py] ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK [osh/word_eval_test.py] .. ---------------------------------------------------------------------- Ran 2 tests in 0.016s OK [osh/word_parse_test.py] ..................... ---------------------------------------------------------------------- Ran 21 tests in 0.122s OK [osh/word_test.py] -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Error: Error: _MakeAssignPair() takes exactly 3 arguments (2 given) -------------------------------------------------------------------------------- Error: Error: _MakeAssignPair() takes exactly 3 arguments (2 given) -------------------------------------------------------------------------------- more_env: [(env_pair name:s val:(compound_word parts:[(Token id:Id.Lit_Chars span_id:1 val:1)]) spids:[0])] Error: _MakeAssignPair() takes exactly 3 arguments (2 given) -------------------------------------------------------------------------------- Error: Error: _MakeAssignPair() takes exactly 3 arguments (2 given) -------------------------------------------------------------------------------- Error: Error: _MakeAssignPair() takes exactly 3 arguments (2 given) -------------------------------------------------------------------------------- Error: Error: _MakeAssignPair() takes exactly 3 arguments (2 given) -------------------------------------------------------------------------------- more_env: [(env_pair name: a val: (compound_word parts: [ (sh_array_literal left: (Token id:Id.Op_LParen span_id:1 val:_) words: [ (compound_word parts:[(Token id:Id.Lit_Chars span_id:2 val:1)]) (compound_word parts:[(Token id:Id.Lit_Chars span_id:4 val:2)]) (compound_word parts:[(Token id:Id.Lit_Chars span_id:6 val:3)]) ] spids: [1] ) ] ) spids: [0] )] Error: _MakeAssignPair() takes exactly 3 arguments (2 given) -------------------------------------------------------------------------------- Error: Error: _MakeAssignPair() takes exactly 3 arguments (2 given) -------------------------------------------------------------------------------- more_env: [(env_pair name: s val: (compound_word parts:[(Token id:Id.Lit_TildeLike span_id:1 val:'~foo')]) spids: [0] )] Error: _MakeAssignPair() takes exactly 3 arguments (2 given) -------------------------------------------------------------------------------- Error: Error: _MakeAssignPair() takes exactly 3 arguments (2 given) . ---------------------------------------------------------------------- Ran 1 test in 0.016s OK [pylib/os_path_test.py] .... ---------------------------------------------------------------------- Ran 4 tests in 0.000s OK [pylib/path_stat_test.py] .. ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK [qsn_/qsn_test.py] .....s1 128 s2 32 s3 16 s4 8 cont 64 . ---------------------------------------------------------------------- Ran 6 tests in 0.003s OK [test/sh_spec_test.py] .... ---------------------------------------------------------------------- Ran 4 tests in 0.088s OK [test/wild_report_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK [tools/osh2oil_test.py] . ---------------------------------------------------------------------- Ran 1 test in 0.019s OK real 0m3.707s user 0m3.246s sys 0m0.478s Minimal unit tests passed.