the ADDRESS.TestGroup contains an ArrayOutputStream class that you use with
.output~destination to capture the output. However, unless you are
specifically testing the displayer stage (one or two tests at most), you
are better off writing these tests using the arraycollector stage as the
end stage to capture the pipe result.

Rick

On Mon, Nov 19, 2018 at 5:26 AM P.O. Jonsson <oor...@jonases.se> wrote:

> Dear Developers,
>
> I am writing a rudimentary test case for pipe.cls. There is a usepipe.rex
> that requires this class and make some tests and I have looked at them and
> tried to do some complementary tests but I get stuck in that I can not get
> hold of the output that goes to standard output (the terminal).
>
> In a normal test case I can use address with to launch a rexx program and
> get the resulting input into a stem but here I have no rexx script available
>
> ::method "test_017_pipe.cls"
>
>   Line.1  = 'TOM'
>   Line.2  = 'MIKE'
>   Line.3  = 'RICK'
>   Line.4  = 'STEVE'
>   Line.0 = 4
>
>   info = .array~of('Tom','Mike','Rick','Steve')  /* Create an array to use
>      */
>
>   pipe = .upper|.displayer               /* prepare Pipe for UPPERCASE „|“
> = concatenation sign      */
>   pipe~go(info)                          /* Run it -> will show the 4
> names in uppercase, each on one line.                     */
>
> How can I get the results from the terminal session into a stem or array
> for testing?
>
> any help most welcome
>
> Von meinen Macbook gesendet
>
> Hälsningar/Regards/Grüsse,
> P.O. Jonsson
> oor...@jonases.se
>
>
>
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to