]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: add test of author and message which have control character (#23055)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 22 Mar 2020 16:35:09 +0000 (16:35 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 22 Mar 2020 16:35:09 +0000 (16:35 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19608 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb

index 3904fd0b372669a0908eebf128b42009bc26b94c..4ab3245b1064d7366fd56b0d0d554d04e7ebb4d2 100644 (file)
@@ -103,6 +103,13 @@ class MercurialAdapterTest < ActiveSupport::TestCase
       assert_equal '400bb86721098697c7d17b3724c794c57636de70', revisions[0].scmid
     end
 
+    def test_ctrl_character
+      revisions = @adapter.revisions(nil, '619ebf674dab', '619ebf674dab')
+      assert_equal 1, revisions.size
+      assert_equal "ctrl-s\u0013user", revisions[0].author
+      assert_equal "ctrl-s\u0013message", revisions[0].message
+    end
+
     def test_parents
       revs1 = @adapter.revisions(nil, 0, 0)
       assert_equal 1, revs1.size