mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 15:26:03 +01:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user