summary refs log tree commit diff
path: root/bin/1sh/tests/builtins/read1.0
blob: e0d751529a5590919c3f47744d14cfa6f8ae9ad2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# $FreeBSD: releng/12.1/bin/sh/tests/builtins/read1.0 190300 2009-03-22 23:00:52Z stefanf $
set -e

echo "1 2 3"		| { read a; echo "x${a}x"; }
echo "1 2 3"		| { read a b; echo "x${a}x${b}x"; }
echo "1 2 3"		| { read a b c; echo "x${a}x${b}x${c}x"; }
echo "1 2 3"		| { read a b c d; echo "x${a}x${b}x${c}x${d}x"; }

echo "	1  2 3 "	| { read a b c; echo "x${a}x${b}x${c}x"; }
echo "	1  2 3 "	| { unset IFS; read a b c; echo "x${a}x${b}x${c}x"; }
echo "	1  2 3 "	| { IFS=$(printf ' \t\n') read a b c; echo "x${a}x${b}x${c}x"; }
echo "	1  2 3 "	| { IFS= read a b; echo "x${a}x${b}x"; }

echo " 1,2 3 "		| { IFS=' ,' read a b c; echo "x${a}x${b}x${c}x"; }
echo ", 2 ,3"		| { IFS=' ,' read a b c; echo "x${a}x${b}x${c}x"; }
echo " 1 ,,3"		| { IFS=' ,' read a b c; echo "x${a}x${b}x${c}x"; }
echo " 1 , , 3"		| { IFS=' ,' read a b c; echo "x${a}x${b}x${c}x"; }
echo " 1 ,2 3,"		| { IFS=' ,' read a b c; echo "x${a}x${b}x${c}x"; }
echo " 1 ,2 3,,"	| { IFS=' ,' read a b c; echo "x${a}x${b}x${c}x"; }

echo " 1,2 3 "		| { IFS=', ' read a b c; echo "x${a}x${b}x${c}x"; }
echo ", 2 ,3"		| { IFS=', ' read a b c; echo "x${a}x${b}x${c}x"; }
echo " 1 ,,3"		| { IFS=', ' read a b c; echo "x${a}x${b}x${c}x"; }
echo " 1 , , 3"		| { IFS=', ' read a b c; echo "x${a}x${b}x${c}x"; }
echo " 1 ,2 3,"		| { IFS=', ' read a b c; echo "x${a}x${b}x${c}x"; }
echo " 1 ,2 3,,"	| { IFS=', ' read a b c; echo "x${a}x${b}x${c}x"; }
=1'>Add ImagoJune McEnroe 2019-07-29Add KindredJune McEnroe 2019-07-27Clean up home filesJune McEnroe 2019-07-27Fix shell script style in ~/.local/binJune McEnroe 2019-07-27Shell script style passJune McEnroe 2019-07-27Add c11.pdfJune McEnroe 2019-07-27Move pdf script to MakefileJune McEnroe 2019-07-27Update macOS neovim to 0.3.8June McEnroe Which somehow still doesn't include my man fix. 2019-07-27Rewrite port makefiles consistentlyJune McEnroe 2019-07-27Rewrite Makefile once more with more organizationJune McEnroe 2019-07-27Reference png.h in bin.7June McEnroe 2019-07-27Revert "Use scheme to style HTMLs"June McEnroe This reverts commit 46237a457ff3c9a813a56f2a442c115bf8610cbc. I don't know why but I don't like it. 2019-07-27Remove scheme text linkJune McEnroe No standard base64 encoder so no way to maintain it. 2019-07-26Update Dark.terminalJune McEnroe Why are the blobs so much bigger now? 2019-07-26Lighten dark whiteJune McEnroe 2019-07-25Add png.3 man pageJune McEnroe 2019-07-25Use scheme to style HTMLsJune McEnroe 2019-07-25Don't match comments in strings in makeJune McEnroe 2019-07-25Generate index.html with links from bin.7June McEnroe 2019-07-24Warn when date has changedJune McEnroe 2019-07-24Add whenJune McEnroe When? Now. 2019-07-24Remove histedit from bitJune McEnroe