[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: extend coverage of dfa.c's match_mb_charset
From: |
Jim Meyering |
Subject: |
Re: [PATCH] tests: extend coverage of dfa.c's match_mb_charset |
Date: |
Mon, 11 Jun 2012 23:13:35 +0200 |
Paolo Bonzini wrote:
> Il 08/06/2012 08:33, Jim Meyering ha scritto:
>> Add a test case to increase test coverage of part of dfa.c (the DFA
>> matcher used by grep and gawk). While thinking about removing the few
>> remaining uses of strncpy in dfa.c, I found that none of the existing
>> tests covered the 40+ lines of code at the end of match_mb_charset,
>> so constructed this test case to demonstrate that it's not dead code
>
> Which is a bug. :) It should have been dead.
Neat. I have to admit I was surprised when I finally managed
to reach the final block. Though note that I never exercised
the intervening, guarded sub-blocks.