echo T.getline: test getline function

awk=${awk-../a.out}

who >foo1
cat foo1 | $awk '
BEGIN {
	while (getline)
		print
	exit
}
' >foo
diff foo1 foo || echo 'BAD: T.getline (bare getline)'

$awk '
BEGIN {
	while (getline <"/etc/passwd")
		print
	exit
}
' >foo
diff /etc/passwd foo || echo 'BAD: T.getline (getline <file)'

$awk '
BEGIN {
	while (getline <ARGV[1])
		print
	exit
}
' /etc/passwd >foo
diff /etc/passwd foo || echo 'BAD: T.getline (getline <arg)'
