# Add more unit tests for Rope \(\#39426\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/5b0a2f1ab66aec068a837e4d66612ba92b59a29c)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 5b0a2f1ab66aec068a837e4d66612ba92b59a29c

Requested commit: 5b0a2f1ab66aec068a837e4d66612ba92b59a29c

Commit: 5b0a2f1ab66aec068a837e4d66612ba92b59a29c

Tree: 4d0ffa43f90c68196804ddb085ecff922e172b90

Author: Martin Pool

Committer: GitHub

## Message

```
Add more unit tests for Rope (#39426)

I was looking at the rope implementation and some of the existing bugs
that crash in there, and I ran cargo-mutants to inspect test coverage. I
was motivated by bugs like
https://github.com/zed-industries/zed/issues/38556 but this doesn't fix
it and the bug may well be at a higher layer.

This PR adds coverage for a few functions that aren't tested today. I
didn't find any actual bugs yet.

I can see this tree is pretty sparse on docstrings so if you think these
are too verbose I can take them out or drop the whole PR.

Release Notes:

- N/A
```

## Parents

- [d5a48901425001d587919df7eee09a8dc3589bd8](https://git.cafe/gitcafe/zed/commit/d5a48901425001d587919df7eee09a8dc3589bd8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/5b0a2f1ab66aec068a837e4d66612ba92b59a29c?format=markdown)
