Re: [PATCH 1/2] Add test script for git-stripspace.
Carlos Rica <jasampler@gmail.com> writes:
Show 11 quoted lines
> These tests check some features that git-stripspace already has
> and those that it should manage well: Removing trailing spaces
> from lines, removing blank lines at the beginning and end,
> unifying multiple lines between paragraphs, doing the correct
> when there is no newline at the last line, etc.
>
> It seems that the implementation needs to save the whole line
> in memory to be able to manage correctly long lines with
> text and spaces conveniently distribuited on them.
>
> Signed-off-by: Carlos Rica <jasampler@gmail.com>
Thanks. That's extensive set of tests for a little utility.
Show 10 quoted lines
> t/t0030-stripspace.sh | 355
> +++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 355 insertions(+), 0 deletions(-)
> create mode 100644 t/t0030-stripspace.sh
>
> diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh
> new file mode 100644
> index 0000000..abd82d7
> --- /dev/null
> +++ b/t/t0030-stripspace.sh
Show 7 quoted lines
> @@ -0,0 +1,355 @@
> ...
> +test_expect_success \
> + 'long lines without spaces should be unchanged' '
> + echo "$ttt" >expect &&
> + cat expect | git-stripspace >actual &&
> + git diff expect actual &&
Please don't cat a single file into a pipeline.
git-stripspace <actual >expect