diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-05-30 14:58:17 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-05-30 16:55:38 -0400 |
commit | 13f41e34a896ee11992df63dd18dbfce8c7b5799 (patch) | |
tree | e9bab2ea5f4172072b8a79c5f6e4ad4c4841eeec /src/tests | |
parent | 436e83d67638d8e2d48912099d58a25fceefa7c7 (diff) |
Add failing tests of `--thing-style omit`
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test_example_diffs.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/tests/test_example_diffs.rs b/src/tests/test_example_diffs.rs index ca3f14ad..9a771932 100644 --- a/src/tests/test_example_diffs.rs +++ b/src/tests/test_example_diffs.rs @@ -223,6 +223,19 @@ commit 94907c0f136f46dc46ffae2dc92dca9af7eb7c2e } #[test] + fn test_commit_style_omit() { + let mut options = integration_test_utils::get_command_line_options(); + options.commit_style = "omit".to_string(); + let (output, _) = integration_test_utils::run_delta(GIT_DIFF_SINGLE_HUNK, options); + let output = strip_ansi_codes(&output); + assert!(!output.contains( + "\ +commit 94907c0f136f46dc46ffae2dc92dca9af7eb7c2e +" + )); + } + + #[test] fn test_commit_style_box() { let mut options = integration_test_utils::get_command_line_options(); options.commit_style = "blue".to_string(); @@ -335,6 +348,14 @@ index 8e37a9e..6ce4863 100644 } #[test] + fn test_file_style_omit() { + let mut options = integration_test_utils::get_command_line_options(); + options.file_style = "omit".to_string(); + let (output, _) = integration_test_utils::run_delta(GIT_DIFF_SINGLE_HUNK, options); + assert!(!output.contains("src/align.rs")); + } + + #[test] fn test_file_style_box() { let mut options = integration_test_utils::get_command_line_options(); options.file_style = "green".to_string(); @@ -430,6 +451,15 @@ src/align.rs } #[test] + fn test_hunk_header_style_omit() { + let mut options = integration_test_utils::get_command_line_options(); + options.hunk_header_style = "omit".to_string(); + let (output, _) = integration_test_utils::run_delta(GIT_DIFF_SINGLE_HUNK, options); + let output = strip_ansi_codes(&output); + assert!(!output.contains("impl<'a> Alignment<'a> {")); + } + + #[test] fn test_hunk_header_style_box() { let mut options = integration_test_utils::get_command_line_options(); options.hunk_header_decoration_style = "white box".to_string(); |