From b76d984e0bc15440443022aa9facfbab8b976e08 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Sat, 11 Dec 2010 16:20:57 +0100 Subject: [PATCH] Added more person parsing tests. --- tests/t0401-parse.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/t0401-parse.c b/tests/t0401-parse.c index f5dcd1dc1..5d3246321 100644 --- a/tests/t0401-parse.c +++ b/tests/t0401-parse.c @@ -195,6 +195,38 @@ BEGIN_TEST(parse_person_test) 12345, 0); + TEST_PERSON_PASS( + "committer Vicent Marti 123456 +0000 \n", + "committer ", + "Vicent Marti", + "tanoku@gmail.com", + 123456, + 0); + + TEST_PERSON_PASS( + "committer Vicent Marti 123456 +0100 \n", + "committer ", + "Vicent Marti", + "tanoku@gmail.com", + 123456, + 60); + + TEST_PERSON_PASS( + "committer Vicent Marti 123456 -0100 \n", + "committer ", + "Vicent Marti", + "tanoku@gmail.com", + 123456, + -60); + + TEST_PERSON_FAIL( + "committer Vicent Marti 123456 -1500 \n", + "committer "); + + TEST_PERSON_FAIL( + "committer Vicent Marti 123456 +0163 \n", + "committer "); + TEST_PERSON_FAIL( "author Vicent Marti 12345 \n", "author ");