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

Re: [PATCH 3/7] test patch hunk editing with "commit -p -m"

From: Benoit Pierre <hidden>
Date: 2016-06-15 23:00:21

Possibly related (same subject, not in this thread)

On Mon, Mar 17, 2014 at 7:53 PM, Junio C Hamano [off-list ref] wrote:
Benoit Pierre [off-list ref] writes:
quoted
+test_expect_failure 'edit hunk "commit -p -m message"' '
+     test_when_finished "rm -f editor_was_started" &&
Not just "when finished", run "rm -f" here to make sure that the
file does not exist.  Later other people may add new tests before
this test piece and affect the state of your throw-away working
tree, and you would want to protect yourself from their changes.
quoted
+     echo more >>file &&
+     echo e | env GIT_EDITOR="touch editor_was_started" git commit -p -m commit2 file &&
Avoid "touch" unless you are interested in the timestamp to be
updated.  Use ": >editor_was_started" or something like that when
you are only interested in "it was not there, now it is".

The same comment applies to the next one.
Isn't the point of using "when finished" to have each test leave the
tree clean after execution, to avoid "bleeding" onto the next test(s)?
Instead of having each test clean after the previous test(s). It seems
to me using both is kind of redundant, no?

-- 
A: Because it destroys the flow of conversation.
Q: Why is top posting dumb?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help