Thread (14 messages) flat view 14 messages, 3 authors, 2016-06-15

Re: [PATCH 1/4] t9903: add tests for git-prompt pcmode

From: Eduardo D'Avila <hidden>
Date: 2016-06-15 22:57:53

2013/6/22 SZEDER Gábor [off-list ref]:
On Thu, Jun 20, 2013 at 11:25:26PM -0300, Eduardo R. D'Avila wrote:
quoted
git-prompt.sh lacks tests for PROMPT_COMMAND mode.

Add tests for:
* pcmode prompt without colors
* pcmode prompt with colors for bash
* pcmode prompt with colors for zsh

Having these tests enables an upcoming refactor in
a safe way.

Signed-off-by: Eduardo R. D'Avila <redacted>
I doubt the value of separate tests for zsh.  They might make sense as
long as there are different code paths for doing coloring for the two
shells, but after your refactorization in 2/4 there is only one common
block of if statements, which is already thoroughly excercised by your
tests for bash, making the separate tests for zsh redundant.
These tests where important to make sure that I wouldn't break anything during
the refactorization. Having them pass before *and* after refactorization
guarantees that nothing was broken (except for some subtle case that might have
not be included in the tests).

However, I agree that they became redundant.

Would it make sense to include a patch that only removes the zsh
tests, after the
refactorization? I'm considering that *1* simple zsh test must be kept during
this removal, to make sure the code path for zsh is run.


Eduardo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help