nvim-neotest / neotest

An extensible framework for interacting with tests within NeoVim.
MIT License
2.26k stars 110 forks source link

Incorrect tree hierarchy when a directory and file have the same name #62

Closed Bahex closed 2 years ago

Bahex commented 2 years ago

When a file and a directory within the same directory have the same name(excluding the file's extension) neotest flattens the tree.

With this file tree:

src
├── mod_a
│   ├── mod_b
│   │   └── mod_c.rs
│   └── mod_b.rs
└── mod_a.rs

Summary window looks like this:

╰╮  src
 ├─  mod_a
 ├─  mod_a.rs
 ├─  mod_b
 ├─  mod_b.rs
 ╰─  mod_c.rs

When it should look like this:

╰╮ src
 ├╮ mod_a
 │├╮ mod_b
 ││╰─ mod_c.rs
 │╰─ mod_b.rs
 ╰─ mod_a.rs

The issue isn't just in the summary window, return values of :parent() nodes also have the same flattened structure.

rcarriga commented 2 years ago

Thanks for the report! This should now be working in latest master :smile:

Bahex commented 2 years ago

Works as expected 👍 thank you!