mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
Due to incompatibilities with the macOS date utility, we are temporarily reverting this feature. Refs: #c5e971a
This commit is contained in:
@@ -6,11 +6,11 @@ use crate::common::{self, TestCommand};
|
||||
#[test]
|
||||
fn config_blank_duration_1s() -> io::Result<()> {
|
||||
let output = common::render_module("cmd_duration")
|
||||
.arg("--cmd-duration=1000000000")
|
||||
.arg("--cmd-duration=1")
|
||||
.output()?;
|
||||
let actual = String::from_utf8(output.stdout).unwrap();
|
||||
|
||||
let expected = format!("{} ", Color::RGB(80, 80, 80).bold().paint("took 1s"));
|
||||
let expected = "";
|
||||
assert_eq!(expected, actual);
|
||||
Ok(())
|
||||
}
|
||||
@@ -18,7 +18,7 @@ fn config_blank_duration_1s() -> io::Result<()> {
|
||||
#[test]
|
||||
fn config_blank_duration_5s() -> io::Result<()> {
|
||||
let output = common::render_module("cmd_duration")
|
||||
.arg("--cmd-duration=5000000000")
|
||||
.arg("--cmd-duration=5")
|
||||
.output()?;
|
||||
let actual = String::from_utf8(output.stdout).unwrap();
|
||||
|
||||
@@ -32,13 +32,13 @@ fn config_5s_duration_3s() -> io::Result<()> {
|
||||
let output = common::render_module("cmd_duration")
|
||||
.use_config(toml::toml! {
|
||||
[cmd_duration]
|
||||
min_time = 5000
|
||||
min_time = 5
|
||||
})
|
||||
.arg("--cmd-duration=3000000000")
|
||||
.arg("--cmd-duration=3")
|
||||
.output()?;
|
||||
let actual = String::from_utf8(output.stdout).unwrap();
|
||||
|
||||
let expected = format!("{} ", Color::RGB(80, 80, 80).bold().paint("took 3s"));
|
||||
let expected = "";
|
||||
assert_eq!(expected, actual);
|
||||
Ok(())
|
||||
}
|
||||
@@ -48,9 +48,9 @@ fn config_5s_duration_10s() -> io::Result<()> {
|
||||
let output = common::render_module("cmd_duration")
|
||||
.use_config(toml::toml! {
|
||||
[cmd_duration]
|
||||
min_time = 5000
|
||||
min_time = 5
|
||||
})
|
||||
.arg("--cmd-duration=10000000000")
|
||||
.arg("--cmd-duration=10")
|
||||
.output()?;
|
||||
let actual = String::from_utf8(output.stdout).unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user