Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 849B610FFB for ; Wed, 18 Mar 2015 01:53:26 +0000 (UTC) Received: (qmail 30782 invoked by uid 500); 18 Mar 2015 01:53:26 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 30720 invoked by uid 500); 18 Mar 2015 01:53:26 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 30706 invoked by uid 99); 18 Mar 2015 01:53:26 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Mar 2015 01:53:26 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2369AE17F4; Wed, 18 Mar 2015 01:53:26 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ningjiang@apache.org To: commits@camel.apache.org Date: Wed, 18 Mar 2015 01:53:27 -0000 Message-Id: <7616e4ef53eb41da83d2a600b9caf017@git.apache.org> In-Reply-To: <44947d88d73c4fd48fa511e0515d9925@git.apache.org> References: <44947d88d73c4fd48fa511e0515d9925@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/3] camel git commit: Added an unit test to show how to set the + to the exec args option Added an unit test to show how to set the + to the exec args option Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/94cb100f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/94cb100f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/94cb100f Branch: refs/heads/master Commit: 94cb100faa1e5d57f614f89b1384bedc7d29aab1 Parents: e7fde37 Author: Willem Jiang Authored: Wed Mar 18 09:52:19 2015 +0800 Committer: Willem Jiang Committed: Wed Mar 18 09:53:00 2015 +0800 ---------------------------------------------------------------------- .../apache/camel/component/exec/ExecEndpointTest.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/94cb100f/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java ---------------------------------------------------------------------- diff --git a/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java b/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java index ebd4cfc..5a8f380 100644 --- a/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java +++ b/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java @@ -106,7 +106,7 @@ public class ExecEndpointTest extends AbstractJUnit4SpringContextTests { ExecEndpoint e = createExecEndpoint("exec:test?args=" + args.replaceAll(" ", "+")); assertEquals(args, e.getArgs()); } - + @Test @DirtiesContext public void testCreateEndpointWithArgs2() throws Exception { @@ -114,6 +114,15 @@ public class ExecEndpointTest extends AbstractJUnit4SpringContextTests { ExecEndpoint e = createExecEndpoint("exec:test?args=" + UnsafeUriCharactersEncoder.encode(args)); assertEquals(args, e.getArgs()); } + + @Test + @DirtiesContext + public void testCreateEndpointWithArgs3() throws Exception { + String args = "RAW(arg1+arg2 arg3)"; + // Just avoid URI encoding by using the RAW() + ExecEndpoint e = createExecEndpoint("exec:test?args=" + args); + assertEquals("arg1+arg2 arg3", e.getArgs()); + } @Test @DirtiesContext