Pre-commit cargo test and cargo fmt hook test.

This commit is contained in:
Jordan Petridis 2017-09-23 10:12:48 +03:00
parent d2e9c5fcbe
commit a3e47effb4
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
3 changed files with 11 additions and 10 deletions

View File

@ -22,6 +22,6 @@ merge_derives = true
array_horizontal_layout_threshold = 5
condense_wildcard_suffixes = true
# rustfmt 0.2.7 panics with format_string = true atm
# format_strings = true
# format_strings = false
chain_one_line_max = 60
chain_split_single_child = false

View File

@ -175,11 +175,11 @@ mod tests {
let channel = Channel::read_from(BufReader::new(file)).unwrap();
let firstitem = channel.items().first().unwrap();
let descr = "NSA whistleblower Edward Snowden discusses the massive Equifax data breach \
and allegations of Russian interference in the US election. Commentator \
Shaun King explains his call for a boycott of the NFL and talks about his \
campaign to bring violent neo-Nazis to justice. Rapper Open Mike Eagle \
performs.";
let descr = "NSA whistleblower Edward Snowden discusses the massive Equifax data \
breach and allegations of Russian interference in the US election. \
Commentator Shaun King explains his call for a boycott of the NFL and \
talks about his campaign to bring violent neo-Nazis to justice. Rapper \
Open Mike Eagle performs.";
let i = parse_episode(&firstitem, 0).unwrap();
assert_eq!(i.title, Some("The Super Bowl of Racism"));
@ -305,9 +305,8 @@ mod tests {
let descr2 = "<p>The Gnome project is about to solve one of our audience's biggest \
Waylands concerns. But as the project takes on a new level of relevance, \
decisions for the next version of Gnome have us worried about the \
future.</p>
<p>Plus we chat with Wimpy about the Ubuntu Rally in NYC, \
future.</p>\n\n\
<p>Plus we chat with Wimpy about the Ubuntu Rally in NYC, \
Microsofts sneaky move to turn Windows 10 into the ULTIMATE LINUX \
RUNTIME, community news & more!</p>";
assert_eq!(i2.title, Some("Gnome Does it Again | LUP 213"));

View File

@ -68,9 +68,11 @@ lazy_static!{
static ref HAMMOND_DATA: PathBuf = {
HAMMOND_XDG.create_data_directory(HAMMOND_XDG.get_data_home()).unwrap()
};
static ref HAMMOND_CONFIG: PathBuf = {
HAMMOND_XDG.create_config_directory(HAMMOND_XDG.get_config_home()).unwrap()
HAMMOND_XDG.create_config_directory(HAMMOND_XDG.get_config_home()).unwrap()
};
static ref HAMMOND_CACHE: PathBuf = {
HAMMOND_XDG.create_cache_directory(HAMMOND_XDG.get_cache_home()).unwrap()
};