mirror of
https://github.com/casey/just.git
synced 2024-11-28 22:00:18 +03:00
28 lines
431 B
Rust
28 lines
431 B
Rust
use super::*;
|
|
|
|
#[test]
|
|
fn datetime() {
|
|
Test::new()
|
|
.justfile(
|
|
"
|
|
x := datetime('%Y-%m-%d %z')
|
|
",
|
|
)
|
|
.args(["--eval", "x"])
|
|
.stdout_regex(r"\d\d\d\d-\d\d-\d\d [+-]\d\d\d\d")
|
|
.run();
|
|
}
|
|
|
|
#[test]
|
|
fn datetime_utc() {
|
|
Test::new()
|
|
.justfile(
|
|
"
|
|
x := datetime_utc('%Y-%m-%d %Z')
|
|
",
|
|
)
|
|
.args(["--eval", "x"])
|
|
.stdout_regex(r"\d\d\d\d-\d\d-\d\d UTC")
|
|
.run();
|
|
}
|