/home/uke/oil/bin/osh interactive: spec test case results

Results for interactive.test.sh

statusosh
pass 7
FAIL 11
total18
caseoshdescription
0FAIL 'exit' in oshrc (regression)
details
1pass fatal errors continue
2FAIL interactive shell loads rcfile (when combined with -c)
details
3FAIL --rcfile with parse error - shell is executed anyway
details
4FAIL interactive shell loads files in rcdir (when combined with -c)
details
5pass nonexistent --rcdir is ignored
6FAIL shell doesn't load rcfile/rcdir if --norc is given
details
7FAIL interactive shell runs PROMPT_COMMAND after each command
details
8FAIL parse error in PROMPT_COMMAND
details
9pass runtime error in PROMPT_COMMAND
10pass Error message with bad oshrc file (currently ignored)
11pass PROMPT_COMMAND can see $?, like bash
12pass PROMPT_COMMAND that writes to BASH_REMATCH
13FAIL NO ASSERTIONS: Are startup files sourced before or after job control?
details
14FAIL HISTFILE is written in interactive shell
details
15pass HISTFILE default value
16FAIL HISTFILE=my-history loads history from that file, and writes back to it
details
17FAIL HISTFILE=my-history with history -a
details
7 passed, 0 OK, 0 not implemented, 0 BUG, 11 failed, 0 timeouts, 0 cases skipped
11 failed under osh

Details on runs that didn't PASS

osh0 'exit' in oshrc (regression)

[osh stdout] Expected 'one\n' Got ''
[osh status] Expected 42 Got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1296, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch2
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/uke/oil/osh/cmd_parse.py", line 2839, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2695, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2554, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 1222, in ParseSimpleCommand
    redirects, words, typed_args, block = self._ScanSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 904, in _ScanSimpleCommand
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 680, in _GetWord
    self.arena)
  File "/home/uke/oil/osh/cmd_parse.py", line 203, in _ParseHereDocBody
    w_parser.ReadHereDocBody(h.stdin_parts)  # fills this in
  File "/home/uke/oil/osh/word_parse.py", line 2347, in ReadHereDocBody
    self._ReadLikeDQ(None, False, parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
osh1 fatal errors continue

stdout:
one
stderr:
  echo $(( 1 / 0 ))
             ^
[ -c flag ]:2: fatal: Divide by zero
osh2 interactive shell loads rcfile (when combined with -c)

[osh stdout] Expected '1\nRCFILE\n2\n' Got '1\n'
[osh status] Expected 0 Got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
1
stderr:
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1296, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch2
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/uke/oil/osh/cmd_parse.py", line 2839, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2695, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2554, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 1222, in ParseSimpleCommand
    redirects, words, typed_args, block = self._ScanSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 904, in _ScanSimpleCommand
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 680, in _GetWord
    self.arena)
  File "/home/uke/oil/osh/cmd_parse.py", line 203, in _ParseHereDocBody
    w_parser.ReadHereDocBody(h.stdin_parts)  # fills this in
  File "/home/uke/oil/osh/word_parse.py", line 2347, in ReadHereDocBody
    self._ReadLikeDQ(None, False, parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
osh3 --rcfile with parse error - shell is executed anyway

[osh stdout] Expected 'flag -c\nstatus=0\n' Got ''
[osh status] Expected 0 Got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1296, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch2
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/uke/oil/osh/cmd_parse.py", line 2839, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2695, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2554, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 1222, in ParseSimpleCommand
    redirects, words, typed_args, block = self._ScanSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 904, in _ScanSimpleCommand
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 680, in _GetWord
    self.arena)
  File "/home/uke/oil/osh/cmd_parse.py", line 203, in _ParseHereDocBody
    w_parser.ReadHereDocBody(h.stdin_parts)  # fills this in
  File "/home/uke/oil/osh/word_parse.py", line 2347, in ReadHereDocBody
    self._ReadLikeDQ(None, False, parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
osh4 interactive shell loads files in rcdir (when combined with -c)

[osh stdout] Expected 'A\nrcdir 1\nrcdir 2\nB\nrcfile first\nrcdir 1\nrcdir 2\nC\n' Got 'A\n'
[osh status] Expected 0 Got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
A
stderr:
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1296, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch2
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/uke/oil/osh/cmd_parse.py", line 2839, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2695, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2554, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 1222, in ParseSimpleCommand
    redirects, words, typed_args, block = self._ScanSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 904, in _ScanSimpleCommand
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 680, in _GetWord
    self.arena)
  File "/home/uke/oil/osh/cmd_parse.py", line 203, in _ParseHereDocBody
    w_parser.ReadHereDocBody(h.stdin_parts)  # fills this in
  File "/home/uke/oil/osh/word_parse.py", line 2347, in ReadHereDocBody
    self._ReadLikeDQ(None, False, parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
osh5 nonexistent --rcdir is ignored

stdout:
hi
status=0
stderr:
osh6 shell doesn't load rcfile/rcdir if --norc is given

[osh stdout] Expected 'A\nC\nD\n' Got 'A\n'
[osh status] Expected 0 Got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
A
stderr:
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1296, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch2
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/uke/oil/osh/cmd_parse.py", line 2839, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2695, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2554, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 1222, in ParseSimpleCommand
    redirects, words, typed_args, block = self._ScanSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 904, in _ScanSimpleCommand
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 680, in _GetWord
    self.arena)
  File "/home/uke/oil/osh/cmd_parse.py", line 203, in _ParseHereDocBody
    w_parser.ReadHereDocBody(h.stdin_parts)  # fills this in
  File "/home/uke/oil/osh/word_parse.py", line 2347, in ReadHereDocBody
    self._ReadLikeDQ(None, False, parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
osh7 interactive shell runs PROMPT_COMMAND after each command

[osh stdout] Expected 'PROMPT\none\nPROMPT\ntwo\nPROMPT\n^D\n' Got ''
[osh status] Expected 0 Got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1296, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch2
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/uke/oil/osh/cmd_parse.py", line 2839, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2695, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2496, in ParseCommand
    return self.ParseCompoundCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2093, in ParseCompoundCommand
    n5 = self.ParseCase()
  File "/home/uke/oil/osh/cmd_parse.py", line 1885, in ParseCase
    return self.ParseOldCase(case_kw)
  File "/home/uke/oil/osh/cmd_parse.py", line 1861, in ParseOldCase
    arm = self.ParseCaseArm()
  File "/home/uke/oil/osh/cmd_parse.py", line 1708, in ParseCaseArm
    c_list = self._ParseCommandTerm()
  File "/home/uke/oil/osh/cmd_parse.py", line 2760, in _ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2554, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 1222, in ParseSimpleCommand
    redirects, words, typed_args, block = self._ScanSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 904, in _ScanSimpleCommand
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 680, in _GetWord
    self.arena)
  File "/home/uke/oil/osh/cmd_parse.py", line 203, in _ParseHereDocBody
    w_parser.ReadHereDocBody(h.stdin_parts)  # fills this in
  File "/home/uke/oil/osh/word_parse.py", line 2347, in ReadHereDocBody
    self._ReadLikeDQ(None, False, parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
osh8 parse error in PROMPT_COMMAND

[osh stdout] Expected 'one\ntwo\n^D\n' Got ''
[osh status] Expected 0 Got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1296, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch2
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/uke/oil/osh/cmd_parse.py", line 2839, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2695, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2496, in ParseCommand
    return self.ParseCompoundCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2093, in ParseCompoundCommand
    n5 = self.ParseCase()
  File "/home/uke/oil/osh/cmd_parse.py", line 1885, in ParseCase
    return self.ParseOldCase(case_kw)
  File "/home/uke/oil/osh/cmd_parse.py", line 1861, in ParseOldCase
    arm = self.ParseCaseArm()
  File "/home/uke/oil/osh/cmd_parse.py", line 1708, in ParseCaseArm
    c_list = self._ParseCommandTerm()
  File "/home/uke/oil/osh/cmd_parse.py", line 2760, in _ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2554, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 1222, in ParseSimpleCommand
    redirects, words, typed_args, block = self._ScanSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 904, in _ScanSimpleCommand
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 680, in _GetWord
    self.arena)
  File "/home/uke/oil/osh/cmd_parse.py", line 203, in _ParseHereDocBody
    w_parser.ReadHereDocBody(h.stdin_parts)  # fills this in
  File "/home/uke/oil/osh/word_parse.py", line 2347, in ReadHereDocBody
    self._ReadLikeDQ(None, False, parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
osh9 runtime error in PROMPT_COMMAND

stdout:
one
two
^D
stderr:
  echo PROMPT $(( 1 / 0 ))
                    ^
[ var 'PROMPT_COMMAND' at ? ]:1: fatal: Divide by zero
  echo PROMPT $(( 1 / 0 ))
                    ^
[ var 'PROMPT_COMMAND' at ? ]:1: fatal: Divide by zero
  echo PROMPT $(( 1 / 0 ))
                    ^
[ var 'PROMPT_COMMAND' at ? ]:1: fatal: Divide by zero
osh10 Error message with bad oshrc file (currently ignored)

stdout:
hi
status=0
bad_oshrc:
stderr:
osh11 PROMPT_COMMAND can see $?, like bash

stdout:
last_status=0
last_status=42
last_status=43
ok
last_status=0
^D
stderr:
osh12 PROMPT_COMMAND that writes to BASH_REMATCH

stdout:
---
one
---
---
bar b a r
---
^D
stderr:
osh13 NO ASSERTIONS: Are startup files sourced before or after job control?

[osh status] Expected 0 Got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1173, in Main
    cmd_ev, errfmt)
  File "/home/uke/oil/core/shell.py", line 168, in SourceStartupFile
    unused = main_loop.Batch(cmd_ev, rc_c_parser, errfmt)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch2
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/uke/oil/osh/cmd_parse.py", line 2839, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2695, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2521, in ParseCommand
    return self.ParseFunctionDef()  # f() { echo; }  # function
  File "/home/uke/oil/osh/cmd_parse.py", line 2172, in ParseFunctionDef
    func.body = self.ParseCompoundCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2073, in ParseCompoundCommand
    n1 = self.ParseBraceGroup()
  File "/home/uke/oil/osh/cmd_parse.py", line 1365, in ParseBraceGroup
    c_list = self._ParseCommandList()
  File "/home/uke/oil/osh/cmd_parse.py", line 2823, in _ParseCommandList
    return self._ParseCommandTerm()
  File "/home/uke/oil/osh/cmd_parse.py", line 2760, in _ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2619, in ParseAndOr
    return self._ParseAndOr()
  File "/home/uke/oil/osh/cmd_parse.py", line 2630, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/uke/oil/osh/cmd_parse.py", line 2578, in ParsePipeline
    child = self.ParseCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 2554, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 1222, in ParseSimpleCommand
    redirects, words, typed_args, block = self._ScanSimpleCommand()
  File "/home/uke/oil/osh/cmd_parse.py", line 904, in _ScanSimpleCommand
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 670, in _GetWord
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/uke/oil/osh/word_parse.py", line 2327, in ReadWord
    w = self._ReadWord(word_mode)
  File "/home/uke/oil/osh/word_parse.py", line 2244, in _ReadWord
    return self._ReadCompoundOrRedir(lex_mode)
  File "/home/uke/oil/osh/word_parse.py", line 1892, in _ReadCompoundOrRedir
    return self._ReadCompoundOrRedir3(lex_mode, Id.Undefined_Tok, True)
  File "/home/uke/oil/osh/word_parse.py", line 1997, in _ReadCompoundOrRedir3
    part = self._ReadUnquotedLeftParts(is_triple_quoted)
  File "/home/uke/oil/osh/word_parse.py", line 910, in _ReadUnquotedLeftParts
    dq_part = self._ReadDoubleQuoted(self.cur_token)
  File "/home/uke/oil/osh/word_parse.py", line 1189, in _ReadDoubleQuoted
    self._ReadLikeDQ(left_token, False, parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
osh14 HISTFILE is written in interactive shell

[osh stdout] Expected 'hist1\nhist2\n^D\necho hist1; echo hist2\n' Got ''
[osh status] Expected 0 Got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1212, in Main
    prompt_plugin, waiter, errfmt)
  File "/home/uke/oil/core/main_loop.py", line 221, in Interactive
    result = c_parser.ParseInteractiveLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2851, in ParseInteractiveLine
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 670, in _GetWord
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/uke/oil/osh/word_parse.py", line 2327, in ReadWord
    w = self._ReadWord(word_mode)
  File "/home/uke/oil/osh/word_parse.py", line 2125, in _ReadWord
    self._GetToken()
  File "/home/uke/oil/osh/word_parse.py", line 251, in _GetToken
    self.cur_token = self.lexer.Read(real_mode)
  File "/home/uke/oil/frontend/lexer.py", line 503, in Read
    t = self._Read(lex_mode)
  File "/home/uke/oil/frontend/lexer.py", line 477, in _Read
    src_line, line_pos = self.line_reader.GetLine()
  File "/home/uke/oil/frontend/reader.py", line 50, in GetLine
    line_str = self._GetLine()
  File "/home/uke/oil/frontend/reader.py", line 245, in _GetLine
    self.prompt_str = self.prompt_ev.EvalFirstPrompt()
  File "/home/uke/oil/osh/prompt.py", line 316, in EvalFirstPrompt
    return self.EvalPrompt(ps1_val.s)
  File "/home/uke/oil/osh/prompt.py", line 278, in EvalPrompt
    ps1_word = w_parser.ReadForPlugin()
  File "/home/uke/oil/osh/word_parse.py", line 2358, in ReadForPlugin
    self._ReadLikeDQ(None, False, w.parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
  cat myhist
      ^~~~~~
[ stdin ]:9: Can't open 'myhist': No such file or directory
osh15 HISTFILE default value

stdout:
status=0
stderr:
osh16 HISTFILE=my-history loads history from that file, and writes back to it

[osh stdout] Expected '2\n 1 echo 1\n 2 echo 2\n 3 history\n\n-- after shell exit --\necho 1\necho 2\nhistory\n' Got '\n-- after shell exit --\necho 1\n'
[osh stderr] Found 'Traceback (most recent'

stdout:
-- after shell exit --
echo 1
stderr:
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1212, in Main
    prompt_plugin, waiter, errfmt)
  File "/home/uke/oil/core/main_loop.py", line 221, in Interactive
    result = c_parser.ParseInteractiveLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2851, in ParseInteractiveLine
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 670, in _GetWord
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/uke/oil/osh/word_parse.py", line 2327, in ReadWord
    w = self._ReadWord(word_mode)
  File "/home/uke/oil/osh/word_parse.py", line 2125, in _ReadWord
    self._GetToken()
  File "/home/uke/oil/osh/word_parse.py", line 251, in _GetToken
    self.cur_token = self.lexer.Read(real_mode)
  File "/home/uke/oil/frontend/lexer.py", line 503, in Read
    t = self._Read(lex_mode)
  File "/home/uke/oil/frontend/lexer.py", line 477, in _Read
    src_line, line_pos = self.line_reader.GetLine()
  File "/home/uke/oil/frontend/reader.py", line 50, in GetLine
    line_str = self._GetLine()
  File "/home/uke/oil/frontend/reader.py", line 245, in _GetLine
    self.prompt_str = self.prompt_ev.EvalFirstPrompt()
  File "/home/uke/oil/osh/prompt.py", line 316, in EvalFirstPrompt
    return self.EvalPrompt(ps1_val.s)
  File "/home/uke/oil/osh/prompt.py", line 278, in EvalPrompt
    ps1_word = w_parser.ReadForPlugin()
  File "/home/uke/oil/osh/word_parse.py", line 2358, in ReadForPlugin
    self._ReadLikeDQ(None, False, w.parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'
osh17 HISTFILE=my-history with history -a

[osh stdout] Expected '2\n\n-- after shell exit --\necho 1\nhistory -a\necho 2\n' Got '\n-- after shell exit --\necho 1\n'
[osh stderr] Found 'Traceback (most recent'

stdout:
-- after shell exit --
echo 1
stderr:
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1212, in Main
    prompt_plugin, waiter, errfmt)
  File "/home/uke/oil/core/main_loop.py", line 221, in Interactive
    result = c_parser.ParseInteractiveLine()
  File "/home/uke/oil/osh/cmd_parse.py", line 2851, in ParseInteractiveLine
    self._GetWord()
  File "/home/uke/oil/osh/cmd_parse.py", line 670, in _GetWord
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/uke/oil/osh/word_parse.py", line 2327, in ReadWord
    w = self._ReadWord(word_mode)
  File "/home/uke/oil/osh/word_parse.py", line 2125, in _ReadWord
    self._GetToken()
  File "/home/uke/oil/osh/word_parse.py", line 251, in _GetToken
    self.cur_token = self.lexer.Read(real_mode)
  File "/home/uke/oil/frontend/lexer.py", line 503, in Read
    t = self._Read(lex_mode)
  File "/home/uke/oil/frontend/lexer.py", line 477, in _Read
    src_line, line_pos = self.line_reader.GetLine()
  File "/home/uke/oil/frontend/reader.py", line 50, in GetLine
    line_str = self._GetLine()
  File "/home/uke/oil/frontend/reader.py", line 245, in _GetLine
    self.prompt_str = self.prompt_ev.EvalFirstPrompt()
  File "/home/uke/oil/osh/prompt.py", line 316, in EvalFirstPrompt
    return self.EvalPrompt(ps1_val.s)
  File "/home/uke/oil/osh/prompt.py", line 278, in EvalPrompt
    ps1_word = w_parser.ReadForPlugin()
  File "/home/uke/oil/osh/word_parse.py", line 2358, in ReadForPlugin
    self._ReadLikeDQ(None, False, w.parts)
  File "/home/uke/oil/osh/word_parse.py", line 1100, in _ReadLikeDQ
    elif self.token_type == Id.Lit_EscapedDoubleQuote:
AttributeError: type object 'Id' has no attribute 'Lit_EscapedDoubleQuote'