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

Re: [PATCH] t7400: encapsulate setup code in test_expect_success

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jun 12, 2018, 21:36 UTC
Message-ID
<CAPig+cQM-DXc3sK_Eb7xaaTxNk=0yu9Q3oYtx7M4EinS04AYHA@mail.gmail.com>
In-Reply-To
<20180612212540.200142-1-sbeller@google.com>
On Tue, Jun 12, 2018 at 5:25 PM, Stefan Beller <sbeller@google.com> wrote:
Show 18 quoted lines
> When running t7400 in a shell you observe more output than expected:
>     ...
>     ok 10 - submodule add
>     [master (root-commit) d79ce16] one
>      Author: A U Thor <author@example.com>
>      1 file changed, 1 insertion(+)
>      create mode 100644 one.t
>     ok 11 - redirected submodule add does not show progress
>     ...
> Fix the output by encapsulating the setup code in test_expect_success
>
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
> @@ -126,8 +126,10 @@ test_expect_success 'submodule add' '
> -test_create_repo parent &&
> -test_commit -C parent one
> +test_expect_success 'setup parent and one repository for further tests' '
Nit: "for further tests" is implied for actions performed by a "setup"
function, so a bit redundant to say so.
> +       test_create_repo parent &&
> +       test_commit -C parent one
> +'
Previous: Stefan BellerNext: Stefan Beller
Message 2 of 3 in “t7400: encapsulate setup code in test_expect_success”
  1. t7400: encapsulate setup code in test_expect_successStefan Beller, Jun 12, 2018
  2. Eric SunshineJun 12, 2018
  3. t7400: encapsulate setup code in test_expect_successStefan Beller, Jun 18, 2018

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.