fix(cmake): Change cmake symbol to unicode triangle (#2456)

This commit is contained in:
Melroy van den Berg 2021-03-15 11:27:54 +01:00 committed by GitHub
parent 49c09d493a
commit c91b293c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -458,7 +458,7 @@ the module will be activated if any of the following conditions are met:
| Option | Default | Description |
| ------------------- | -------------------------------------- | -------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `symbol` | `" "` | The symbol used before the version of cmake. |
| `symbol` | `" "` | The symbol used before the version of cmake. |
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
| `detect_folders` | `[]` | Which folders should trigger this module |

View File

@ -17,7 +17,7 @@ impl<'a> RootModuleConfig<'a> for CMakeConfig<'a> {
fn new() -> Self {
CMakeConfig {
format: "via [$symbol($version )]($style)",
symbol: " ",
symbol: " ",
style: "bold blue",
disabled: false,
detect_extensions: vec![],

View File

@ -77,7 +77,7 @@ mod tests {
let dir = tempfile::tempdir()?;
File::create(dir.path().join("CMakeLists.txt"))?.sync_all()?;
let actual = ModuleRenderer::new("cmake").path(dir.path()).collect();
let expected = Some(format!("via {}", Color::Blue.bold().paint(" v3.17.3 ")));
let expected = Some(format!("via {}", Color::Blue.bold().paint(" v3.17.3 ")));
assert_eq!(expected, actual);
dir.close()
}
@ -87,7 +87,7 @@ mod tests {
let dir = tempfile::tempdir()?;
File::create(dir.path().join("CMakeCache.txt"))?.sync_all()?;
let actual = ModuleRenderer::new("cmake").path(dir.path()).collect();
let expected = Some(format!("via {}", Color::Blue.bold().paint(" v3.17.3 ")));
let expected = Some(format!("via {}", Color::Blue.bold().paint(" v3.17.3 ")));
assert_eq!(expected, actual);
dir.close()
}