2024-05-29 06:31:55 +03:00
|
|
|
use super::*;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn print_timestamps() {
|
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
"
|
|
|
|
recipe:
|
|
|
|
echo 'one'
|
|
|
|
",
|
|
|
|
)
|
2024-05-29 12:28:45 +03:00
|
|
|
.arg("--timestamp")
|
2024-05-29 06:31:55 +03:00
|
|
|
.stderr_regex(concat!(r"\[\d\d:\d\d:\d\d\] echo 'one'", "\n"))
|
|
|
|
.stdout("one\n")
|
|
|
|
.run();
|
|
|
|
}
|
2024-05-29 12:28:45 +03:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn print_timestamps_with_format_string() {
|
|
|
|
Test::new()
|
|
|
|
.justfile(
|
|
|
|
"
|
|
|
|
recipe:
|
|
|
|
echo 'one'
|
|
|
|
",
|
|
|
|
)
|
|
|
|
.args(["--timestamp", "--timestamp-format", "%H:%M:%S.%3f"])
|
|
|
|
.stderr_regex(concat!(r"\[\d\d:\d\d:\d\d\.\d\d\d] echo 'one'", "\n"))
|
|
|
|
.stdout("one\n")
|
|
|
|
.run();
|
|
|
|
}
|