rust: Add runnable icon for #[cfg(test)] mod tests
(#12017)
This allows you to run all the tests inside the `mod tests` block. Fixes #11967. <img width="366" alt="Screenshot 2024-05-18 at 16 07 32" src="https://github.com/zed-industries/zed/assets/62463826/01fc378c-1546-421d-8250-fe0227c1e5a0"> <img width="874" alt="Screenshot 2024-05-18 at 16 37 21" src="https://github.com/zed-industries/zed/assets/62463826/4a880b91-df84-4917-a16e-5d5fe20e22ac"> Release Notes: - Added runnable icon for Rust `#[cfg(test)] mod tests` blocks ([#11967](https://github.com/zed-industries/zed/issues/11967)).
This commit is contained in:
parent
2177ee8cc0
commit
1e5389a2be
6 changed files with 48 additions and 3 deletions
|
@ -124,6 +124,10 @@ impl ResolvedTask {
|
|||
pub enum VariableName {
|
||||
/// An absolute path of the currently opened file.
|
||||
File,
|
||||
/// the currently opened filename.
|
||||
Filename,
|
||||
/// stem (filename without extension) of the currently opened file.
|
||||
Stem,
|
||||
/// An absolute path of the currently opened worktree, that contains the file.
|
||||
WorktreeRoot,
|
||||
/// A symbol text, that contains latest cursor/selection position.
|
||||
|
@ -160,6 +164,8 @@ impl std::fmt::Display for VariableName {
|
|||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::File => write!(f, "{ZED_VARIABLE_NAME_PREFIX}FILE"),
|
||||
Self::Filename => write!(f, "{ZED_VARIABLE_NAME_PREFIX}FILENAME"),
|
||||
Self::Stem => write!(f, "{ZED_VARIABLE_NAME_PREFIX}STEM"),
|
||||
Self::WorktreeRoot => write!(f, "{ZED_VARIABLE_NAME_PREFIX}WORKTREE_ROOT"),
|
||||
Self::Symbol => write!(f, "{ZED_VARIABLE_NAME_PREFIX}SYMBOL"),
|
||||
Self::Row => write!(f, "{ZED_VARIABLE_NAME_PREFIX}ROW"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue