From 101ada83cbac3e51280839e40e9642e44314edda Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Tue, 10 Oct 2017 08:34:50 +0200 Subject: [PATCH] Fix unit tests for read to stdout behavior --- tests/read.err | 3 +-- tests/read.expect | 5 +++++ tests/read.in | 2 +- tests/read.out | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/read.err b/tests/read.err index d76028bc0..f7f4e2a6a 100644 --- a/tests/read.err +++ b/tests/read.err @@ -1,7 +1,6 @@ #################### -# Read with no vars is an error -read: Expected at least 1 args, got only 0 +# Read with no vars is not an error #################### # Read with -a and anything other than exactly on var name is an error diff --git a/tests/read.expect b/tests/read.expect index d26153ea5..3b04c2f3e 100644 --- a/tests/read.expect +++ b/tests/read.expect @@ -16,6 +16,11 @@ expect_prompt # read +send_line "read" +expect_read_prompt +send_line "text" +expect_prompt + send_line "read foo" expect_read_prompt send_line "text" diff --git a/tests/read.in b/tests/read.in index 50d28df3b..4561aa987 100644 --- a/tests/read.in +++ b/tests/read.in @@ -3,7 +3,7 @@ # Test read builtin and IFS. # -logmsg Read with no vars is an error +logmsg Read with no vars is not an error read logmsg Read with -a and anything other than exactly on var name is an error diff --git a/tests/read.out b/tests/read.out index eb1c23a6d..5dd8f66a2 100644 --- a/tests/read.out +++ b/tests/read.out @@ -1,6 +1,6 @@ #################### -# Read with no vars is an error +# Read with no vars is not an error #################### # Read with -a and anything other than exactly on var name is an error