diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2019-02-14 12:35:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-14 12:35:30 +0100 |
commit | db6c41c156481962abf9a55a324858674c25ab08 (patch) | |
tree | 6f1b155a059fd9f623473d61305a81ab5efa596b /utils/merkletrie/difftree_test.go | |
parent | 4d8bd13a73d6efd41b6be0b2eba5130c498fae0d (diff) | |
parent | c40fcefddec1d07fb5a06c2173b409f37f7409d1 (diff) | |
download | go-git-db6c41c156481962abf9a55a324858674c25ab08.tar.gz |
Merge pull request #1065 from vmarkovtsev/fix-unicodev4.10.0
Remove Unicode normalization in difftree
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) |