Skip to content

Commit

Permalink
Add failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpclark committed Oct 10, 2017
1 parent 1bfa54d commit 04b76d9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Empty file modified install.sh
100644 → 100755
Empty file.
30 changes: 30 additions & 0 deletions test/invalid.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,34 @@ describe "* abrute with invalid input"
target/debug/abrute 4:4 asdf -- test/data/example-thingy.file.aes 2>/dev/null
assert unequal $? 0
end

it "does not panic with invalid range"
message=`target/debug/abrute asdf asdf -- asdf 2>& 1`
echo "$message" | grep -q "thread*"
assert unequal $? 0
end

it "does not panic with file missing"
message=`target/debug/abrute 4 asdf -- asdf 2>& 1`
echo "$message" | grep -q "thread*"
assert unequal $? 0
end

it "does not panic with invalid adjacent number"
message=`target/debug/abrute 4 asdf -a g -- asdf 2>& 1`
echo "$message" | grep -q "thread*"
assert unequal $? 0
end

it "does not panic with invalid character starters"
message=`target/debug/abrute 4 asdf -s 1234 -- asdf 2>& 1`
echo "$message" | grep -q "thread*"
assert unequal $? 0
end

it "does not show invalid double dash on invalid dash usage"
message=`target/debug/abrute 4 asdf asdf 2>& 1`
echo "$message" | grep -q " -- "
assert equal $? 0
end
end

0 comments on commit 04b76d9

Please sign in to comment.