On Thursday 21 April 2016 14:24:09 Timo Sirainen wrote:
On 11 Apr 2016, at 13:44, Pali Rohár pali.rohar@gmail.com wrote:
On Thursday 07 April 2016 16:11:12 Timo Sirainen wrote:
On 06 Apr 2016, at 17:29, Pali Rohár pali.rohar@gmail.com wrote:
On Monday 04 April 2016 19:35:22 Pali Rohár wrote:
On Monday 04 April 2016 19:31:06 aki.tuomi@dovecot.fi wrote:
Can you please send them directly to me, please?
Aki Tuomi
Sent.
Received? Are patches OK now?
It would be nice if each commit was accompanied with the corresponding unit test change in test-message-address.c. Now that the unit test changes are done in a separate commit I'm not really sure which test change is testing which commit or if some tests are missing. At least the "Quote and escape strings if needed" patch needs more tests for different kinds of escapes/atext/non-atext chars and =? in strings.
Ok. If you really need that I can rework my patches. But I'm thinking what to do with tests... I have written lot of examples and tests scenarios in perl for that new perl module. But dovecot test framework is not easy to use as perl Test::More/Test::Spec and such complicated tests which I have are really hard to write directory for dovecot...
Although it would be nice to have a lot of unit tests for everything, I think it would be enough to have just some to show what the change actually fixes. Maybe even just in the git commit message. I remember that by looking at the patches I didn't completely understand what all of the changes did.
Hi! Here are examples/test cases which patches fixes. Patches 3 and 4 should be self-explained... It is enough? Or do you need more detailed description about problems in parser/formatter?
PATCH 1:
struct: { { name = NULL, mailbox = "group", domain = NULL}, { name = NULL, mailbox = NULL, domain = NULL } }
should be formatted as string:
group:;
before patch it was:
group;
PATCH 2:
struct: { { name = NULL, mailbox = "", domain = NULL}, { name = NULL, mailbox = NULL, domain = NULL } }
should be formatted as string:
"":;
before patch it was:
:;
PATCH 5:
input string:
test
will be parsed as struct:
{ name = "test", mailbox = NULL, domain = NULL }
before patch it was struct:
{ name = NULL, mailbox = "test", domain = NULL }
PATCH 6:
struct: { name = "test\"test", mailbox = "user", domain = "host" }
should be formatted as string:
"test\"test" user@host
before patch it was:
test"test user@host
-- Pali Rohár pali.rohar@gmail.com