'main': Use nice for tests in previous
stdbuf is not present on all systems. nice is not builtin and is POSIX.
This commit is contained in:
parent
bc3f77f719
commit
7ba4f0f119
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
# Test the behaviour of a builtin that exists as a command as well.
|
# Test the behaviour of a builtin that exists as a command as well.
|
||||||
# The spaces in $BUFFER are to align precommand-type*.zsh test files.
|
# The spaces in $BUFFER are to align precommand-type*.zsh test files.
|
||||||
BUFFER=$'test ; builtin test ; builtin command test ; stdbuf test '
|
BUFFER=$'test ; builtin test ; builtin command test ; nice test '
|
||||||
|
|
||||||
# Our expectations assumes that a 'test' external command exists (in addition
|
# Our expectations assumes that a 'test' external command exists (in addition
|
||||||
# to the 'test' builtin). Let's verify that, using the EQUALS option (which
|
# to the 'test' builtin). Let's verify that, using the EQUALS option (which
|
||||||
@ -56,6 +56,6 @@ expected_region_highlight=(
|
|||||||
'41 44 command "issue #608"' # test
|
'41 44 command "issue #608"' # test
|
||||||
'47 47 commandseparator' # ;
|
'47 47 commandseparator' # ;
|
||||||
|
|
||||||
'49 54 precommand' # stdbuf
|
'49 52 precommand' # nice
|
||||||
'56 59 command "issue #608"' # test
|
'54 57 command "issue #608"' # test
|
||||||
)
|
)
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
# Test the behaviour of a builtin that does not exist as a command.
|
# Test the behaviour of a builtin that does not exist as a command.
|
||||||
# The spaces in $BUFFER are to align precommand-type*.zsh test files.
|
# The spaces in $BUFFER are to align precommand-type*.zsh test files.
|
||||||
BUFFER=$'zstyle; builtin zstyle; builtin command zstyle; stdbuf zstyle'
|
BUFFER=$'zstyle; builtin zstyle; builtin command zstyle; nice zstyle'
|
||||||
|
|
||||||
# Verify that no $^path/zstyle(N) binary exists.
|
# Verify that no $^path/zstyle(N) binary exists.
|
||||||
if (disable zstyle; type zstyle >/dev/null); then
|
if (disable zstyle; type zstyle >/dev/null); then
|
||||||
@ -50,6 +50,6 @@ expected_region_highlight=(
|
|||||||
'41 46 unknown-token "issue #608"' # zstyle
|
'41 46 unknown-token "issue #608"' # zstyle
|
||||||
'47 47 commandseparator' # ;
|
'47 47 commandseparator' # ;
|
||||||
|
|
||||||
'49 54 precommand' # stdbuf
|
'49 52 precommand' # nice
|
||||||
'56 61 unknown-token "issue #608"' # zstyle
|
'54 59 unknown-token "issue #608"' # zstyle
|
||||||
)
|
)
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
# Test an external command that does not exist as a builtin.
|
# Test an external command that does not exist as a builtin.
|
||||||
# The spaces in $BUFFER are to align precommand-type*.zsh test files.
|
# The spaces in $BUFFER are to align precommand-type*.zsh test files.
|
||||||
BUFFER=$'ls ; builtin ls ; builtin command ls ; stdbuf ls '
|
BUFFER=$'ls ; builtin ls ; builtin command ls ; nice ls '
|
||||||
|
|
||||||
# Verify that the 'ls' command isn't shadowed.
|
# Verify that the 'ls' command isn't shadowed.
|
||||||
if [[ $(type -w ls) != "ls: command" ]]; then
|
if [[ $(type -w ls) != "ls: command" ]]; then
|
||||||
@ -50,6 +50,6 @@ expected_region_highlight=(
|
|||||||
'41 42 command' # ls
|
'41 42 command' # ls
|
||||||
'47 47 commandseparator' # ;
|
'47 47 commandseparator' # ;
|
||||||
|
|
||||||
'49 54 precommand' # stdbuf
|
'49 52 precommand' # nice
|
||||||
'56 57 command' # ls
|
'54 55 command' # ls
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user