From 09d8df02374b983cd061e19454d92f855a2542cb Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sat, 30 May 2020 14:12:34 -0400 Subject: Add failing test of --commit-style raw --- src/tests/test_example_diffs.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src') diff --git a/src/tests/test_example_diffs.rs b/src/tests/test_example_diffs.rs index eb2ccfc6..f25440c1 100644 --- a/src/tests/test_example_diffs.rs +++ b/src/tests/test_example_diffs.rs @@ -258,6 +258,26 @@ commit 94907c0f136f46dc46ffae2dc92dca9af7eb7c2e │ )); } + #[test] + fn test_commit_style_box_raw() { + let mut options = integration_test_utils::get_command_line_options(); + options.commit_style = "raw".to_string(); + options.commit_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, + 1, + "commit 94907c0f136f46dc46ffae2dc92dca9af7eb7c2e │", + ); + let output = strip_ansi_codes(&output); + assert!(output.contains( + "\ +────────────────────────────────────────────────┐ +commit 94907c0f136f46dc46ffae2dc92dca9af7eb7c2e │ +────────────────────────────────────────────────┴─" + )); + } + #[test] fn test_commit_style_underline() { let mut options = integration_test_utils::get_command_line_options(); -- cgit v1.2.3