File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ require File . dirname ( __FILE__ ) + '/../test_helper'
5
+
6
+ # Test diff when the file path has to be quoted according to core.quotePath
7
+ # See https://git-scm.com/docs/git-config#Documentation/git-config.txt-corequotePath
8
+ #
9
+ class TestWindowsCmdEscaping < Test ::Unit ::TestCase
10
+ def test_commit_with_double_quote_in_commit_message
11
+ expected_commit_message = 'Commit message with "double quotes"'
12
+ in_temp_dir do |path |
13
+ create_file ( 'README.md' , "# README\n " )
14
+ git = Git . init ( '.' )
15
+ git . add
16
+ git . commit ( expected_commit_message )
17
+ commits = git . log ( 1 )
18
+ actual_commit_message = commits . first . message
19
+ assert_equal ( expected_commit_message , actual_commit_message )
20
+ end
21
+ end
22
+ end
You can’t perform that action at this time.
0 commit comments