30 import kotlin.test.assertContentEquals |
30 import kotlin.test.assertContentEquals |
31 |
31 |
32 class CommitRefTest { |
32 class CommitRefTest { |
33 |
33 |
34 @Test |
34 @Test |
35 fun readCommitLog() { |
35 fun parseCommitRefs() { |
36 assertContentEquals( |
36 assertContentEquals( |
37 listOf( |
37 listOf( |
38 CommitRef("cf9f5982ddeb28c7f695dc547fe73abf5460016f", 50, "here we fix #50"), |
38 CommitRef("cf9f5982ddeb28c7f695dc547fe73abf5460016f", 50, "here we fix #50"), |
39 CommitRef("cf9f5982ddeb28c7f695dc547fe73abf5460016f", 30, "here we fix #50"), |
39 CommitRef("cf9f5982ddeb28c7f695dc547fe73abf5460016f", 30, "here we fix #50"), |
|
40 CommitRef("cf9f5982ddeb28c7f695dc547fe73abf5460016f", 80, "here we fix #50"), |
40 CommitRef( |
41 CommitRef( |
41 "ed7134e5f4ce278c4f62798fb9f96129be2b132b", |
42 "ed7134e5f4ce278c4f62798fb9f96129be2b132b", |
42 1337, |
43 1337, |
43 "commit with a #non-ref, relates to #wrong ref but still fixes #1337" |
44 "commit with a #non-ref, relates to #wrong ref but still closes #1337" |
44 ), |
45 ), |
45 CommitRef("74d770da3c80c0c3fc1fb7e44fb710d665127dfe", 47, "a change with commitref in body"), |
46 CommitRef("74d770da3c80c0c3fc1fb7e44fb710d665127dfe", 47, "a change with commitrefs only in body"), |
46 CommitRef("9a14e5628bdf2d578f3385d78022ddcaf23d1abb", 47, "add test file - relates to #47") |
47 CommitRef("74d770da3c80c0c3fc1fb7e44fb710d665127dfe", 13, "a change with commitrefs only in body"), |
|
48 CommitRef("9a14e5628bdf2d578f3385d78022ddcaf23d1abb", 47, "add test file - closed #47 and fixed #90"), |
|
49 CommitRef("9a14e5628bdf2d578f3385d78022ddcaf23d1abb", 90, "add test file - closed #47 and fixed #90") |
47 ), |
50 ), |
48 parseCommitRefs( |
51 parseCommitRefs(""" |
49 """::lpitref:cf9f5982ddeb28c7f695dc547fe73abf5460016f:here we fix #50 |
52 ::lpitref:cf9f5982ddeb28c7f695dc547fe73abf5460016f:here we fix #50 |
50 |
53 |
51 and close #30 |
54 and close #30 which blocked issue #80 |
52 ::lpitref:ed7134e5f4ce278c4f62798fb9f96129be2b132b:commit with a #non-ref, relates to #wrong ref but still fixes #1337 |
55 ::lpitref:ed7134e5f4ce278c4f62798fb9f96129be2b132b:commit with a #non-ref, relates to #wrong ref but still closes #1337 |
53 ::lpitref:74d770da3c80c0c3fc1fb7e44fb710d665127dfe:a change with commitref in body |
56 ::lpitref:74d770da3c80c0c3fc1fb7e44fb710d665127dfe:a change with commitrefs only in body |
54 |
57 |
55 some more details |
58 some more details |
56 fixes #47 |
59 fixes #47 and relates to #13 |
57 ::lpitref:d533c717dfecb8e4b993ca6c8760f1493bc834b6:no commitref |
60 ::lpitref:d533c717dfecb8e4b993ca6c8760f1493bc834b6:no commitref |
58 ::lpitref:9a14e5628bdf2d578f3385d78022ddcaf23d1abb:add test file - relates to #47 |
61 ::lpitref:9a14e5628bdf2d578f3385d78022ddcaf23d1abb:add test file - closed #47 and fixed #90 |
59 """ |
62 """ |
60 ) |
63 ) |
61 ) |
64 ) |
62 } |
65 } |
63 } |
66 } |