Subject: Re: [PATCH v4 14/14] trace2: t/helper/test-trace2, t0210.sh, t0211.sh, t0212.sh

From: SZEDER Gábor <[email-masked]>
Date: Fri, 1 Feb 2019 00:28:51 +0100

On Wed, Jan 30, 2019 at 12:56:34PM -0800, Jeff Hostetler via GitGitGadget wrote:
> Create unit tests for Trace2.

> diff --git a/t/t0212-trace2-event.sh b/t/t0212-trace2-event.sh
> new file mode 100755
> index 0000000000..517d5514df
> --- /dev/null
> +++ b/t/t0212-trace2-event.sh
> @@ -0,0 +1,234 @@

> +test_expect_success 'event stream, return code 0' '
> +	test_when_finished "rm trace.event actual expect" &&
> +	GIT_TR2_EVENT="$(pwd)/trace.event" test-tool trace2 004child test-tool trace2 004child test-tool trace2 001return 0 &&
> +	perl "$TEST_DIRECTORY/t0212/parse_events.perl" <trace.event >actual &&
> +	sed -e "s/^|//" >expect <<-EOF &&
> +	|VAR1 = {
> +	|  "_SID0_":{
> +	|    "argv":[
> +	|      "_EXE_",
> +	|      "trace2",
> +	|      "004child",
> +	|      "test-tool",
> +	|      "trace2",
> +	|      "004child",
> +	|      "test-tool",
> +	|      "trace2",
> +	|      "001return",
> +	|      "0"
> +	|    ],
> +	|    "child":{
> +	|      "0":{
> +	|        "child_argv":[
> +	|          "_EXE_",
> +	|          "trace2",
> +	|          "004child",
> +	|          "test-tool",
> +	|          "trace2",
> +	|          "001return",
> +	|          "0"
> +	|        ],

Just curious about the vertically aligned '|'s: are they there to
circumvent 'git diff's big red whitespace warnings on these deeply
indented lines?