Thread (19 messages) flat view 19 messages, 7 authors, 2016-06-15

Re: What's cooking in git.git (Oct 2010, #01; Wed, 13)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:48

Ævar Arnfjörð Bjarmason [off-list ref] writes:
On Thu, Oct 14, 2010 at 04:46, Junio C Hamano [off-list ref] wrote:
quoted
 - test-lib: make test_expect_code a test command

Somewhat rerolled, but the largest one among the series was Nacked by a
few people and needs to be rerolled again.
Why did you amend this to use this sed trick:

    +sed -e 's/Z$//' >expect <<\EOF &&
    +not ok - 1 tests clean up even after a failure
    +#      Z
    +#          touch clean-after-failure &&
    +#          test_when_finished rm clean-after-failure &&
    +#          (exit 1)
    +#      Z
    +not ok - 2 failure to clean up causes the test to fail
    +#      Z
    +#          test_when_finished \"(exit 2)\"
    +#      Z

Is it just to keep it diff --check clean?
Yes and files with trailing whitespaces are hard to understand in general
when reading, even outside the "should I apply that patch?" contenxt.
Anyway if we munge the output like this the output of test_cmp will be
more confusing when it fails, because it'll be diff(1)-ing something
that the test-lib would never emit.
Hmm, why?  "expect" has trailing whitespaces on lines that end with Z,
i.e. what the original patch wanted to place in.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help