sync with reality; clog already says:
* [tg] Drop “stop” alias, [203]lksh(1) functionality to auto-unalias
This commit is contained in:
parent
b2b0c0bbb6
commit
d83f63ac1c
73
check.t
73
check.t
@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/check.t,v 1.715 2015/12/12 22:25:12 tg Exp $
|
# $MirOS: src/bin/mksh/check.t,v 1.716 2015/12/12 23:31:15 tg Exp $
|
||||||
# -*- mode: sh -*-
|
# -*- mode: sh -*-
|
||||||
#-
|
#-
|
||||||
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
@ -7751,7 +7751,6 @@ expected-stdout:
|
|||||||
name: aliases-funcdef-1
|
name: aliases-funcdef-1
|
||||||
description:
|
description:
|
||||||
Check if POSIX functions take precedences over aliases
|
Check if POSIX functions take precedences over aliases
|
||||||
category: shell:legacy-no
|
|
||||||
stdin:
|
stdin:
|
||||||
alias foo='echo makro'
|
alias foo='echo makro'
|
||||||
foo() {
|
foo() {
|
||||||
@ -7761,23 +7760,9 @@ stdin:
|
|||||||
expected-stdout:
|
expected-stdout:
|
||||||
makro
|
makro
|
||||||
---
|
---
|
||||||
name: aliases-funcdef-1-legacy
|
|
||||||
description:
|
|
||||||
Check if POSIX functions take precedences over aliases
|
|
||||||
category: shell:legacy-yes
|
|
||||||
stdin:
|
|
||||||
alias foo='echo makro'
|
|
||||||
foo() {
|
|
||||||
echo funktion
|
|
||||||
}
|
|
||||||
foo
|
|
||||||
expected-stdout:
|
|
||||||
funktion
|
|
||||||
---
|
|
||||||
name: aliases-funcdef-2
|
name: aliases-funcdef-2
|
||||||
description:
|
description:
|
||||||
Check if POSIX functions take precedences over aliases
|
Check if POSIX functions take precedences over aliases
|
||||||
category: shell:legacy-no
|
|
||||||
stdin:
|
stdin:
|
||||||
alias foo='echo makro'
|
alias foo='echo makro'
|
||||||
foo () {
|
foo () {
|
||||||
@ -7787,19 +7772,6 @@ stdin:
|
|||||||
expected-stdout:
|
expected-stdout:
|
||||||
makro
|
makro
|
||||||
---
|
---
|
||||||
name: aliases-funcdef-2-legacy
|
|
||||||
description:
|
|
||||||
Check if POSIX functions take precedences over aliases
|
|
||||||
category: shell:legacy-yes
|
|
||||||
stdin:
|
|
||||||
alias foo='echo makro'
|
|
||||||
foo () {
|
|
||||||
echo funktion
|
|
||||||
}
|
|
||||||
foo
|
|
||||||
expected-stdout:
|
|
||||||
funktion
|
|
||||||
---
|
|
||||||
name: aliases-funcdef-3
|
name: aliases-funcdef-3
|
||||||
description:
|
description:
|
||||||
Check if aliases take precedences over Korn functions
|
Check if aliases take precedences over Korn functions
|
||||||
@ -9031,52 +9003,9 @@ expected-exit: e != 0
|
|||||||
expected-stderr-pattern:
|
expected-stderr-pattern:
|
||||||
/\.: missing argument.*\n.*source: missing argument/
|
/\.: missing argument.*\n.*source: missing argument/
|
||||||
---
|
---
|
||||||
name: alias-function-no-conflict-legacy
|
|
||||||
description:
|
|
||||||
make aliases not conflict with functions, legacy version:
|
|
||||||
undefine these aliases upon definition of the function
|
|
||||||
note: for ksh functions, the order of preference differs in GNU bash
|
|
||||||
category: shell:legacy-yes
|
|
||||||
stdin:
|
|
||||||
# POSIX function overrides and removes alias
|
|
||||||
alias foo='echo bar'
|
|
||||||
foo
|
|
||||||
foo() {
|
|
||||||
echo baz
|
|
||||||
}
|
|
||||||
foo
|
|
||||||
unset -f foo
|
|
||||||
foo 2>/dev/null || echo rab
|
|
||||||
# alias overrides ksh function
|
|
||||||
alias korn='echo bar'
|
|
||||||
korn
|
|
||||||
function korn {
|
|
||||||
echo baz
|
|
||||||
}
|
|
||||||
korn
|
|
||||||
# alias temporarily overrides POSIX function
|
|
||||||
bla() {
|
|
||||||
echo bfn
|
|
||||||
}
|
|
||||||
bla
|
|
||||||
alias bla='echo bal'
|
|
||||||
bla
|
|
||||||
unalias bla
|
|
||||||
bla
|
|
||||||
expected-stdout:
|
|
||||||
bar
|
|
||||||
baz
|
|
||||||
rab
|
|
||||||
bar
|
|
||||||
bar
|
|
||||||
bfn
|
|
||||||
bal
|
|
||||||
bfn
|
|
||||||
---
|
|
||||||
name: alias-function-no-conflict
|
name: alias-function-no-conflict
|
||||||
description:
|
description:
|
||||||
make aliases not conflict with function definitions
|
make aliases not conflict with function definitions
|
||||||
category: shell:legacy-no
|
|
||||||
stdin:
|
stdin:
|
||||||
# POSIX function can be defined, but alias overrides it
|
# POSIX function can be defined, but alias overrides it
|
||||||
alias foo='echo bar'
|
alias foo='echo bar'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user