mirror of
https://github.com/Llewellynvdm/starship.git
synced 2025-01-13 18:33:01 +00:00
fix: Adjust default format strings (#2165)
* fix(dotnet): update dotnet format string * fix(dotnet): update erlang format string * fix(dotnet): update golang format string * fix(dotnet): update helm format string * fix(dotnet): update julia format string * fix(dotnet): update nim format string * fix(dotnet): update ruby format string * fix(dotnet): update rust format string * test: update formatted strings in unit tests * Use suggested format strings Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com> Co-authored-by: Moritz Vetter <mv@3yourmind.com> Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
This commit is contained in:
parent
e437a463ac
commit
527ffbaede
@ -771,7 +771,7 @@ when there is a csproj file in the current directory.
|
|||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ----------- | ----------------------------------------- | -------------------------------------------------------- |
|
| ----------- | ----------------------------------------- | -------------------------------------------------------- |
|
||||||
| `format` | `"[$symbol$version( 🎯 $tfm)]($style) "` | The format for the module. |
|
| `format` | `"[$symbol($version )(🎯 $tfm )]($style)"` | The format for the module. |
|
||||||
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
|
| `symbol` | `"•NET "` | The symbol used before displaying the version of dotnet. |
|
||||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||||
| `style` | `"bold blue"` | The style for the module. |
|
| `style` | `"bold blue"` | The style for the module. |
|
||||||
@ -926,7 +926,7 @@ The module will be shown if any of the following conditions are met:
|
|||||||
| ---------- | ---------------------------------- | -------------------------------------------------------- |
|
| ---------- | ---------------------------------- | -------------------------------------------------------- |
|
||||||
| `symbol` | `" "` | The symbol used before displaying the version of erlang. |
|
| `symbol` | `" "` | The symbol used before displaying the version of erlang. |
|
||||||
| `style` | `"bold red"` | The style for the module. |
|
| `style` | `"bold red"` | The style for the module. |
|
||||||
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
| `disabled` | `false` | Disables the `erlang` module. |
|
| `disabled` | `false` | Disables the `erlang` module. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
@ -1229,7 +1229,7 @@ The module will be shown if any of the following conditions are met:
|
|||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ---------- | ---------------------------------- | ---------------------------------------------- |
|
| ---------- | ---------------------------------- | ---------------------------------------------- |
|
||||||
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
| `symbol` | `"🐹 "` | A format string representing the symbol of Go. |
|
| `symbol` | `"🐹 "` | A format string representing the symbol of Go. |
|
||||||
| `style` | `"bold cyan"` | The style for the module. |
|
| `style` | `"bold cyan"` | The style for the module. |
|
||||||
| `disabled` | `false` | Disables the `golang` module. |
|
| `disabled` | `false` | Disables the `golang` module. |
|
||||||
@ -1265,7 +1265,7 @@ The module will be shown if any of the following conditions are met:
|
|||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ---------- | ---------------------------------- | ------------------------------------------------ |
|
| ---------- | ---------------------------------- | ------------------------------------------------ |
|
||||||
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. |
|
| `symbol` | `"⎈ "` | A format string representing the symbol of Helm. |
|
||||||
| `style` | `"bold white"` | The style for the module. |
|
| `style` | `"bold white"` | The style for the module. |
|
||||||
| `disabled` | `false` | Disables the `helm` module. |
|
| `disabled` | `false` | Disables the `helm` module. |
|
||||||
@ -1410,7 +1410,7 @@ The module will be shown if any of the following conditions are met:
|
|||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ---------- | ---------------------------------- | ------------------------------------------------- |
|
| ---------- | ---------------------------------- | ------------------------------------------------- |
|
||||||
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. |
|
| `symbol` | `"ஃ "` | A format string representing the symbol of Julia. |
|
||||||
| `style` | `"bold purple"` | The style for the module. |
|
| `style` | `"bold purple"` | The style for the module. |
|
||||||
| `disabled` | `false` | Disables the `julia` module. |
|
| `disabled` | `false` | Disables the `julia` module. |
|
||||||
@ -1681,7 +1681,7 @@ The module will be shown if any of the following conditions are met:
|
|||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ---------- | ---------------------------------- | ----------------------------------------------------- |
|
| ---------- | ---------------------------------- | ----------------------------------------------------- |
|
||||||
| `format` | `"via [$symbol$version]($style) "` | The format for the module |
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module |
|
||||||
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
|
| `symbol` | `"👑 "` | The symbol used before displaying the version of Nim. |
|
||||||
| `style` | `"bold yellow"` | The style for the module. |
|
| `style` | `"bold yellow"` | The style for the module. |
|
||||||
| `disabled` | `false` | Disables the `nim` module. |
|
| `disabled` | `false` | Disables the `nim` module. |
|
||||||
@ -2119,7 +2119,7 @@ The module will be shown if any of the following conditions are met:
|
|||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ---------- | ---------------------------------- | ------------------------------------------------ |
|
| ---------- | ---------------------------------- | ------------------------------------------------ |
|
||||||
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
| `symbol` | `"💎 "` | A format string representing the symbol of Ruby. |
|
||||||
| `style` | `"bold red"` | The style for the module. |
|
| `style` | `"bold red"` | The style for the module. |
|
||||||
| `disabled` | `false` | Disables the `ruby` module. |
|
| `disabled` | `false` | Disables the `ruby` module. |
|
||||||
@ -2155,7 +2155,7 @@ The module will be shown if any of the following conditions are met:
|
|||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ---------- | ---------------------------------- | ----------------------------------------------- |
|
| ---------- | ---------------------------------- | ----------------------------------------------- |
|
||||||
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
| `symbol` | `"🦀 "` | A format string representing the symbol of Rust |
|
||||||
| `style` | `"bold red"` | The style for the module. |
|
| `style` | `"bold red"` | The style for the module. |
|
||||||
| `disabled` | `false` | Disables the `rust` module. |
|
| `disabled` | `false` | Disables the `rust` module. |
|
||||||
|
@ -14,7 +14,7 @@ pub struct DotnetConfig<'a> {
|
|||||||
impl<'a> RootModuleConfig<'a> for DotnetConfig<'a> {
|
impl<'a> RootModuleConfig<'a> for DotnetConfig<'a> {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
DotnetConfig {
|
DotnetConfig {
|
||||||
format: "[$symbol$version( 🎯 $tfm)]($style) ",
|
format: "[$symbol($version )(🎯 $tfm )]($style)",
|
||||||
symbol: "•NET ",
|
symbol: "•NET ",
|
||||||
style: "blue bold",
|
style: "blue bold",
|
||||||
heuristic: true,
|
heuristic: true,
|
||||||
|
@ -13,7 +13,7 @@ pub struct ErlangConfig<'a> {
|
|||||||
impl<'a> RootModuleConfig<'a> for ErlangConfig<'a> {
|
impl<'a> RootModuleConfig<'a> for ErlangConfig<'a> {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
ErlangConfig {
|
ErlangConfig {
|
||||||
format: "via [$symbol$version]($style) ",
|
format: "via [$symbol($version )]($style)",
|
||||||
symbol: " ",
|
symbol: " ",
|
||||||
style: "bold red",
|
style: "bold red",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
@ -13,7 +13,7 @@ pub struct GoConfig<'a> {
|
|||||||
impl<'a> RootModuleConfig<'a> for GoConfig<'a> {
|
impl<'a> RootModuleConfig<'a> for GoConfig<'a> {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
GoConfig {
|
GoConfig {
|
||||||
format: "via [$symbol$version]($style) ",
|
format: "via [$symbol($version )]($style)",
|
||||||
symbol: "🐹 ",
|
symbol: "🐹 ",
|
||||||
style: "bold cyan",
|
style: "bold cyan",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
@ -13,7 +13,7 @@ pub struct HelmConfig<'a> {
|
|||||||
impl<'a> RootModuleConfig<'a> for HelmConfig<'a> {
|
impl<'a> RootModuleConfig<'a> for HelmConfig<'a> {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
HelmConfig {
|
HelmConfig {
|
||||||
format: "via [$symbol$version]($style) ",
|
format: "via [$symbol($version )]($style)",
|
||||||
symbol: "⎈ ",
|
symbol: "⎈ ",
|
||||||
style: "bold white",
|
style: "bold white",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
@ -13,7 +13,7 @@ pub struct JuliaConfig<'a> {
|
|||||||
impl<'a> RootModuleConfig<'a> for JuliaConfig<'a> {
|
impl<'a> RootModuleConfig<'a> for JuliaConfig<'a> {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
JuliaConfig {
|
JuliaConfig {
|
||||||
format: "via [$symbol$version]($style) ",
|
format: "via [$symbol($version )]($style)",
|
||||||
symbol: "ஃ ",
|
symbol: "ஃ ",
|
||||||
style: "bold purple",
|
style: "bold purple",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
@ -13,7 +13,7 @@ pub struct NimConfig<'a> {
|
|||||||
impl<'a> RootModuleConfig<'a> for NimConfig<'a> {
|
impl<'a> RootModuleConfig<'a> for NimConfig<'a> {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
NimConfig {
|
NimConfig {
|
||||||
format: "via [$symbol$version]($style) ",
|
format: "via [$symbol($version )]($style)",
|
||||||
symbol: "👑 ",
|
symbol: "👑 ",
|
||||||
style: "yellow bold",
|
style: "yellow bold",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
@ -13,7 +13,7 @@ pub struct RubyConfig<'a> {
|
|||||||
impl<'a> RootModuleConfig<'a> for RubyConfig<'a> {
|
impl<'a> RootModuleConfig<'a> for RubyConfig<'a> {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
RubyConfig {
|
RubyConfig {
|
||||||
format: "via [$symbol$version]($style) ",
|
format: "via [$symbol($version )]($style)",
|
||||||
symbol: "💎 ",
|
symbol: "💎 ",
|
||||||
style: "bold red",
|
style: "bold red",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
@ -13,7 +13,7 @@ pub struct RustConfig<'a> {
|
|||||||
impl<'a> RootModuleConfig<'a> for RustConfig<'a> {
|
impl<'a> RootModuleConfig<'a> for RustConfig<'a> {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
RustConfig {
|
RustConfig {
|
||||||
format: "via [$symbol$version]($style) ",
|
format: "via [$symbol($version )]($style)",
|
||||||
symbol: "🦀 ",
|
symbol: "🦀 ",
|
||||||
style: "bold red",
|
style: "bold red",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
@ -376,7 +376,7 @@ mod tests {
|
|||||||
touch_path(&workspace, "Directory.Build.props", None)?;
|
touch_path(&workspace, "Directory.Build.props", None)?;
|
||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path(),
|
&workspace.path(),
|
||||||
Some(format!("{} ", Color::Blue.bold().paint("•NET v3.1.103"))),
|
Some(format!("{}", Color::Blue.bold().paint("•NET v3.1.103 "))),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
}
|
}
|
||||||
@ -387,7 +387,7 @@ mod tests {
|
|||||||
touch_path(&workspace, "Directory.Build.targets", None)?;
|
touch_path(&workspace, "Directory.Build.targets", None)?;
|
||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path(),
|
&workspace.path(),
|
||||||
Some(format!("{} ", Color::Blue.bold().paint("•NET v3.1.103"))),
|
Some(format!("{}", Color::Blue.bold().paint("•NET v3.1.103 "))),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
}
|
}
|
||||||
@ -398,7 +398,7 @@ mod tests {
|
|||||||
touch_path(&workspace, "Packages.props", None)?;
|
touch_path(&workspace, "Packages.props", None)?;
|
||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path(),
|
&workspace.path(),
|
||||||
Some(format!("{} ", Color::Blue.bold().paint("•NET v3.1.103"))),
|
Some(format!("{}", Color::Blue.bold().paint("•NET v3.1.103 "))),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
}
|
}
|
||||||
@ -409,7 +409,7 @@ mod tests {
|
|||||||
touch_path(&workspace, "solution.sln", None)?;
|
touch_path(&workspace, "solution.sln", None)?;
|
||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path(),
|
&workspace.path(),
|
||||||
Some(format!("{} ", Color::Blue.bold().paint("•NET v3.1.103"))),
|
Some(format!("{}", Color::Blue.bold().paint("•NET v3.1.103 "))),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
}
|
}
|
||||||
@ -422,8 +422,8 @@ mod tests {
|
|||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path(),
|
&workspace.path(),
|
||||||
Some(format!(
|
Some(format!(
|
||||||
"{} ",
|
"{}",
|
||||||
Color::Blue.bold().paint("•NET v3.1.103 🎯 netstandard2.0")
|
Color::Blue.bold().paint("•NET v3.1.103 🎯 netstandard2.0 ")
|
||||||
)),
|
)),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
@ -435,7 +435,7 @@ mod tests {
|
|||||||
touch_path(&workspace, "project.fsproj", None)?;
|
touch_path(&workspace, "project.fsproj", None)?;
|
||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path(),
|
&workspace.path(),
|
||||||
Some(format!("{} ", Color::Blue.bold().paint("•NET v3.1.103"))),
|
Some(format!("{}", Color::Blue.bold().paint("•NET v3.1.103 "))),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
}
|
}
|
||||||
@ -446,7 +446,7 @@ mod tests {
|
|||||||
touch_path(&workspace, "project.xproj", None)?;
|
touch_path(&workspace, "project.xproj", None)?;
|
||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path(),
|
&workspace.path(),
|
||||||
Some(format!("{} ", Color::Blue.bold().paint("•NET v3.1.103"))),
|
Some(format!("{}", Color::Blue.bold().paint("•NET v3.1.103 "))),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
}
|
}
|
||||||
@ -457,7 +457,7 @@ mod tests {
|
|||||||
touch_path(&workspace, "project.json", None)?;
|
touch_path(&workspace, "project.json", None)?;
|
||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path(),
|
&workspace.path(),
|
||||||
Some(format!("{} ", Color::Blue.bold().paint("•NET v3.1.103"))),
|
Some(format!("{}", Color::Blue.bold().paint("•NET v3.1.103 "))),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
}
|
}
|
||||||
@ -469,7 +469,7 @@ mod tests {
|
|||||||
touch_path(&workspace, "global.json", Some(&global_json))?;
|
touch_path(&workspace, "global.json", Some(&global_json))?;
|
||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path(),
|
&workspace.path(),
|
||||||
Some(format!("{} ", Color::Blue.bold().paint("•NET v1.2.3"))),
|
Some(format!("{}", Color::Blue.bold().paint("•NET v1.2.3 "))),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
}
|
}
|
||||||
@ -484,8 +484,8 @@ mod tests {
|
|||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path().join("project"),
|
&workspace.path().join("project"),
|
||||||
Some(format!(
|
Some(format!(
|
||||||
"{} ",
|
"{}",
|
||||||
Color::Blue.bold().paint("•NET v1.2.3 🎯 netstandard2.0")
|
Color::Blue.bold().paint("•NET v1.2.3 🎯 netstandard2.0 ")
|
||||||
)),
|
)),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
@ -505,8 +505,8 @@ mod tests {
|
|||||||
expect_output(
|
expect_output(
|
||||||
&workspace.path().join("deep/path/to/project"),
|
&workspace.path().join("deep/path/to/project"),
|
||||||
Some(format!(
|
Some(format!(
|
||||||
"{} ",
|
"{}",
|
||||||
Color::Blue.bold().paint("•NET v1.2.3 🎯 netstandard2.0")
|
Color::Blue.bold().paint("•NET v1.2.3 🎯 netstandard2.0 ")
|
||||||
)),
|
)),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
@ -520,8 +520,8 @@ mod tests {
|
|||||||
expect_output(
|
expect_output(
|
||||||
workspace.path(),
|
workspace.path(),
|
||||||
Some(format!(
|
Some(format!(
|
||||||
"{} ",
|
"{}",
|
||||||
Color::Blue.bold().paint("•NET v3.1.103 🎯 netstandard2.0")
|
Color::Blue.bold().paint("•NET v3.1.103 🎯 netstandard2.0 ")
|
||||||
)),
|
)),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
@ -535,10 +535,10 @@ mod tests {
|
|||||||
expect_output(
|
expect_output(
|
||||||
workspace.path(),
|
workspace.path(),
|
||||||
Some(format!(
|
Some(format!(
|
||||||
"{} ",
|
"{}",
|
||||||
Color::Blue
|
Color::Blue
|
||||||
.bold()
|
.bold()
|
||||||
.paint("•NET v3.1.103 🎯 netstandard2.0;net461")
|
.paint("•NET v3.1.103 🎯 netstandard2.0;net461 ")
|
||||||
)),
|
)),
|
||||||
)?;
|
)?;
|
||||||
workspace.close()
|
workspace.close()
|
||||||
|
@ -89,7 +89,7 @@ mod tests {
|
|||||||
let dir = tempfile::tempdir()?;
|
let dir = tempfile::tempdir()?;
|
||||||
File::create(dir.path().join("rebar.config"))?.sync_all()?;
|
File::create(dir.path().join("rebar.config"))?.sync_all()?;
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Red.bold().paint(" 22.1.3")));
|
let expected = Some(format!("via {}", Color::Red.bold().paint(" 22.1.3 ")));
|
||||||
let output = ModuleRenderer::new("erlang").path(dir.path()).collect();
|
let output = ModuleRenderer::new("erlang").path(dir.path()).collect();
|
||||||
|
|
||||||
assert_eq!(output, expected);
|
assert_eq!(output, expected);
|
||||||
|
@ -109,7 +109,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Cyan.bold().paint("🐹 v1.12.1")));
|
let expected = Some(format!("via {}", Color::Cyan.bold().paint("🐹 v1.12.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Cyan.bold().paint("🐹 v1.12.1")));
|
let expected = Some(format!("via {}", Color::Cyan.bold().paint("🐹 v1.12.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Cyan.bold().paint("🐹 v1.12.1")));
|
let expected = Some(format!("via {}", Color::Cyan.bold().paint("🐹 v1.12.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Cyan.bold().paint("🐹 v1.12.1")));
|
let expected = Some(format!("via {}", Color::Cyan.bold().paint("🐹 v1.12.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -158,7 +158,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Cyan.bold().paint("🐹 v1.12.1")));
|
let expected = Some(format!("via {}", Color::Cyan.bold().paint("🐹 v1.12.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -170,7 +170,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Cyan.bold().paint("🐹 v1.12.1")));
|
let expected = Some(format!("via {}", Color::Cyan.bold().paint("🐹 v1.12.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -180,7 +180,7 @@ mod tests {
|
|||||||
File::create(dir.path().join("Gopkg.lock"))?.sync_all()?;
|
File::create(dir.path().join("Gopkg.lock"))?.sync_all()?;
|
||||||
|
|
||||||
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
||||||
let expected = Some(format!("via {} ", Color::Cyan.bold().paint("🐹 v1.12.1")));
|
let expected = Some(format!("via {}", Color::Cyan.bold().paint("🐹 v1.12.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ mod tests {
|
|||||||
File::create(dir.path().join(".go-version"))?.sync_all()?;
|
File::create(dir.path().join(".go-version"))?.sync_all()?;
|
||||||
|
|
||||||
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("golang").path(dir.path()).collect();
|
||||||
let expected = Some(format!("via {} ", Color::Cyan.bold().paint("🐹 v1.12.1")));
|
let expected = Some(format!("via {}", Color::Cyan.bold().paint("🐹 v1.12.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("helm").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("helm").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::White.bold().paint("⎈ v3.1.1")));
|
let expected = Some(format!("via {}", Color::White.bold().paint("⎈ v3.1.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("helm").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("helm").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::White.bold().paint("⎈ v3.1.1")));
|
let expected = Some(format!("via {}", Color::White.bold().paint("⎈ v3.1.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("julia").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("julia").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Purple.bold().paint("ஃ v1.4.0")));
|
let expected = Some(format!("via {}", Color::Purple.bold().paint("ஃ v1.4.0 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("julia").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("julia").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Purple.bold().paint("ஃ v1.4.0")));
|
let expected = Some(format!("via {}", Color::Purple.bold().paint("ஃ v1.4.0 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("julia").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("julia").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Purple.bold().paint("ஃ v1.4.0")));
|
let expected = Some(format!("via {}", Color::Purple.bold().paint("ஃ v1.4.0 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ mod tests {
|
|||||||
let dir = tempfile::tempdir()?;
|
let dir = tempfile::tempdir()?;
|
||||||
File::create(dir.path().join("main.nimble"))?.sync_all()?;
|
File::create(dir.path().join("main.nimble"))?.sync_all()?;
|
||||||
let actual = ModuleRenderer::new("nim").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("nim").path(dir.path()).collect();
|
||||||
let expected = Some(format!("via {} ", Color::Yellow.bold().paint("👑 v1.2.0")));
|
let expected = Some(format!("via {}", Color::Yellow.bold().paint("👑 v1.2.0 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ mod tests {
|
|||||||
let dir = tempfile::tempdir()?;
|
let dir = tempfile::tempdir()?;
|
||||||
File::create(dir.path().join("main.nim"))?.sync_all()?;
|
File::create(dir.path().join("main.nim"))?.sync_all()?;
|
||||||
let actual = ModuleRenderer::new("nim").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("nim").path(dir.path()).collect();
|
||||||
let expected = Some(format!("via {} ", Color::Yellow.bold().paint("👑 v1.2.0")));
|
let expected = Some(format!("via {}", Color::Yellow.bold().paint("👑 v1.2.0 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -131,7 +131,7 @@ mod tests {
|
|||||||
let dir = tempfile::tempdir()?;
|
let dir = tempfile::tempdir()?;
|
||||||
File::create(dir.path().join("main.nims"))?.sync_all()?;
|
File::create(dir.path().join("main.nims"))?.sync_all()?;
|
||||||
let actual = ModuleRenderer::new("nim").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("nim").path(dir.path()).collect();
|
||||||
let expected = Some(format!("via {} ", Color::Yellow.bold().paint("👑 v1.2.0")));
|
let expected = Some(format!("via {}", Color::Yellow.bold().paint("👑 v1.2.0 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ mod tests {
|
|||||||
let dir = tempfile::tempdir()?;
|
let dir = tempfile::tempdir()?;
|
||||||
File::create(dir.path().join("cfg.nim"))?.sync_all()?;
|
File::create(dir.path().join("cfg.nim"))?.sync_all()?;
|
||||||
let actual = ModuleRenderer::new("nim").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("nim").path(dir.path()).collect();
|
||||||
let expected = Some(format!("via {} ", Color::Yellow.bold().paint("👑 v1.2.0")));
|
let expected = Some(format!("via {}", Color::Yellow.bold().paint("👑 v1.2.0 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("ruby").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("ruby").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Red.bold().paint("💎 v2.5.1")));
|
let expected = Some(format!("via {}", Color::Red.bold().paint("💎 v2.5.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("ruby").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("ruby").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Red.bold().paint("💎 v2.5.1")));
|
let expected = Some(format!("via {}", Color::Red.bold().paint("💎 v2.5.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ mod tests {
|
|||||||
|
|
||||||
let actual = ModuleRenderer::new("ruby").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("ruby").path(dir.path()).collect();
|
||||||
|
|
||||||
let expected = Some(format!("via {} ", Color::Red.bold().paint("💎 v2.5.1")));
|
let expected = Some(format!("via {}", Color::Red.bold().paint("💎 v2.5.1 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user