Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 59857 invoked from network); 17 Jun 2004 14:41:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Jun 2004 14:41:55 -0000 Received: (qmail 16009 invoked by uid 500); 17 Jun 2004 14:40:14 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 15864 invoked by uid 500); 17 Jun 2004 14:40:09 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 15561 invoked by uid 500); 17 Jun 2004 14:40:05 -0000 Received: (qmail 15303 invoked by uid 99); 17 Jun 2004 14:40:03 -0000 Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Thu, 17 Jun 2004 07:40:03 -0700 Received: (qmail 58618 invoked by uid 1865); 17 Jun 2004 14:39:54 -0000 Date: 17 Jun 2004 14:39:54 -0000 Message-ID: <20040617143954.58617.qmail@minotaur.apache.org> From: ebourg@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestPropertiesConfiguration.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ebourg 2004/06/17 07:39:54 Modified: configuration/conf test.properties configuration/src/test/org/apache/commons/configuration TestPropertiesConfiguration.java Log: Added a test for list properties specified as a comma separated values and with multiple keys Revision Changes Path 1.6 +3 -0 jakarta-commons/configuration/conf/test.properties Index: test.properties =================================================================== RCS file: /home/cvs/jakarta-commons/configuration/conf/test.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- test.properties 15 Jun 2004 10:12:29 -0000 1.5 +++ test.properties 17 Jun 2004 14:39:54 -0000 1.6 @@ -16,6 +16,9 @@ test.empty = +test.mixed.array = a +test.mixed.array = b, c, d + # # Test a property that uses a previous property # 1.8 +12 -1 jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestPropertiesConfiguration.java Index: TestPropertiesConfiguration.java =================================================================== RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestPropertiesConfiguration.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- TestPropertiesConfiguration.java 15 Jun 2004 10:12:29 -0000 1.7 +++ TestPropertiesConfiguration.java 17 Jun 2004 14:39:54 -0000 1.8 @@ -120,4 +120,15 @@ { assertEquals("test\\,test", PropertiesConfiguration.unescapeJava("test\\,test")); } + + public void testMixedArray() + { + String[] array = conf.getStringArray("test.mixed.array"); + + assertEquals("array length", 4, array.length); + assertEquals("1st element", "a", array[0]); + assertEquals("1st element", "b", array[1]); + assertEquals("1st element", "c", array[2]); + assertEquals("1st element", "d", array[3]); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org