-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TestNearest doesn't work with Rust tests organized in nested modules #708
Comments
EDIT: The below actually doesn't work with the cursor in the #[cfg(test)]
mod tests {
mod my_module_tests {
// Put cursor on this empty line & it works <---
#[test]
fn fail() {
assert!(false);
}
}
} I found out it works if
#[cfg(test)]
mod tests {
mod my_module_tests {
#[test]
fn fail() {
assert!(false);
}
}
} With the cursor inside
|
I don't know much vimscript, so this is as far as I can go, but looking at vim-test it looks like this is intended to work. I see at least with nextest its intended to find the nearest vim-test/autoload/test/rust/cargonextest.vim Lines 6 to 9 in ca25025
|
I found the command this plugin ran to run tests is output in the statusbar of my nvim window. I tested this out while I was editing a module named I get these outputs with
You can see |
Thank you for looking into and reporting this. Could you please create a pull request that adds examples to the spec and fixtures and then hopefully or a volunteer can fix those failing tests. |
I'll take a look and try it out. First time though, no promises. |
This might be by design, but when organizing rust tests using nested modules, TestNearest doesn't work.
With the cursor inside
fail
and running:TestNearest
, I get:The text was updated successfully, but these errors were encountered: