From: Jeff King Date: Fri, 10 Oct 2014 06:27:22 GMT Subject: Re: [PATCH 3/3] test-lib.sh: support -x option for shell-tracing Message-ID: <20141010062722.GB17481@peff.net> In-Reply-To: <20141010061355.GC15277@peff.net> On Fri, Oct 10, 2014 at 02:13:55AM -0400, Jeff King wrote: > + -x) > + test_eval_start_='set -x' > [...] > + eval "$test_eval_start_ $*" > +} Hmph. I had originally intended to make this "set -x;" with a semicolon, to keep it split from $*. But I forgot to, and much to my surprise, all of the tests still passed. I think that is because each of the tests is one of: 1. Long, in which case we split the commands into their own line, like: test_expect_success 'foo' ' some command ' and the leading newline serves as the separator. or 2. Short, like: test_expect_success 'foo' 'bar' in which case we did not run the test at all, but merely set $1 to 'bar', which of course succeeded. Whoops! Still, I'm surprised that nothing failed due to case 2. I'll send a re-roll in a moment. -Peff