Results for builtin-completion.test.sh

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

Details on runs that didn't PASS

osh0 complete with no args and complete -p both print completion spec

[osh stdout] Expected "complete -W 'foo bar' mycommand\ncomplete -W 'foo bar' mycommand\ncomplete -F myfunc other\n" Got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
[Commands]
__fallback:
  ( )
  actions: FileSystemAction 
  extra: 
  else: 
  predicate: DefaultPredicate 
  prefix: 
  suffix: 
__first:
  ( )
  actions: FixedWordsAction DynamicStrDictAction DynamicProcDictAction FixedWordsAction FileSystemAction ExternalCommandAction 
  extra: 
  else: 
  predicate: DefaultPredicate 
  prefix: 
  suffix: 
[Patterns]

  complete -p
           ^~
[ stdin ]:7: 'complete' got invalid flag '-p'
bash2 complete with nonexistent function

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

stdout:
status=0
stderr:
bash35 Parse errors for compgen -W and complete -W

stdout:
status=1
status=0
stderr:
bash: line 1: ${: bad substitution
osh37 Runtime errors for compgen -F func

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

stdout:
foo
bar
status=0
stderr:
    COMPREPLY+=( $(( 1 / 0 )) )  # FATAL, but we still have candidates
                         ^
[ stdin ]:3: Divide by zero
osh40 complete -C vs. compgen -C

[osh stdout] Expected 'foo\nbar\ncompgen=0\ncomplete=0\n', got 'compgen=1\ncomplete=0\n'

stdout:
compgen=1
complete=0
stderr:
osh warning: complete -C not implemented
osh warning: complete -C not implemented