cargo-mode
cargo-mode copied to clipboard
Use fully qualified module name when running cargo-mode-test-current-buffer
In my situation, I have a test module in my module
// abc.rs
#[cfg(test)]
mod tests {
...
}
If I call cargo-mde-test-current-buffer with cursor inside tests module, the generated command is cargo test tests, instead of cargo test abc or cargo test abc::tests
@sunng87 hello. sorry for a late reply. I think it shouldn't be hard to implement this feature. since we already have cargo-mode--current-mod function which returns the current module
I think the problem is cargo-mode--current-mode function always returns tests for these test module, and returns nil when the cursor is in a normal code module.