2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-07-20 11:22:34 +08:00
|
|
|
# Read with no vars is an error
|
|
|
|
read: Expected at least 1 args, got only 0
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
2017-07-20 11:22:34 +08:00
|
|
|
# Read with -a and anything other than exactly on var name is an error
|
|
|
|
read: Expected 1 args, got 0
|
|
|
|
read: Expected 1 args, got 2
|
2017-08-04 12:25:20 +08:00
|
|
|
|
|
|
|
####################
|
|
|
|
# Test splitting input
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Test splitting input with IFS empty
|
|
|
|
|
2017-08-05 03:04:32 +08:00
|
|
|
####################
|
|
|
|
# read -n tests
|
|
|
|
|
|
|
|
####################
|
|
|
|
# read -z tests
|
|
|
|
|
2017-08-04 12:25:20 +08:00
|
|
|
####################
|
|
|
|
# Chunked read tests
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Confirm reading non-interactively works -- #4206 regression
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Test --delimiter (and $IFS, for now)
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Delimiter =
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Delimiter empty
|
|
|
|
|
|
|
|
####################
|
|
|
|
# IFS empty string
|
|
|
|
|
|
|
|
####################
|
|
|
|
# IFS unset
|
|
|
|
|
|
|
|
####################
|
|
|
|
# Delimiter =
|