xref: /aosp_15_r20/external/one-true-awk/testdir/t.delete0 (revision 9a7741de182b2776d7b30d6355f2585c0780a51b)
1*9a7741deSElliott HughesNF > 0 {
2*9a7741deSElliott Hughes  n = split($0, x)
3*9a7741deSElliott Hughes  if (n != NF)
4*9a7741deSElliott Hughes	printf("split screwed up %d %d\n", n, NF)
5*9a7741deSElliott Hughes  delete x[1]
6*9a7741deSElliott Hughes  k = 0
7*9a7741deSElliott Hughes  for (i in x)
8*9a7741deSElliott Hughes	k++
9*9a7741deSElliott Hughes  if (k != NF-1)
10*9a7741deSElliott Hughes	printf "delete miscount %d elems should be %d at line %d\n", k, NF-1, NR
11*9a7741deSElliott Hughes}
12