<commit_before>/*
 * Copyright(c) Sophist Solutions, Inc. 1990-2014.  All rights reserved
 */
//  TEST    Foundation::Execution::ProcessRunner
#include    "Stroika/Foundation/StroikaPreComp.h"

#include    "Stroika/Foundation/Execution/ProcessRunner.h"
#if     qPlatform_POSIX
#include    "Stroika/Foundation/Execution/SignalHandlers.h"
#endif
#include    "Stroika/Foundation/Streams/BasicBinaryInputOutputStream.h"
#include    "Stroika/Foundation/Streams/BasicBinaryOutputStream.h"

#include    "../TestHarness/TestHarness.h"



using   namespace   Stroika::Foundation;
using   namespace   Stroika::Foundation::Execution;

using   Characters::String;




namespace   {
    void    RegressionTest1_ ()
    {
        Streams::BasicBinaryOutputStream myStdOut;
        // quickie about to test..
        ProcessRunner pr (SDKSTR ("echo hi mom"), nullptr, myStdOut);
        pr.Run ();
    }
    void    RegressionTest2_ ()
    {
        Streams::BasicBinaryOutputStream myStdOut;
        // quickie about to test..
        ProcessRunner pr (SDKSTR ("echo hi mom"));
        String out = pr.Run (L"");
        VerifyTestResult (out.Trim () == L"hi mom");
    }
    void    RegressionTest3_Pipe_ ()
    {
        Streams::BasicBinaryOutputStream myStdOut;
        ProcessRunner pr1 (SDKSTR ("echo hi mom"));
        Streams::BasicBinaryInputOutputStream pipe;
        ProcessRunner pr2 (SDKSTR ("cat"));
        pr1.SetStdOut (pipe);
        pr2.SetStdIn (pipe);<commit_msg>accomodate args changes to process runner code<commit_after>/*
 * Copyright(c) Sophist Solutions, Inc. 1990-2014.  All rights reserved
 */
//  TEST    Foundation::Execution::ProcessRunner
#include    "Stroika/Foundation/StroikaPreComp.h"

#include    "Stroika/Foundation/Execution/ProcessRunner.h"
#if     qPlatform_POSIX
#include    "Stroika/Foundation/Execution/SignalHandlers.h"
#endif
#include    "Stroika/Foundation/Streams/BasicBinaryInputOutputStream.h"
#include    "Stroika/Foundation/Streams/BasicBinaryOutputStream.h"

#include    "../TestHarness/TestHarness.h"



using   namespace   Stroika::Foundation;
using   namespace   Stroika::Foundation::Execution;

using   Characters::String;




namespace   {
    void    RegressionTest1_ ()
    {
        Streams::BasicBinaryOutputStream myStdOut;
        // quickie about to test..
        ProcessRunner pr (L"echo hi mom", nullptr, myStdOut);
        pr.Run ();
    }
    void    RegressionTest2_ ()
    {
        Streams::BasicBinaryOutputStream myStdOut;
        // quickie about to test..
        ProcessRunner pr (L"echo hi mom");
        String out = pr.Run (L"");
        VerifyTestResult (out.Trim () == L"hi mom");
    }
    void    RegressionTest3_Pipe_ ()
    {
        Streams::BasicBinaryOutputStream myStdOut;
        ProcessRunner pr1 (L"echo hi mom");
        Streams::BasicBinaryInputOutputStream pipe;
        ProcessRunner pr2 (L"cat");
        pr1.SetStdOut (pipe);
        pr2.SetStdIn (pipe);
{'fraction_non_alphanumeric': 0.1101666099965998, 'fraction_numerical': 0.010200612036722203, 'mean_word_length': 2.9918588873812753, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4579078', 'n_tokens_mistral': 906, 'n_tokens_neox': 877, 'n_words': 189}