diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-12-07 11:38:47 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2017-12-07 11:38:47 +0000 |
commit | 9d797400eaec5f9fa7ba9507c82d9c18cb91d02e (patch) | |
tree | d3e9907e1236d9baec0d0036ed713b6f587a98cd /test | |
parent | 58ed8655136ff2fe5ff7796859bf6a399c76c678 (diff) | |
download | redmine-9d797400eaec5f9fa7ba9507c82d9c18cb91d02e.tar.gz redmine-9d797400eaec5f9fa7ba9507c82d9c18cb91d02e.zip |
mercurial: work around faulty parsing of early command options (#27516)
Use -sVALUE and --long=VALUE instead of "-s VALUE" and "--long VALUE"
respectively.
Contributed by Yuya Nishihara.
git-svn-id: http://svn.redmine.org/redmine/trunk@17062 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
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 e0458ce55..4f891602a 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -21,6 +21,7 @@ class MercurialAdapterTest < ActiveSupport::TestCase HELPERS_DIR = Redmine::Scm::Adapters::MercurialAdapter::HELPERS_DIR TEMPLATE_NAME = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATE_NAME TEMPLATE_EXTENSION = Redmine::Scm::Adapters::MercurialAdapter::TEMPLATE_EXTENSION + HgCommandAborted = Redmine::Scm::Adapters::MercurialAdapter::HgCommandAborted HgCommandArgumentError = Redmine::Scm::Adapters::MercurialAdapter::HgCommandArgumentError REPOSITORY_PATH = repository_path('mercurial') @@ -445,19 +446,18 @@ class MercurialAdapterTest < ActiveSupport::TestCase end def test_bad_early_options - assert_raise HgCommandArgumentError do - @adapter.diff('sources/welcome_controller.rb', '--config=alias.rhdiff=!xterm') - end + assert_nil @adapter.diff('sources/welcome_controller.rb', + '--config=alias.rhdiff=!xterm') assert_raise HgCommandArgumentError do @adapter.entries('--debugger') end - assert_raise HgCommandArgumentError do + assert_raise HgCommandAborted do @adapter.revisions(nil, nil, nil, limit: '--repo=otherrepo') end - assert_raise HgCommandArgumentError do + assert_raise HgCommandAborted do @adapter.nodes_in_branch('default', limit: '--repository=otherrepo') end - assert_raise HgCommandArgumentError do + assert_raise HgCommandAborted do @adapter.nodes_in_branch('-Rotherrepo') end end |