xmldiff issueshttps://framagit.org/zoggy/xmldiff/-/issues2018-07-03T03:36:02Zhttps://framagit.org/zoggy/xmldiff/-/issues/4Failure ("Invalid rank: 2 element missing") and wrong output2018-07-03T03:36:02ZZoggyFailure ("Invalid rank: 2 element missing") and wrong output*Created by: stedolan*
There are some cases where `diff_with_final_tree` throws an exception or produced a result that doesn't match the original (I haven't dug into these much, so I don't know if they're the same bug or two independent...*Created by: stedolan*
There are some cases where `diff_with_final_tree` throws an exception or produced a result that doesn't match the original (I haven't dug into these much, so I don't know if they're the same bug or two independent issues):
```
When given the input:
[<a><c a="a">aaa<c>a</c></c></a>;
<a><b b="b">c<c c="c"><b a="c">a<a/>ba<c>aaa</c>a<c>aaaa</c>ca</b>aa</c></b></a>]
the test threw an exception:
Failure("Invalid rank: 2 element missing\npath: a(0)/c(0)/c(0){cdata->1,}")
Raised at file "pervasives.ml", line 32, characters 17-33
Called from file "xmldiff.ml", line 820, characters 34-94
Called from file "xmldiff.ml", line 835, characters 8-58
Called from file "xmldiff.ml", line 835, characters 8-58
Called from file "xmldiff.ml", line 846, characters 8-68
Called from file "xmldiff.ml", line 998, characters 28-75
Called from file "list.ml", line 96, characters 24-34
Called from file "xmldiff.ml", line 1062, characters 29-89
Called from file "test_xmldiff.ml", line 37, characters 24-62
Called from file "src/crowbar.ml", line 203, characters 16-19
When given the input:
[<a><c c="c"><c a="c">a</c><a a="a">aaaa</a></c></a>;
<a><a>ab<a b="a">a<c a="a"><a>aaaa</a></c>a</a>a</a></a>]
the test failed:
<a><a>ab<a b="a">a<c a="a"><a>aaaa</a></c>a</a>a</a></a> != <a/>
```
(I found these when playing with a [new testing library](https://github.com/stedolan/crowbar), using `xmldiff` as an [example](https://github.com/stedolan/crowbar/blob/master/examples/test_xmldiff.ml#L36-L38) because the `diff_with_final_tree` interface makes it really nice to test)