diff options
author | Vadim Markovtsev <vadim@sourced.tech> | 2019-02-11 21:13:44 +0100 |
---|---|---|
committer | Vadim Markovtsev <vadim@sourced.tech> | 2019-02-11 22:57:16 +0100 |
commit | c40fcefddec1d07fb5a06c2173b409f37f7409d1 (patch) | |
tree | 18a8e6da1502054fe49509f4e342398c06f82a95 /utils/merkletrie/difftree_test.go | |
parent | cd64b4d630b6c2d2b3d72e9615e14f9d58bb5787 (diff) | |
download | go-git-c40fcefddec1d07fb5a06c2173b409f37f7409d1.tar.gz |
Remove Unicode normalization in difftree
Fixes #1057
Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
Diffstat (limited to 'utils/merkletrie/difftree_test.go')
-rw-r--r-- | utils/merkletrie/difftree_test.go | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/utils/merkletrie/difftree_test.go b/utils/merkletrie/difftree_test.go index ab0eb57..ac86145 100644 --- a/utils/merkletrie/difftree_test.go +++ b/utils/merkletrie/difftree_test.go @@ -475,8 +475,29 @@ func (s *DiffTreeSuite) TestIssue275(c *C) { }) } +func (s *DiffTreeSuite) TestIssue1057(c *C) { + p1 := "TestAppWithUnicodéPath" + p2 := "TestAppWithUnicodéPath" + c.Assert(p1 == p2, Equals, false) + do(c, []diffTreeTest{ + { + fmt.Sprintf("(%s(x.go<1>))", p1), + fmt.Sprintf("(%s(x.go<1>) %s(x.go<1>))", p1, p2), + fmt.Sprintf("+%s/x.go", p2), + }, + }) + // swap p1 with p2 + do(c, []diffTreeTest{ + { + fmt.Sprintf("(%s(x.go<1>))", p2), + fmt.Sprintf("(%s(x.go<1>) %s(x.go<1>))", p1, p2), + fmt.Sprintf("+%s/x.go", p1), + }, + }) +} + func (s *DiffTreeSuite) TestCancel(c *C) { - t := diffTreeTest{"()", "(a<> b<1> c() d<> e<2> f())", "+a +b +d +e"} + t := diffTreeTest{"()", "(a<> b<1> c() d<> e<2> f())", "+a +b +d +e"} comment := Commentf("\n%s", "test cancel:") a, err := fsnoder.New(t.from) |