rylnd / shpec

Test your shell scripts!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Return value of `end` is never checked

hlangeveld opened this issue · comments

Over the weekend I experimented with a possible skip feature, and I happened to notice that the final test in function end() doesn't do anything.

An end is typically followed by another end or a new test. Theoretically, the last end in
a file could return true or false to the . $file line in shpec, but the result of that is ignored.

I'd vote for truncating end, and get rid of the tests.

We can keep one final assertion that test_indent does not drop below zero.
That would be a shpec error, and reason for aborting further processing.

Yes, I totally agree. I believe the original intention was to report the success/failure of an individual test file, but we're obviously not using it, and it would be easy to reimplement if needed.

Would you like to address this or should I?

On 04/24/15 00:42, Ryland Herrick wrote:

Yes, I totally agree. I believe the original intention was to report the success/failure of an individual test file, but we're
obviously not using it, and it would be easy to reimplement if needed.

Would you like to address this or should I?

I've got a (now out of sync) branch out there that already reduced it (feature_skip or travis).
It's trivial to deal with.

Got to run now.

Yep, I found it: 8d133e4. I'm going to cherry-pick that to another branch, since yours (feature_skip) needs to be rebased anyways.

In general, if we can try to narrow the scope of our feature branches, it will make everyone's lives simpler. A branch that solves three individual problems should be three individual branches.

A branch that solves three individual problems should be three individual branches.

Amen