Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 54661 invoked from network); 14 Mar 2006 21:24:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Mar 2006 21:24:15 -0000 Received: (qmail 3338 invoked by uid 500); 14 Mar 2006 21:24:10 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 3157 invoked by uid 500); 14 Mar 2006 21:24:09 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 3099 invoked by uid 99); 14 Mar 2006 21:24:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Mar 2006 13:24:08 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Mar 2006 13:24:06 -0800 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 3C218D49FF for ; Tue, 14 Mar 2006 21:23:41 +0000 (GMT) Message-ID: <1131035586.1142371421243.JavaMail.jira@ajax> Date: Tue, 14 Mar 2006 21:23:41 +0000 (GMT) From: "David Van Couvering (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1115) Write a test that ensures that code that translates a message id into a message does so correctly In-Reply-To: <381515056.1142371299608.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1115?page=all ] David Van Couvering updated DERBY-1115: --------------------------------------- Attachment: generateClientMessageTest.sh What I have done instead is done some ingenuous (IMHO :)) use of grep and sed to *generate* a unit test which basically extracts all (or as many as I could find) uses of message translation in the network client and puts it in a single test file. I have yet to tackle this for the engine. So, I have this all working (see attached) and I actually already found one bug that way. Since it depends on UNIX utilities, it can't be part of the standard unit tests, but I'd like to check it in and recommend we use it for nightly regression and release tests. The question is, where to put it? Where I have it right now is under java/build/i18nTestGen. It seems a bit odd since it's not actually java code. Is there a better place to put this? Should it go under tools? > Write a test that ensures that code that translates a message id into a message does so correctly > ------------------------------------------------------------------------------------------------- > > Key: DERBY-1115 > URL: http://issues.apache.org/jira/browse/DERBY-1115 > Project: Derby > Type: Test > Reporter: David Van Couvering > Priority: Minor > Attachments: README, genClient1.sed, genClient2.sed, generateClientMessageTest.sh > > After finding, in my and others' code, a number of situations where we used a message id with no matching message, or used the incorrect number of parameters for an internationalized message, I became determined to write a test that tries to track down these bugs, a kind of "i18n lint". > It's very hard, almost impossible, to test these invocations of message formatting through a normal unit test, because basically you have to write a full suite of negative tests. > This bug is a placeholder for some work I am doing to accomplish this task using code parsing rather than trying to execute negative tests. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira