Results for special-vars.test.sh

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

25 passed, 3 ok, 4 known unimplemented, 0 known bugs, 8 failed, 0 skipped

Details on runs that didn't PASS

dash2 $-

stdout:
u
stderr:
bash2 $-

stdout:
huBc
stderr:
mksh2 $-

stdout:
uhc
stderr:
osh2 $-

[osh status] Expected 0, got 2

stdout:
stderr: 
Usage: osh [options]

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

stdout:
hi

stderr:
mksh3 $_

stdout:
hi

stderr:
osh3 $_

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

stdout:
hi

stderr:
osh4 PID $$

[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 959, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 759, in _Execute
    status = self._RunPipeline(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 691, in _RunPipeline
    p = self._GetProcessForNode(child)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 557, in _GetProcessForNode
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1045, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1028, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 989, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 882, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 797, in _EvalWordPart
    val = self._EvalSpecialVar(part.token.id, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 330, in _EvalSpecialVar
    raise NotImplementedError(op_id)
NotImplementedError: VSub_Dollar
osh5 Background PID $!

[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 959, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 824, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 759, in _Execute
    status = self._RunPipeline(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 691, in _RunPipeline
    p = self._GetProcessForNode(child)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 557, in _GetProcessForNode
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1045, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1028, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 989, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 882, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 797, in _EvalWordPart
    val = self._EvalSpecialVar(part.token.id, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 330, in _EvalSpecialVar
    raise NotImplementedError(op_id)
NotImplementedError: VSub_Bang
osh6 $PPID

[osh status] Expected 0, got 99

stdout:
7
stderr:
dash7 $PIPESTATUS

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

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

stdout:
['']
stderr:
osh8 $PWD

[osh stdout] Expected b'/\n', got b'\n'

stdout:
stderr: 
Unexpected error in execvpe('cd', ['cd', '/'], ...): [Errno 2] No such file or directory: b'/home/andy/bin/cd'
dash9 $RANDOM

stdout:
0
stderr:
osh9 $RANDOM

[osh status] Expected 0, got 99

stdout:
7
stderr: