From 12318cff4d2d1ca7a3dde2d139815d7d8ce0a3bd Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 22 Mar 2020 16:35:09 +0000 Subject: [PATCH] scm: mercurial: add test of author and message which have control character (#23055) git-svn-id: http://svn.redmine.org/redmine/trunk@19608 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../lib/redmine/scm/adapters/mercurial_adapter_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb index 3904fd0b3..4ab3245b1 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -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 -- 2.39.5