summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-05-30 14:20:40 -0400
committerDan Davison <dandavison7@gmail.com>2020-05-30 16:55:38 -0400
commit1bc0a9df43fde3b1d295f70f3bd754ba502099fb (patch)
tree642811ea4c9e450f0358683d91a235542aa02d5a /src/tests
parentad105d56c1b06dd7e4a38e00f58ef8564ecc12e5 (diff)
Add failing test of --hunk-header-style raw
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_example_diffs.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/test_example_diffs.rs b/src/tests/test_example_diffs.rs
index 4b47a0b9..aee4a53a 100644
--- a/src/tests/test_example_diffs.rs
+++ b/src/tests/test_example_diffs.rs
@@ -423,6 +423,27 @@ src/align.rs
}
#[test]
+ fn test_hunk_header_style_box_raw() {
+ let mut options = integration_test_utils::get_command_line_options();
+ options.hunk_header_style = "raw".to_string();
+ options.hunk_header_decoration_style = "box".to_string();
+ let (output, _) = integration_test_utils::run_delta(GIT_DIFF_SINGLE_HUNK, options);
+ ansi_test_utils::assert_line_has_no_color(
+ &output,
+ 11,
+ "@@ -71,11 +71,8 @@ impl<'a> Alignment<'a> { │",
+ );
+ let output = strip_ansi_codes(&output);
+ assert!(output.contains(
+ "
+────────────────────────────────────────────┐
+@@ -71,11 +71,8 @@ impl<'a> Alignment<'a> { │
+────────────────────────────────────────────┘
+"
+ ));
+ }
+
+ #[test]
fn test_hunk_style_underline() {
let mut options = integration_test_utils::get_command_line_options();
options.hunk_header_decoration_style = "black underline".to_string();