git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] Add test script for git-stripspace.

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 27, 2007, 02:32 UTC
Message-ID
<7v8xa6ruu4.fsf@assigned-by-dhcp.pobox.com>
In-Reply-To
<46801665.4050708@gmail.com>
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
100755?
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
Previous: Carlos RicaNext: Carlos Rica
Message 2 of 3 in “Add test script for git-stripspace.”
  1. 1/2 Add test script for git-stripspace.Carlos Rica, Jun 25, 2007
  2. Junio C HamanoJun 27, 2007
  3. Carlos RicaJun 27, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.