-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from TypedDevs/chore/233-improve-example
Improve tests from example dir
- Loading branch information
Showing
7 changed files
with
35 additions
and
127 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
function say_hi(){ | ||
echo "Hi, $1!" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
function set_up() { | ||
ROOT_DIR="$(dirname "${BASH_SOURCE[0]}")/.." | ||
source "$ROOT_DIR/example/custom_functions.sh" | ||
} | ||
|
||
function test_say_hi_Alice() { | ||
assert_equals "Hi, Alice!" "$(say_hi "Alice")" | ||
} | ||
|
||
function test_say_hi_Bob() { | ||
assert_equals "Hi, Bob!" "$(say_hi "Bob")" | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
function set_up() { | ||
ROOT_DIR="$(dirname "${BASH_SOURCE[0]}")/.." | ||
SCRIPT="$ROOT_DIR/example/script_logic.sh" | ||
} | ||
|
||
function test_script_123() { | ||
assert_equals "expected 123" "$($SCRIPT "123")" | ||
} | ||
|
||
function test_script_456() { | ||
assert_equals "expected 456" "$($SCRIPT "456")" | ||
} |