awk: fix FS assignment behavior. Closes 5108

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2012-07-11 01:27:15 +02:00
parent e1db338a51
commit df8066a78c
2 changed files with 19 additions and 0 deletions

View File

@@ -217,4 +217,11 @@ end d
testing "awk handles empty ()" \
"awk 'BEGIN {print()}' 2>&1" "awk: cmd. line:1: Empty sequence\n" "" ""
testing "awk FS assignment" "awk '{FS=\":\"; print \$1}'" \
"a:b\ne\n" \
"" \
"a:b c:d\ne:f g:h"
# testing "description" "command" "result" "infile" "stdin"
exit $FAILCOUNT