[PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:

> Cool. Then almost all the work is done to get an automated test. Next
> step would be to add the tests itself in the code. I would do that by
> adding a hidden --selfcheck option to git send-email that would compare
> Mail::Address->parse($string); and split_addrs($string); for all your
> testcases, and die if they do not match. Then calling it from the
> testsuite would be trivial.

Ok, are there such "--selfcheck" options elsewhere? If I understand it
right, you want to put the tests inside the git-send-email script. I
don't feel really good about that but I guess it's hard to test it
otherwise...  Also what will we do with the failing tests?  Just
discard them?  I think there's two sort of failing test:

 - When output provided by parse_address_ without Mail::Address
   is better or has no impact at all on the code. Such as:

    Input: "Doe, Ja"ne <jdoe@xxxxxxxxxxx>
    Split: "Doe, Ja ne" <jdoe@xxxxxxxxxxx>
    M::A : "Doe, Ja" ne <jdoe@xxxxxxxxxxx>

   This output is done on purpose. If it was the same output with
   Mail::Address, we could have avoided commit 8/9 of this serie btw.

   I think we should also test these cases.

 - When we don't really care about the output, because the user entry
   is wrong, and we just expect the script to be aborted somehow... We
   don't need to test that.

We could also add an option to specify whether we want to use
Mail::Address or not and do the tests in t9001* (but this would
take much more time).

> I can do that on top of your series if you don't have time.

Time will become a problem soon, but I think I can handle it unless
you really want to do it !
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]