You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The below script crashes but would works fine if you remove '-e'
#! /bin/sh -e
testTrue()
{
assertTrue 0
}
. shunit2
I'm using shunit2 v2.1.6-1 from ubuntu raring
Original issue reported on code.google.com by ert...@gmail.com on 21 Jul 2013 at 9:28
The text was updated successfully, but these errors were encountered:
The problem in this case was the shunit_match_=`expr "${shunit_condition_}" :
'\([0-9]*\)'` which returned a 1. i attached an || true to ensure that return
value is always 0 (since it won't be evaluated by the script).
I also fixed the problem for the AssertEquals and AssertNotEquals functions.
there the problem came frmo failNotEquals.
One remaining problem is that an `assertTrue 1` will still cause the crash
since the assertion function returns failure in this case. I'm not sure if this
is a responsibility of the assetion function or the caller that should check
the return value. I tend to give the responsibility to the caller.
I did not write test yet because I'm not sure how this behaviour could be
tested.
Original comment by bitschup...@googlemail.com on 13 Sep 2013 at 11:49
Original issue reported on code.google.com by
ert...@gmail.com
on 21 Jul 2013 at 9:28The text was updated successfully, but these errors were encountered: