diff options
| author | Dan Davison <dandavison7@gmail.com> | 2021-05-20 10:37:21 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-20 10:37:21 -0400 |
| commit | fe16f7533deb55e83ed0d736e1cd826ad8ae7522 (patch) | |
| tree | 53570ae23091cd454d64ebf6c6dd714012cd0452 /src/tests/test_example_diffs.rs | |
| parent | 5ece1944f1a7df30d342452d7a85d4871c16a42c (diff) | |
Emit description of file mode change (#605)
Fixes #583
Diffstat (limited to 'src/tests/test_example_diffs.rs')
| -rw-r--r-- | src/tests/test_example_diffs.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tests/test_example_diffs.rs b/src/tests/test_example_diffs.rs index de35535..a4d0b85 100644 --- a/src/tests/test_example_diffs.rs +++ b/src/tests/test_example_diffs.rs @@ -1569,6 +1569,14 @@ src/align.rs:71: impl<'a> Alignment<'a> { │ )); } + #[test] + fn test_file_mode_change() { + let config = integration_test_utils::make_config_from_args(&[]); + let output = integration_test_utils::run_delta(GIT_DIFF_FILE_MODE_CHANGE, &config); + let output = strip_ansi_codes(&output); + assert!(output.contains(r"src/delta.rs: 100644 ⟶ 100755")); + } + const GIT_DIFF_SINGLE_HUNK: &str = "\ commit 94907c0f136f46dc46ffae2dc92dca9af7eb7c2e Author: Dan Davison <dandavison7@gmail.com> @@ -2172,4 +2180,10 @@ Date: Sun Nov 1 15:28:53 2020 -0500 \ No newline at end of file[m [32m+[m[32m][m "#; + + const GIT_DIFF_FILE_MODE_CHANGE: &str = " +diff --git a/src/delta.rs b/src/delta.rs +old mode 100644 +new mode 100755 +"; } |
