We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db060fc commit 934d17dCopy full SHA for 934d17d
tests/units/test_windows_cmd_escaping.rb
@@ -0,0 +1,22 @@
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
22
+end
0 commit comments