Added more person parsing tests.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
diff --git a/tests/t0401-parse.c b/tests/t0401-parse.c
index f5dcd1d..5d32463 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 <tanoku@gmail.com> 123456 +0000 \n",
+ "committer ",
+ "Vicent Marti",
+ "tanoku@gmail.com",
+ 123456,
+ 0);
+
+ TEST_PERSON_PASS(
+ "committer Vicent Marti <tanoku@gmail.com> 123456 +0100 \n",
+ "committer ",
+ "Vicent Marti",
+ "tanoku@gmail.com",
+ 123456,
+ 60);
+
+ TEST_PERSON_PASS(
+ "committer Vicent Marti <tanoku@gmail.com> 123456 -0100 \n",
+ "committer ",
+ "Vicent Marti",
+ "tanoku@gmail.com",
+ 123456,
+ -60);
+
+ TEST_PERSON_FAIL(
+ "committer Vicent Marti <tanoku@gmail.com> 123456 -1500 \n",
+ "committer ");
+
+ TEST_PERSON_FAIL(
+ "committer Vicent Marti <tanoku@gmail.com> 123456 +0163 \n",
+ "committer ");
+
TEST_PERSON_FAIL(
"author Vicent Marti <tanoku@gmail.com> 12345 \n",
"author ");