mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-11-25 16:31:00 +02:00
tests: inject '-t 1' to read
during tests
This commit is contained in:
parent
c1a25d724e
commit
c12b861952
@ -51,7 +51,7 @@ _dotenv_deauthorize() {
|
||||
# This function can be mocked in tests
|
||||
_dotenv_read_answer() {
|
||||
local answer
|
||||
read -q answer
|
||||
read $=_AUTOENV_TEST_READ_ARGS -q answer
|
||||
echo $answer
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
# Ensure we have our mocked out ENV_AUTHORIZATION_FILE
|
||||
|
||||
[[ $ENV_AUTHORIZATION_FILE[0,4] == '/tmp' ]] || return 1
|
||||
|
||||
# Inject timeout for `read` while running tests.
|
||||
_AUTOENV_TEST_READ_ARGS='-t 1'
|
||||
|
Loading…
Reference in New Issue
Block a user