Gary Kim
0d25da5bc4
Signed-off-by: Gary Kim <gary@garykim.dev> |
||
---|---|---|
.. | ||
outputs | ||
tests | ||
README.md | ||
bdaycardgen.sh |
README.md
bdaycardgen.sh
- Repo: https://github.com/gary-kim/cooper-union-ece-160
- Mirror: https://git.garykim.dev/gary-kim/cooper-union-ece-160
- Directory:
/1-bday/
Usage
$ ./bdaycardgen.sh --help
Usage: bdaycardgen.sh <BIRTHDAY_PERSON_NAME> <BIRTHDAY_PERSON_AGE> <CARD_SENDER_NAME>
bdaycardgen.sh is a script for generating birthday cards easily on the command line.
Examples:
bdaycardgen.sh "Birthday Child" 13 "Dad"
bdaycardgen.sh "Best Friend" 25 "Your Pal"
Running the script will output text for a birthday card to stdout.
Included Files
- bdaycardgen.sh: The birthday card generator itself
- tests/test.sh: Unit tests for the bdaycardgen.sh script
- outputs/testoutput1.txt: Example output when bdaycardgen.sh is run with
$ bdaycardgen.sh "Generic Name" 13 "Generic Sender"
Testing
Inside the tests/ directory, you will find unit tests for this script. It uses the testing framework shunit2.
If you are accessing this script through the Git repository, simply ensure that you have also cloned submodules by running git submodule update --init --recursive
then simply run tests/test.sh
.
If you received this software on its own and not through the Git repo, you will need to follow the instructions below to setup shunit2 first.
Testing without repo
Run the following commands to get shunit2 then run the tests with that instance of shunit2.
git clone https://github.com/kward/shunit2
SHUNIT2="shunit2/shunit2" tests/test.sh