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

Re: [PATCH] tests: add tests for the bash prompt functions in the completion script

From
SZEDER Gábor <szeder@ira.uka.de>
Date
Apr 16, 2012, 09:49 UTC
Message-ID
<20120416094938.GE2900@goldbirke>
In-Reply-To
<CAMP44s3LJO_Ryc-ONjF+rEHCb1hB8+4Muar6pzjD3zrazYqK+A@mail.gmail.com>
Hi,
On Sun, Apr 15, 2012 at 11:56:36PM +0300, Felipe Contreras wrote:
Show 16 quoted lines
> On Sun, Apr 15, 2012 at 11:31 PM, SZEDER Gábor <szeder@ira.uka.de> wrote:
> > The tests cover the discovery of the .git directory in the __gitdir()
> > function in different scenarios, and the prompt itself, i.e. branch
> > name, detached heads, operations (rebase, merge, cherry-pick, bisect),
> > and status indicators (dirty, stash, untracked files; but not the
> > upstream status).
> >
> > Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
> > ---
> >
> > Goes on top of fc/completion-tests (b8574ba7).
> >
> >  t/t9902-completion.sh |  436 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 436 insertions(+)
> 
> Perhaps it would make sense to create another file for these,

I thought about that briefly but decided against it to avoid duplicating the bash-specific checks at the beginning, but I don't care that much either way.

> specially since there's the plan of splitting the prompt stuff to a
> separate file.

Oh, I was not aware of such a plan. What would be the benefits of such a move, why is it necessary? Where would you split it up? In particular, what would happen with __gitdir(), which is used in many completion functions and in __git_ps1() as well?

Best, Gábor

Previous: Felipe ContrerasNext: Felipe Contreras
Message 3 of 14 in “tests: add tests for the bash prompt functions in the completion script”
  1. tests: add tests for the bash prompt functions in the completion scriptSZEDER Gábor, Apr 15, 2012
  2. Felipe ContrerasApr 15, 2012
  3. SZEDER GáborApr 16, 2012
  4. Felipe ContrerasApr 16, 2012
  5. SZEDER GáborApr 16, 2012
  6. Jonathan NiederApr 16, 2012
  7. 1/2 tests: move code to run completion tests under bash into a helper librarySZEDER Gábor, Apr 16, 2012
  8. 2/2 tests: add tests for the bash prompt functions in the completion scriptSZEDER Gábor, Apr 16, 2012
  9. Jonathan NiederApr 16, 2012
  10. SZEDER GáborApr 17, 2012
  11. Jonathan NiederApr 16, 2012
  12. SZEDER GáborApr 17, 2012
  13. Johannes SixtApr 17, 2012
  14. Felipe ContrerasApr 17, 2012

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.