awk: fix a bug in argc counting in recent change

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2013-11-21 15:09:55 +01:00
parent 2635369a92
commit bd0e221620
2 changed files with 21 additions and 9 deletions

View File

@@ -275,10 +275,22 @@ testing "awk large integer" \
"" ""
testing "awk length(array)" \
"awk 'BEGIN{ A[1]=2; A["qwe"]="asd"; print length(A)}'" \
"awk 'BEGIN{ A[1]=2; A[\"qwe\"]=\"asd\"; print length(A)}'" \
"2\n" \
"" ""
testing "awk -f and ARGC" \
"awk -f - input" \
"re\n2\n" \
"do re mi\n" \
'{print $2; print ARGC;}' \
testing "awk -e and ARGC" \
"awk -e '{print \$2; print ARGC;}' input" \
"re\n2\n" \
"do re mi\n" \
"" \
# testing "description" "command" "result" "infile" "stdin"
exit $FAILCOUNT