Results for builtin-completion.test.sh

casebashoshosh_ALTosh-byterundescription
0pass pass pass pass -A function prints functions
1pass pass pass pass Invalid syntax
2pass pass pass pass how compgen calls completion functions
3pass pass pass pass complete -o -F (git)
4pass pass pass pass compopt with invalid syntax
5pass pass pass pass compopt fails when not in completion function
6pass pass pass pass compgen -f on invalid dir
7pass pass pass pass compgen -f
8pass pass pass pass compgen -v with local vars
9pass pass pass pass compgen -v on unknown var
10pass pass pass pass compgen -v P
11pass pass pass pass compgen with actions: function / variable / file
12pass pass pass pass compgen with actions: alias, setopt
13pass pass pass pass compgen with actions: shopt
14pass pass pass pass compgen with action and suffix: helptopic
15pass pass pass pass compgen -A directory
16pass pass pass pass compgen -A file
17pass pass pass pass compgen -A user
18pass pass pass pass compgen -A command completes external commands
19pass pass pass pass compgen -A command completes functions and aliases
20pass pass pass pass compgen -A command completes builtins and keywords
21BUG pass pass pass complete with nonexistent function
details
22BUG pass pass pass complete with no action
details
23pass pass pass pass -o filenames and -o nospace have no effect with compgen
24pass pass pass pass -o plusdirs and -o dirnames with compgen
25pass pass pass pass compgen -o default completes files and dirs
26pass pass pass FAIL compgen doesn't respect -X for user-defined functions
details
27pass pass pass FAIL compgen -W words -X filter
details
28pass pass pass FAIL compgen -f -X filter -- $cur
details
29pass pass pass pass compgen doesn't need shell quoting
30pass pass pass pass compgen -W 'one two three'
31pass pass pass pass compgen -W evaluates code in $()
32pass pass pass pass compgen -W uses IFS, and delimiters are escaped with \
33BUG pass pass pass Parse errors for compgen -W and complete -W
details
34pass pass pass pass Runtime errors for compgen -W
35pass FAIL FAIL FAIL Runtime errors for compgen -F func
detailsdetailsdetails
36pass pass pass pass compgen -W '' cmd is not a usage error

139 passed, 0 ok, 0 known unimplemented, 3 known bugs, 1 failed, 0 skipped

Details on runs that didn't PASS

bash21 complete with nonexistent function

stdout:
status=0
stderr:
bash22 complete with no action

stdout:
status=0
stderr:
osh-byterun26 compgen doesn't respect -X for user-defined functions

[osh-byterun stdout] Expected 'one\nthree\n--\ntwo\nbin\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
osh 'shopt' usage error: Invalid option 'globstar'
FATAL: maximum recursion depth exceeded in __instancecheck__
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
osh-byterun27 compgen -W words -X filter

[osh-byterun stdout] Expected 'one\nthree\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
osh 'shopt' usage error: Invalid option 'globstar'
FATAL: maximum recursion depth exceeded in __instancecheck__
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
osh-byterun28 compgen -f -X filter -- $cur

[osh-byterun stdout] Expected 'spam.py\nspam.sh\n--\nspam.py\n', got 'spam.py\nspam.sh\n--\n'
[osh-byterun status] Expected 0, got 1

stdout:
spam.py
spam.sh
--
stderr:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
osh 'shopt' usage error: Invalid option 'globstar'
FATAL: maximum recursion depth exceeded in __instancecheck__
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 93, in __call__
    self.func_globals, {})
  File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 164, in make_frame
    frame = Frame(code, f_globals, f_locals, self.frame)
  File "/home/andy/git/oilshell/oil/opy/byterun/pyobj.py", line 169, in __init__
    self.f_builtins = f_locals['__builtins__']
KeyError: '__builtins__'
bash33 Parse errors for compgen -W and complete -W

stdout:
status=1
status=0
stderr:
_tmp/spec-bin/bash: line 1: ${: bad substitution
osh35 Runtime errors for compgen -F func

[osh stdout] Expected 'status=1\n', got 'foo\nbar\nstatus=0\n'

stdout:
foo
bar
status=0
stderr:
Line 3 of '<stdin>'
    COMPREPLY+=( $(( 1 / 0 )) )  # FATAL, but we still have candidates
                         ^
Divide by zero
osh_ALT35 Runtime errors for compgen -F func

[osh_ALT stdout] Expected 'status=1\n', got 'foo\nbar\nstatus=0\n'

stdout:
foo
bar
status=0
stderr:
Line 3 of '<stdin>'
    COMPREPLY+=( $(( 1 / 0 )) )  # FATAL, but we still have candidates
                         ^
Divide by zero
osh-byterun35 Runtime errors for compgen -F func

[osh-byterun stdout] Expected 'status=1\n', got 'foo\nbar\nstatus=0\n'

stdout:
foo
bar
status=0
stderr:
Line 3 of '<stdin>'
    COMPREPLY+=( $(( 1 / 0 )) )  # FATAL, but we still have candidates
                         ^
Divide by zero