Results for special-vars.test.sh

casedashbashmkshoshdescription
0pass pass pass pass $PWD
1pass pass pass pass $?
2pass pass pass pass $#
3ok ok ok FAIL $-
detailsdetailsdetailsdetails
4N-I pass N-I FAIL $_
detailsdetailsdetails
5pass pass pass FAIL PID $$
details
6pass pass pass FAIL Background PID $!
details
7pass pass pass FAIL $PPID
details
8N-I pass pass FAIL $PIPESTATUS
detailsdetails
9N-I pass pass FAIL $RANDOM
detailsdetails

26 passed, 3 ok, 4 known unimplemented, 0 known bugs, 7 failed, 0 skipped

Details on runs that didn't PASS

dash3 $-

stdout:
u
stderr:
bash3 $-

stdout:
huBc
stderr:
mksh3 $-

stdout:
uhc
stderr:
osh3 $-

[osh status] Expected 0, got 2

stdout:
stderr: 
Usage: osh [options]

osh: error: no such option: -o
dash4 $_

stdout:
hi

stderr:
mksh4 $_

stdout:
hi

stderr:
osh4 $_

[osh stdout] Expected b'hi\nhi\n', got b'hi\n\n'

stdout:
hi

stderr:
osh5 PID $$

[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 910, in _Execute
    status = self._RunPipeline(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 839, in _RunPipeline
    p = self._GetProcessForNode(child)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 709, in _GetProcessForNode
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1056, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1039, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 992, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 885, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 820, in _EvalWordPart
    val, decay_array = self._EvalSpecialVar(part.token.id, quoted)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 349, in _EvalSpecialVar
    raise NotImplementedError(op_id)
NotImplementedError: VSub_Dollar
osh6 Background PID $!

[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 974, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 910, in _Execute
    status = self._RunPipeline(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 839, in _RunPipeline
    p = self._GetProcessForNode(child)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 709, in _GetProcessForNode
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1056, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 1039, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 992, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 885, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 820, in _EvalWordPart
    val, decay_array = self._EvalSpecialVar(part.token.id, quoted)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 349, in _EvalSpecialVar
    raise NotImplementedError(op_id)
NotImplementedError: VSub_Bang
osh7 $PPID

[osh status] Expected 0, got 99

stdout:
7
stderr:
dash8 $PIPESTATUS

stdout:
stderr: 
/bin/dash: 2: Bad substitution
osh8 $PIPESTATUS

[osh stdout] Expected b"['0', '33', '0']\n", got b'[]\n'

stdout:
[]
stderr:
dash9 $RANDOM

stdout:
0
stderr:
osh9 $RANDOM

[osh status] Expected 0, got 99

stdout:
7
stderr: