-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: run lint-fix which has changed slightly
- Loading branch information
Showing
17 changed files
with
272 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
#!/usr/bin/env bash | ||
|
||
assert() { | ||
local actual | ||
actual="$(bash -c "$1")" | ||
if [[ "$actual" != "$2" ]]; then | ||
echo "Expected '$2' but got '$actual'" | ||
exit 1 | ||
fi | ||
local actual | ||
actual="$(bash -c "$1")" | ||
if [[ "$actual" != "$2" ]]; then | ||
echo "Expected '$2' but got '$actual'" | ||
exit 1 | ||
fi | ||
} | ||
|
||
assert_contains() { | ||
local actual | ||
actual="$(bash -c "$1")" | ||
if [[ "$actual" != *"$2"* ]]; then | ||
echo "Expected '$2' to be in '$actual'" | ||
exit 1 | ||
fi | ||
local actual | ||
actual="$(bash -c "$1")" | ||
if [[ "$actual" != *"$2"* ]]; then | ||
echo "Expected '$2' to be in '$actual'" | ||
exit 1 | ||
fi | ||
} | ||
|
||
assert_not_contains() { | ||
local actual | ||
actual="$(bash -c "$1")" | ||
if [[ "$actual" == *"$2"* ]]; then | ||
echo "Expected '$2' to not be in '$actual'" | ||
exit 1 | ||
fi | ||
local actual | ||
actual="$(bash -c "$1")" | ||
if [[ "$actual" == *"$2"* ]]; then | ||
echo "Expected '$2' to not be in '$actual'" | ||
exit 1 | ||
fi | ||
} | ||
|
||
assert_fail() { | ||
if bash -c "$1" 2>&1; then | ||
echo "Expected failure but succeeded" | ||
exit 1 | ||
fi | ||
if bash -c "$1" 2>&1; then | ||
echo "Expected failure but succeeded" | ||
exit 1 | ||
fi | ||
} | ||
|
||
assert_matches() { | ||
local actual | ||
actual="$(bash -c "$1")" | ||
if [[ ! "$actual" =~ $2 ]]; then | ||
echo "Expected '$2' to match '$actual'" | ||
exit 1 | ||
fi | ||
local actual | ||
actual="$(bash -c "$1")" | ||
if [[ ! "$actual" =~ $2 ]]; then | ||
echo "Expected '$2' to match '$actual'" | ||
exit 1 | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.