summaryrefslogtreecommitdiffstats
path: root/src/tests/test_hunk_highlighting.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test_hunk_highlighting.rs')
-rw-r--r--src/tests/test_hunk_highlighting.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/tests/test_hunk_highlighting.rs b/src/tests/test_hunk_highlighting.rs
index 605bba32..730218c0 100644
--- a/src/tests/test_hunk_highlighting.rs
+++ b/src/tests/test_hunk_highlighting.rs
@@ -2,7 +2,6 @@
mod tests {
use itertools::Itertools;
- use crate::bat::assets::HighlightingAssets;
use crate::cli;
use crate::config::ColorLayer::*;
use crate::delta::State;
@@ -54,7 +53,7 @@ mod tests {
);
println!();
}
- _do_hunk_color_test(&options);
+ _do_hunk_color_test(options.clone());
}
}
}
@@ -62,18 +61,13 @@ mod tests {
}
}
- fn _do_hunk_color_test(options: &cli::Opt) {
- let output = integration_test_utils::run_delta(
+ fn _do_hunk_color_test(options: cli::Opt) {
+ let (output, config) = integration_test_utils::run_delta(
DIFF_YIELDING_ALL_HUNK_LINE_COLOR_CATEGORIES,
options,
);
-
let lines = output.trim().split("\n").skip(4);
- // Hack: The config has been built once already in run_delta
- let assets = HighlightingAssets::new();
- let config = cli::process_command_line_arguments(&assets, &options);
-
let minus =
paint::paint_text_background("", config.minus_style_modifier.background.unwrap(), true)
.trim_end_matches(paint::ANSI_SGR_RESET)