chiark / gitweb /
server/tests.at: Awk string indexing starts at 1.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 19 Jun 2013 18:58:17 +0000 (19:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 19 Jun 2013 18:58:39 +0000 (19:58 +0100)
Mawk returns a string of length n - 1 if you ask for `substr(s, 0, n)'.
This causes mismatches in the filter which is supposed to remove
spurious warnings, resulting in spurious test failures.

server/tests.at

index 1171fa221fcde53121dd8580fffe854f8153c1e6..510fd4d580194ddf0ce41479cffbdb7e019b4e91 100644 (file)
@@ -152,7 +152,7 @@ $3
        {
          for (i = 0; i < npat; i++) {
            n = length(pat[[i]]);
-           if (substr($[]0, 0, n) == pat[[i]])
+           if (substr($[]0, 1, n) == pat[[i]])
              next;
          }
          print $[]0;