sync with reality; clog already says:

* [tg] Drop “stop” alias, [203]lksh(1) functionality to auto-unalias
This commit is contained in:
tg 2015-12-12 23:31:15 +00:00
parent b2b0c0bbb6
commit d83f63ac1c

73
check.t
View File

@ -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 -*-
#-
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
@ -7751,7 +7751,6 @@ expected-stdout:
name: aliases-funcdef-1
description:
Check if POSIX functions take precedences over aliases
category: shell:legacy-no
stdin:
alias foo='echo makro'
foo() {
@ -7761,23 +7760,9 @@ stdin:
expected-stdout:
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
description:
Check if POSIX functions take precedences over aliases
category: shell:legacy-no
stdin:
alias foo='echo makro'
foo () {
@ -7787,19 +7772,6 @@ stdin:
expected-stdout:
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
description:
Check if aliases take precedences over Korn functions
@ -9031,52 +9003,9 @@ expected-exit: e != 0
expected-stderr-pattern:
/\.: 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
description:
make aliases not conflict with function definitions
category: shell:legacy-no
stdin:
# POSIX function can be defined, but alias overrides it
alias foo='echo bar'