Did stuff

This commit is contained in:
2021-05-08 14:18:03 +02:00
parent 51fe50399d
commit 0f42ffdbbb
3 changed files with 883 additions and 713 deletions

1560
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,19 +8,19 @@ edition = "2018"
bincode = "1.1"
chrono = { version = "0.4", features = ["serde"] }
chrono-tz = "0.5"
directories = "1.0"
directories = "2.0"
fern = { version = "0.5", features = ["colored"] }
htmlescape = "0.3"
lazy_static = "1.3"
lazy_static = "1.4"
log = "0.4"
regex = "1.1"
regex = "1.3"
reqwest = "0.9"
scraper = "0.9"
scraper = "0.10"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
structopt = "0.2"
structopt = "0.3"
tinytemplate = "1.0"
toml = "0.4"
toml = "0.5"
[dev-dependencies]
insta = "0.7"
insta = "0.11"

View File

@@ -117,7 +117,7 @@ impl Probe for Hitta {
#[cfg(test)]
mod tests {
use insta::assert_yaml_snapshot_matches;
use insta::assert_yaml_snapshot;
use super::*;
@@ -125,7 +125,7 @@ mod tests {
fn test_0104754350() {
let document = include_str!("../../fixtures/hitta/0104754350.html");
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
assert_yaml_snapshot!(from_html(&document), @r###"---
Ok:
messages: []
history:
@@ -246,14 +246,14 @@ Ok:
- datetime:
DateTime: "2018-06-26T12:59:33Z"
title: ~
message: Säljare Folksam"###;
message: Säljare Folksam"###);
}
#[test]
fn test_0313908905() {
let document = include_str!("../../fixtures/hitta/0313908905.html");
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
assert_yaml_snapshot!(from_html(&document), @r###"---
Ok:
messages: []
history: []
@@ -264,7 +264,7 @@ Ok:
fn test_0702269893() {
let document = include_str!("../../fixtures/hitta/0702269893.html");
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
assert_yaml_snapshot!(from_html(&document), @r###"---
Ok:
messages: []
history:
@@ -276,7 +276,7 @@ Ok:
fn test_0726443387() {
let document = include_str!("../../fixtures/hitta/0726443387.html");
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
assert_yaml_snapshot!(from_html(&document), @r###"---
Ok:
messages: []
history:
@@ -288,7 +288,7 @@ Ok:
fn test_0751793426() {
let document = include_str!("../../fixtures/hitta/0751793426.html");
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
assert_yaml_snapshot!(from_html(&document), @r###"---
Ok:
messages: []
history: []
@@ -299,7 +299,7 @@ Ok:
fn test_0751793483() {
let document = include_str!("../../fixtures/hitta/0751793483.html");
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
assert_yaml_snapshot!(from_html(&document), @r###"---
Ok:
messages: []
history: []
@@ -310,7 +310,7 @@ Ok:
fn test_0751793499() {
let document = include_str!("../../fixtures/hitta/0751793499.html");
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
assert_yaml_snapshot!(from_html(&document), @r###"---
Ok:
messages: []
history: []
@@ -321,7 +321,7 @@ Ok:
fn test_0701807618() {
let document = include_str!("../../fixtures/hitta/0701807618.html");
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
assert_yaml_snapshot!(from_html(&document), @r###"---
Err: ~"###);
}
@@ -329,7 +329,7 @@ Err: ~"###);
fn test_0546780862() {
let document = include_str!("../../fixtures/hitta/0546780862.html");
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
assert_yaml_snapshot!(from_html(&document), @r###"---
Err: ~"###);
}
}