This seems reasonable. If the called program has multiple assertions, perhaps it could push a message onto the queue giving a failure reason. The calling test driver could then pull that message and use it in a failure assertion.
This method also has the side benefit of testing the ability to pass back a return code. While you're doing this, it might be a good idea to include a test of using the rexx command on a file that raises a syntax error to make sure the syntax error code shows up as the return code. Rick On Sun, Apr 1, 2012 at 3:30 AM, Jean-Louis Faucher <[email protected]> wrote: > Commit done for the size of rxcargs. > > I wanted to add a few tests for syscargs, but I'm not sure of the best way > to do that... I need to call an external routine, but I can't use the assert > from this external routine (right ?). > What i'm thinking to do : > Create a file syscargs_test0.rex to test the case 0 args, do the test I want > and returns 1 if ok, 0 otherwise. Call this file from a testgroup, assert > RC==1. > Idem for the case 1 arg, etc... > > I will do that this evening, unless a better approach is possible ?. > > Jean-Louis > > Le 26 mars 2012 01:40, Jean-Louis Faucher <[email protected]> a écrit : > >> Commit done, but I see that this declaration >> rxcargs = pgmThrdInst->NewArray(1); >> could also be declared with the right size, as done in rexxhide. >> >> Several files to fix, nothing urgent, I will do that next WE. >> >> Jean-Louis >> >> 2012/3/26 Jean-Louis Faucher <[email protected]> >>> >>> Hi Mark >>> >>> Ok, I will fix trunk by using the same style of code than Windows, i.e. >>> size 0 or 1. >>> >>> Jean-Louis >>> >>> >>> 2012/3/26 Mark Miesfeld <[email protected]> >>>> >>>> Hi Jean-Louis, >>>> >>>> I saw your commit and realized that the unix version of rexx is >>>> probably still broken. I checked and it is. >>>> >>>> You're correct in that the argument array must be of size 0 if there are >>>> no arguments. I personally perfer to create the array the correct size, as >>>> is done in the Windows version of rexx, rather than create it and then have >>>> to expand it. But, your fix in your sandbox is prefectly fine also. >>>> >>>> I'd say go ahead and fix trunk now. >>>> >>>> -- >>>> Mark Miesfeld >>>> >>>> On Sun, Mar 25, 2012 at 3:41 PM, Jean-Louis Faucher >>>> <[email protected]> wrote: >>>>> >>>>> Hi >>>>> >>>>> Tiny fix for unix, works for me. >>>>> Will apply it in trunk, unless David wants to fix differently. >>>>> >>>>> Jean-Louis >>>>> >>>>> ---------- Forwarded message ---------- >>>>> From: <[email protected]> >>>>> Date: 2012/3/26 >>>>> Subject: [Oorexx-svn] SF.net SVN: oorexx:[7699] >>>>> sandbox/jlf/trunk/utilities/rexx/platform/unix/ rexx.cpp >>>>> To: [email protected] >>>>> >>>>> >>>>> Revision: 7699 >>>>> http://oorexx.svn.sourceforge.net/oorexx/?rev=7699&view=rev >>>>> Author: jfaucher >>>>> Date: 2012-03-25 22:27:58 +0000 (Sun, 25 Mar 2012) >>>>> Log Message: >>>>> ----------- >>>>> arg()==1 when no arg : fixed by declaring an array of size 0 >>>>> >>>>> Modified Paths: >>>>> -------------- >>>>> sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp >>>>> >>>>> Modified: sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp >>>>> =================================================================== >>>>> --- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp >>>>> 2012-03-25 20:46:25 UTC (rev 7698) >>>>> +++ sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp >>>>> 2012-03-25 22:27:58 UTC (rev 7699) >>>>> @@ -143,7 +143,8 @@ >>>>> else { >>>>> RexxCreateInterpreter(&pgmInst, &pgmThrdInst, NULL); >>>>> // configure the traditional single argument string >>>>> - rxargs = pgmThrdInst->NewArray(1); >>>>> + // Initial size must be zero, because in >>>>> CallProgramDispatcher::run, size will be tested, not items >>>>> + rxargs = pgmThrdInst->NewArray(0); // Will be extended if >>>>> needed >>>>> if (argCount > 0) { >>>>> pgmThrdInst->ArrayPut(rxargs, >>>>> >>>>> pgmThrdInst->NewStringFromAsciiz(arg_buffer), 1); >>>>> >>>>> This was sent by the SourceForge.net collaborative development >>>>> platform, the world's largest Open Source development site. >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> This SF email is sponsosred by: >>>>> Try Windows Azure free for 90 days Click Here >>>>> http://p.sf.net/sfu/sfd2d-msazure >>>>> _______________________________________________ >>>>> Oorexx-svn mailing list >>>>> [email protected] >>>>> https://lists.sourceforge.net/lists/listinfo/oorexx-svn >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> This SF email is sponsosred by: >>>>> Try Windows Azure free for 90 days Click Here >>>>> http://p.sf.net/sfu/sfd2d-msazure >>>>> _______________________________________________ >>>>> Oorexx-devel mailing list >>>>> [email protected] >>>>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel >>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> This SF email is sponsosred by: >>>> Try Windows Azure free for 90 days Click Here >>>> http://p.sf.net/sfu/sfd2d-msazure >>>> _______________________________________________ >>>> Oorexx-devel mailing list >>>> [email protected] >>>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel >>>> >>> >> > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Oorexx-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
