Results for builtin-completion.test.sh

statusoshosh-cpp
pass 4545
FAIL 33
total4848
caseoshosh-cppdescription
0FAIL FAIL complete with no args and complete -p both print completion spec
detailsdetails
1pass pass complete -F f is usage error
2pass pass complete with nonexistent function
3pass pass complete with no action
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 -e with global/local exported vars
16pass pass compgen -e on known, but unexported, var
17pass pass compgen -e on unknown var
18pass pass compgen -e P
19pass pass compgen with actions: function / variable / file
20pass pass compgen with actions: alias, setopt
21pass pass compgen with actions: shopt
22pass pass compgen with action and suffix: helptopic
23pass pass compgen -A directory
24pass pass compgen -A file
25pass pass compgen -A user
26pass pass compgen -A command completes external commands
27pass pass compgen -A command completes functions and aliases
28pass pass compgen -A command completes builtins and keywords
29pass pass compgen -k shows the same keywords as bash
30pass pass compgen -k shows Oils keywords too
31pass pass compgen -k completes reserved shell keywords
32pass pass -o filenames and -o nospace have no effect with compgen
33pass pass -o plusdirs and -o dirnames with compgen
34pass pass compgen -o default completes files and dirs
35pass pass compgen doesn't respect -X for user-defined functions
36pass pass compgen -W words -X filter
37pass pass compgen -f -X filter -- $cur
38pass pass compgen doesn't need shell quoting
39pass pass compgen -W 'one two three'
40pass pass compgen -W evaluates code in $()
41pass pass compgen -W uses IFS, and delimiters are escaped with \
42pass pass Parse errors for compgen -W and complete -W
43pass pass Runtime errors for compgen -W
44FAIL FAIL Runtime errors for compgen -F func
detailsdetails
45pass pass compgen -W '' cmd is not a usage error
46pass pass compgen -A builtin
47FAIL FAIL complete -C vs. compgen -C
detailsdetails
90 passed, 0 OK, 0 not implemented, 0 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'
osh-cpp0 complete with no args and complete -p both print completion spec

[osh-cpp stdout] Expected "complete -W 'foo bar' mycommand\ncomplete -W 'foo bar' mycommand\ncomplete -F myfunc other\n" Got ''
[osh-cpp 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'
osh44 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
osh-cpp44 Runtime errors for compgen -F func

[osh-cpp 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
osh47 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
osh-cpp47 complete -C vs. compgen -C

[osh-cpp 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