- Fix unused imports in unit tests - Add accidently remove module "battery"
This commit is contained in:
parent
54793c7d5a
commit
37b5168bfe
|
@ -1,5 +1,4 @@
|
||||||
use ansi_term::Color;
|
use ansi_term::Color;
|
||||||
use chrono::offset::TimeZone;
|
|
||||||
use chrono::{DateTime, Local};
|
use chrono::{DateTime, Local};
|
||||||
|
|
||||||
use super::{Context, Module};
|
use super::{Context, Module};
|
||||||
|
@ -51,6 +50,7 @@ tests become extra important */
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use chrono::offset::TimeZone;
|
||||||
|
|
||||||
const FMT_12: &str = "%r";
|
const FMT_12: &str = "%r";
|
||||||
const FMT_24: &str = "%T";
|
const FMT_24: &str = "%T";
|
||||||
|
@ -97,6 +97,7 @@ mod tests {
|
||||||
assert_eq!(formatted, "15:36:47");
|
assert_eq!(formatted, "15:36:47");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
fn test_format_with_paren() {
|
fn test_format_with_paren() {
|
||||||
let time = Local.ymd(2014, 7, 8).and_hms(15, 36, 47);
|
let time = Local.ymd(2014, 7, 8).and_hms(15, 36, 47);
|
||||||
let formatted = format_time("[%T]", time);
|
let formatted = format_time("[%T]", time);
|
||||||
|
|
|
@ -29,6 +29,7 @@ const DEFAULT_PROMPT_ORDER: &[&str] = &[
|
||||||
"line_break",
|
"line_break",
|
||||||
"jobs",
|
"jobs",
|
||||||
#[cfg(feature = "battery")]
|
#[cfg(feature = "battery")]
|
||||||
|
"battery",
|
||||||
"time",
|
"time",
|
||||||
"character",
|
"character",
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue