A test uses several separate pipe sequences in a row which are awkward
to split up. Wrap the split-up pipe in a function so the awkwardness is
not repeated.

Signed-off-by: Matthew DeVore <matv...@google.com>
---
 t/t9101-git-svn-props.sh | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh
index 8cba331fc..952bd4814 100755
--- a/t/t9101-git-svn-props.sh
+++ b/t/t9101-git-svn-props.sh
@@ -190,16 +190,21 @@ EOF
 # This test can be improved: since all the svn:ignore contain the same
 # pattern, it can pass even though the propget did not execute on the
 # right directory.
+# Note we avoid using pipes in order to ensure that git exits with 0.
 test_expect_success 'test propget' "
-       git svn propget svn:ignore . | cmp - prop.expect &&
+       test_propget () {
+               git svn propget $1 $2 >observed
+               cmp - $3
+       } &&
+       test_propget svn:ignore . prop.expect &&
        cd deeply &&
-       git svn propget svn:ignore . | cmp - ../prop.expect &&
-       git svn propget svn:entry:committed-rev nested/directory/.keep \
-         | cmp - ../prop2.expect &&
-       git svn propget svn:ignore .. | cmp - ../prop.expect &&
-       git svn propget svn:ignore nested/ | cmp - ../prop.expect &&
-       git svn propget svn:ignore ./nested | cmp - ../prop.expect &&
-       git svn propget svn:ignore .././deeply/nested | cmp - ../prop.expect
+       test_propget svn:ignore . ../prop.expect &&
+       test_propget svn:entry:committed-rev nested/directory/.keep \
+               ../prop2.expect &&
+       test_propget svn:ignore .. ../prop.expect &&
+       test_propget svn:ignore nested/ ../prop.expect &&
+       test_propget svn:ignore ./nested ../prop.expect &&
+       test_propget svn:ignore .././deeply/nested ../prop.expect
        "
 
 cat >prop.expect <<\EOF
-- 
2.19.0.444.g18242da7ef-goog

Reply via email to