Results for alias.test.sh

casedashbashmkshzshoshosh_ALTosh-byterundescription
0pass pass pass pass pass pass pass Basic alias
1pass pass pass pass pass pass pass define and use alias on a single line
2pass pass pass pass pass pass pass alias can override builtin
3pass pass pass pass pass pass pass defining multiple aliases, then unalias
4pass pass ok pass pass pass pass alias not defined
details
5pass pass pass pass pass pass pass unalias not defined
6ok pass ok ok pass pass pass listing given aliases
detailsdetailsdetails
7ok pass ok ok pass pass pass alias without args lists all aliases
detailsdetailsdetails
8BUG pass BUG BUG pass pass pass unalias without args is a usage error
detailsdetailsdetails
9pass pass pass pass pass pass pass alias with trailing space causes alias expansion on second word
10pass pass pass pass pass pass pass Recursive alias expansion of first word
11pass pass pass pass pass pass pass Recursive alias expansion of SECOND word
12pass pass pass pass pass pass pass Expansion of alias with variable
13pass pass pass pass pass pass pass Alias must be an unquoted word, no expansions allowed
14BUG pass pass pass pass pass pass first and second word are the same alias, but no trailing space
details
15pass pass pass pass pass pass pass first and second word are the same alias, with trailing space
16pass pass pass pass pass pass pass Invalid syntax of alias
17pass pass pass pass pass pass pass Dynamic alias definition
18pass pass pass pass pass pass pass Alias name with punctuation
19pass pass ok ok pass pass pass Syntax error after expansion
detailsdetails
20pass pass pass pass pass pass pass Loop split across alias and arg works
21pass pass pass pass FAIL FAIL FAIL Loop split across alias in another way
detailsdetailsdetails
22pass pass pass BUG FAIL FAIL FAIL Loop split across both iterative and recursive aliases
detailsdetailsdetailsdetails
23pass pass ok ok pass pass pass Alias with a quote in the middle is a syntax error
detailsdetails
24pass pass pass pass FAIL FAIL FAIL Alias with internal newlines
detailsdetailsdetails
25pass pass pass ok FAIL FAIL FAIL Alias trailing newline
detailsdetailsdetailsdetails
26pass pass pass pass pass pass pass Two aliases in pipeline
27pass pass pass pass pass pass pass Alias not respected inside $()
28pass BUG pass pass pass pass pass Alias doesn't work on a single line!
details
29pass pass pass BUG pass pass pass Alias is respected inside eval
details
30pass BUG pass pass pass pass pass alias with redirects works
details
31pass BUG pass pass pass pass pass alias with environment bindings works
details
32pass pass pass pass pass pass pass alias with line continuation in the middle
33pass pass pass pass FAIL FAIL FAIL alias for left brace
detailsdetailsdetails
34pass pass pass pass FAIL FAIL FAIL alias for left paren
detailsdetailsdetails
35pass pass pass pass pass pass pass alias used in subshell and command sub
36pass pass pass pass pass pass pass alias used in here doc
37N-I pass pass N-I pass pass pass Corner case: alias inside LHS array arithmetic expression
detailsdetails

225 passed, 12 ok, 2 known unimplemented, 9 known bugs, 6 failed, 0 skipped

Details on runs that didn't PASS

mksh4 alias not defined

stdout:
nonexistentZ alias not found
status=1
stderr:
dash6 listing given aliases

stdout:
e='echo'
ll='ls -l'
stderr:
mksh6 listing given aliases

stdout:
e=echo
ll='ls -l'
stderr:
zsh6 listing given aliases

stdout:
e=echo
ll='ls -l'
stderr:
dash7 alias without args lists all aliases

stdout:
ex='exit'
ll='ls -l'
status=0
stderr:
mksh7 alias without args lists all aliases

stdout:
ex=exit
ll='ls -l'
status=0
stderr:
zsh7 alias without args lists all aliases

stdout:
ex=exit
ll='ls -l'
status=0
stderr:
dash8 unalias without args is a usage error

stdout:
status=0
stderr:
mksh8 unalias without args is a usage error

stdout:
status=0
stderr:
zsh8 unalias without args is a usage error

stdout:
status=1
stderr:
unalias: not enough arguments
dash14 first and second word are the same alias, but no trailing space

stdout:
x echo x
stderr:
_tmp/spec-bin/dash: 1: shopt: not found
mksh19 Syntax error after expansion

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[3]: syntax error: ';;' unexpected
zsh19 Syntax error after expansion

stdout:
stderr: 
zsh: command not found: shopt
zsh: parse error near `;;'
osh21 Loop split across alias in another way

[osh stdout] Expected '1\n2\n3\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
Line 1 of "<expansion of alias 'e_' at line -1 of TODO>"
  for i in 1 2 3; do echo $i
                             ^
Expected word type KW_Done, got Eof_Real
osh_ALT21 Loop split across alias in another way

[osh_ALT stdout] Expected '1\n2\n3\n', got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
Line 1 of "<expansion of alias 'e_' at line -1 of TODO>"
  for i in 1 2 3; do echo $i
                             ^
Expected word type KW_Done, got Eof_Real
osh-byterun21 Loop split across alias in another way

[osh-byterun stdout] Expected '1\n2\n3\n', got ''
[osh-byterun status] Expected 0, got 2

stdout:
stderr: 
Line 1 of "<expansion of alias 'e_' at line -1 of TODO>"
  for i in 1 2 3; do echo $i
                             ^
Expected word type KW_Done, got Eof_Real
zsh22 Loop split across both iterative and recursive aliases

stdout:
stderr: 
zsh: command not found: shopt
osh22 Loop split across both iterative and recursive aliases

[osh stdout] Expected '1\n2\n3\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
Line 1 of "<expansion of alias 'FOR1' at line -1 of TODO>"
  for i in $one "2" 3
                      ^
Invalid word in for loop
osh_ALT22 Loop split across both iterative and recursive aliases

[osh_ALT stdout] Expected '1\n2\n3\n', got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
Line 1 of "<expansion of alias 'FOR1' at line -1 of TODO>"
  for i in $one "2" 3
                      ^
Invalid word in for loop
osh-byterun22 Loop split across both iterative and recursive aliases

[osh-byterun stdout] Expected '1\n2\n3\n', got ''
[osh-byterun status] Expected 0, got 2

stdout:
stderr: 
Line 1 of "<expansion of alias 'FOR1' at line -1 of TODO>"
  for i in $one "2" 3
                      ^
Invalid word in for loop
mksh23 Alias with a quote in the middle is a syntax error

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[5]: no closing quote
zsh23 Alias with a quote in the middle is a syntax error

stdout:
stderr: 
zsh: command not found: shopt
zsh: unmatched '
osh24 Alias with internal newlines

[osh stdout] Expected '1\n2\n3 echo foo\n', got '1\n'

stdout:
1
stderr:
osh_ALT24 Alias with internal newlines

[osh_ALT stdout] Expected '1\n2\n3 echo foo\n', got '1\n'

stdout:
1
stderr:
osh-byterun24 Alias with internal newlines

[osh-byterun stdout] Expected '1\n2\n3 echo foo\n', got '1\n'

stdout:
1
stderr:
zsh25 Alias trailing newline

stdout:
1
2
3
stderr:
zsh: command not found: shopt
zsh: command not found: echo foo
osh25 Alias trailing newline

[osh stdout] Expected '1\n2\n3\nfoo\n', got '1\n'

stdout:
1
stderr:
osh_ALT25 Alias trailing newline

[osh_ALT stdout] Expected '1\n2\n3\nfoo\n', got '1\n'

stdout:
1
stderr:
osh-byterun25 Alias trailing newline

[osh-byterun stdout] Expected '1\n2\n3\nfoo\n', got '1\n'

stdout:
1
stderr:
bash28 Alias doesn't work on a single line!

stdout:
stderr: 
_tmp/spec-bin/bash: line 1: sayhi: command not found
_tmp/spec-bin/bash: line 2: sayhi: command not found
zsh29 Alias is respected inside eval

stdout:
hello outside
stderr:
zsh: command not found: shopt
zsh: command not found: sayhi
bash30 alias with redirects works

stdout:
stderr: 
_tmp/spec-bin/bash: line 2: e_: command not found
_tmp/spec-bin/bash: line 3: e_: command not found
_tmp/spec-bin/bash: line 4: e_: command not found
bash31 alias with environment bindings works

stdout:
1
stderr:
_tmp/spec-bin/bash: line 3: p_: command not found
osh33 alias for left brace

[osh stdout] Expected 'one\ntwo\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
Line 1 of "<expansion of alias 'LEFT' at line -1 of TODO>"
  { echo one
             ^
Expected word type Lit_RBrace, got Eof_Real
osh_ALT33 alias for left brace

[osh_ALT stdout] Expected 'one\ntwo\n', got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
Line 1 of "<expansion of alias 'LEFT' at line -1 of TODO>"
  { echo one
             ^
Expected word type Lit_RBrace, got Eof_Real
osh-byterun33 alias for left brace

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

stdout:
stderr: 
Line 1 of "<expansion of alias 'LEFT' at line -1 of TODO>"
  { echo one
             ^
Expected word type Lit_RBrace, got Eof_Real
osh34 alias for left paren

[osh stdout] Expected 'one\ntwo\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
Line 1 of "<expansion of alias 'LEFT' at line -1 of TODO>"
  ( echo one
             ^
Expected word type Right_Subshell, got Eof_Real
osh_ALT34 alias for left paren

[osh_ALT stdout] Expected 'one\ntwo\n', got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
Line 1 of "<expansion of alias 'LEFT' at line -1 of TODO>"
  ( echo one
             ^
Expected word type Right_Subshell, got Eof_Real
osh-byterun34 alias for left paren

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

stdout:
stderr: 
Line 1 of "<expansion of alias 'LEFT' at line -1 of TODO>"
  ( echo one
             ^
Expected word type Right_Subshell, got Eof_Real
dash37 Corner case: alias inside LHS array arithmetic expression

stdout:
stderr: 
_tmp/spec-bin/dash: 1: shopt: not found
_tmp/spec-bin/dash: 3: a[0]=ZERO: not found
_tmp/spec-bin/dash: 4: a[1]=ONE: not found
_tmp/spec-bin/dash: 5: Bad substitution
zsh37 Corner case: alias inside LHS array arithmetic expression

stdout:
stderr: 
zsh: command not found: shopt
zsh: not an identifier: a[$(zeroech