Re: [PATCH] Fix t3701 if core.filemode disabled

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Fix t3701 if core.filemode disabled

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:38

Alex Riesen [off-list ref] writes:
Jeff King, Wed, May 21, 2008 16:36:07 +0200:
quoted
2. It's a little hard to see which tests are affected. I would have done
   something more like:

  if test "$(git config --bool core.filemode)" = true
    test_filemode=
  else
    test_filemode=:
  fi

  $test_filemode test_expect_success ...

  But maybe that is just overengineering.
But a nice one. I like the idea but Junio already did your other
suggestions in master, so I just keep it in mind for the next one
If you like that, I think you would like the way t0050 does even better
;-).  It is Steffen Prohaska's invention, IIRC.

Re: [PATCH] Fix t3701 if core.filemode disabled

From: Jeff King <hidden>
Date: 2016-06-15 22:44:38

On Thu, May 22, 2008 at 10:49:09AM -0700, Junio C Hamano wrote:
quoted
But a nice one. I like the idea but Junio already did your other
suggestions in master, so I just keep it in mind for the next one
If you like that, I think you would like the way t0050 does even better
;-).  It is Steffen Prohaska's invention, IIRC.
Well, you can't test_expect_failure with it. :)

Though I think it is actually nice to mention which tests are being
skipped (something I asked for in point 3 of my other message, but which
contradicts the example I gave in point 2 of the same message :) ).

So something like:

have_foo=
test_foo() {
  case "$have_foo" in
    t) test_expect_success "$@"
    *) say "skipping test $1 (don't have foo)"
  esac
}

test_expect_success 'see if we have foo' '
  if magic_foo_test; then
    have_foo=t
  fi || true
'
test_foo 'use foo' '...'

-Peff

Re: [PATCH] Fix t3701 if core.filemode disabled

From: Alex Riesen <hidden>
Date: 2016-06-15 22:44:38

2008/5/22 Junio C Hamano [off-list ref]:
Alex Riesen [off-list ref] writes:
quoted
Jeff King, Wed, May 21, 2008 16:36:07 +0200:
quoted
  $test_filemode test_expect_success ...

  But maybe that is just overengineering.
But a nice one. I like the idea but Junio already did your other
suggestions in master, so I just keep it in mind for the next one
If you like that, I think you would like the way t0050 does even better
;-).  It is Steffen Prohaska's invention, IIRC.
I do :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help