Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b511bac

Browse files
authored
Merge pull request #411 from pre-commit/regression_test_for_409
Add regression test for external diff tools
2 parents 4b90faa + cc65fa9 commit b511bac

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/staged_files_only_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ def test_foo_something_unstaged(foo_staged, cmd_runner):
7171
_test_foo_state(foo_staged, 'herp\nderp\n', 'AM')
7272

7373

74+
def test_something_unstaged_ext_diff_tool(foo_staged, cmd_runner, tmpdir):
75+
diff_tool = tmpdir.join('diff-tool.sh')
76+
diff_tool.write('#!/usr/bin/env bash\necho "$@"\n')
77+
cmd_output('git', 'config', 'diff.external', diff_tool.strpath)
78+
test_foo_something_unstaged(foo_staged, cmd_runner)
79+
80+
7481
def test_foo_something_unstaged_diff_color_always(foo_staged, cmd_runner):
7582
cmd_output('git', 'config', '--local', 'color.diff', 'always')
7683
test_foo_something_unstaged(foo_staged, cmd_runner)

0 commit comments

Comments
 (0)