Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests #11

Closed
wants to merge 1 commit into from
Closed

Add tests #11

wants to merge 1 commit into from

Conversation

adnan360
Copy link

Add tests based on bats, a TAP-compliant testing framework for bash. Requires: bats package (available on Debian/Arch repos) and then tests/run.sh to run the tests (instructions on readme as well).

Should fix #10

Example output:

1..15
ok 1 Single brackets test
ok 2 Single brackets with basic math test
ok 3 Exponent in bracket with math test
not ok 4 2 levels of brackets test
# (in test file tests/pemdas.bats, line 22)
#   `[ "$result" -eq 6 ]' failed
not ok 5 3 levels of brackets test
# (in test file tests/pemdas.bats, line 27)
#   `[ "$result" -eq 8 ]' failed
ok 6 Multiple digits without bracket first test
ok 7 Multiple digits without bracket second test
ok 8 Multiple digits with bracket and operations test
ok 9 Addition test
ok 10 Subtraction test
ok 11 Multiplication test
ok 12 Division test
ok 13 Division with remainder test
ok 14 Exponent test
ok 15 Decimal not supported error test

The 2 failed tests are due to this which will probably be fixed soon and it will pass.

Add tests based on bats, a TAP-compliant testing framework for bash
@adnan360
Copy link
Author

Closing this since bash based testing system is working fine and can do the same thing without dependencies.

@adnan360 adnan360 closed this Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement tests
1 participant