diff options
author | Kate Ward <kate.ward@forestent.com> | 2020-03-29 17:14:19 +0200 |
---|---|---|
committer | Kate Ward <kate.ward@forestent.com> | 2020-03-29 17:14:19 +0200 |
commit | d3e76c460ea4148ae7d03f8bd9b41514678424d1 (patch) | |
tree | f336f9c494de326a31421e489a2ca942736e3de8 | |
parent | 0e3de93d14088c7014dd8a782f6ea6cac4052c96 (diff) | |
download | shflags-d3e76c460ea4148ae7d03f8bd9b41514678424d1.tar.gz |
Fixed by rebasing on upstream.
-rwxr-xr-x | lib/shunit2 | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/shunit2 b/lib/shunit2 index ecf41fd..a093463 100755 --- a/lib/shunit2 +++ b/lib/shunit2 @@ -480,28 +480,16 @@ assertTrue() { # See if condition is an integer, i.e. a return value. shunit_return=${SHUNIT_TRUE} -<<<<<<< HEAD - shunit_match_=`expr "${shunit_condition_}" : '\([0-9]*\)'` - if (command [ -z "${shunit_condition_}" ]); then - # Null condition. - shunit_return=${SHUNIT_FALSE} - elif (command [ -n "${shunit_match_}" -a "${shunit_condition_}" = "${shunit_match_}" ]) -======= if (command [ -z "${shunit_condition_}" ]); then # Null condition. shunit_return=${SHUNIT_FALSE} elif (expr \( "${shunit_condition_}" + '0' \) '=' "${shunit_condition_}" >/dev/null 2>&1) ->>>>>>> befbecbb9ee52e0c5c056974e87577f81815a690 then # Possible return value. Treating 0 as true, and non-zero as false. (command [ "${shunit_condition_}" -ne 0 ]) && shunit_return=${SHUNIT_FALSE} else # Hopefully... a condition. -<<<<<<< HEAD - ( eval "${shunit_condition_}" ) >/dev/null 2>&1 -======= (eval "${shunit_condition_}" >/dev/null 2>&1) ->>>>>>> befbecbb9ee52e0c5c056974e87577f81815a690 (command [ $? -ne 0 ]) && shunit_return=${SHUNIT_FALSE} fi @@ -560,23 +548,14 @@ assertFalse() { shunit_return=${SHUNIT_TRUE} if (command [ -z "${shunit_condition_}" ]); then # Null condition. -<<<<<<< HEAD - shunit_return=${SHUNIT_FALSE} - elif (command [ -n "${shunit_match_}" -a "${shunit_condition_}" = "${shunit_match_}" ]) -======= shunit_return=${SHUNIT_TRUE} elif (expr \( "${shunit_condition_}" + '0' \) '=' "${shunit_condition_}" >/dev/null 2>&1) ->>>>>>> befbecbb9ee52e0c5c056974e87577f81815a690 then # Possible return value. Treating 0 as true, and non-zero as false. (command [ "${shunit_condition_}" -eq 0 ]) && shunit_return=${SHUNIT_FALSE} else # Hopefully... a condition. -<<<<<<< HEAD - ( eval "${shunit_condition_}" ) >/dev/null 2>&1 -======= (eval "${shunit_condition_}" >/dev/null 2>&1) ->>>>>>> befbecbb9ee52e0c5c056974e87577f81815a690 (command [ $? -eq 0 ]) && shunit_return=${SHUNIT_FALSE} fi |