Thread (73 messages) flat view 73 messages, 6 authors, 2016-06-15

Re: [PATCH v2 8/8] update-ref: add test cases covering --stdin signature

From: Brad King <hidden>
Date: 2016-06-15 22:58:36

On 08/31/2013 11:41 PM, Eric Sunshine wrote:
quoted
+       rm -f stdin &&
+       touch stdin &&
Unless the timestamp of 'stdin' has particular significance, modern
git tests avoid 'touch' in favor of creating the empty file like this

    >stdin &&
Fixed.
quoted
+       git update-ref --stdin < stdin &&
Style: Git test scripts omit whitespace following <, >, <<, and >>.
Fixed.
quoted
+test_expect_success 'stdin fails with bad line lines' '
Despite the semantic relationship between all these cases, if there is
a regression in one case, the person reading the verbose output has to
study it carefully to determine the offending case. If you decompose
this monolith so that each case is in its own test_expect_success,
then the regressed case becomes immediately obvious.
Yes, of course.  Fixed.
multi-line preparations of 'stdin' might be more readable with a heredoc:

    cat >stdin <<-EOF &&
    $a $m
    $b $m
    $a $m
    EOF
Fixed.

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