Skip to content

Commit

Permalink
close #7 add assertNotEquals
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Mar 8, 2018
1 parent a873e95 commit deece51
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions assert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,13 @@ assertEquals() {
exit 2
fi
}

assertNotEquals() {
want=$1
got=$2
msg=$3
if [ "$want" == "$got" ]; then
echo "assertNotEquals failed: want='$want' got='$got' $msg"
exit 2
fi
}

0 comments on commit deece51

Please sign in to comment.