Added test instructions

This commit is contained in:
Ryan Caloras 2014-12-14 20:34:56 -05:00
parent 3b18322a5d
commit 3c029d8548

View file

@ -34,9 +34,17 @@ precmd_hello_two() { echo "This is invoked on precmd second"; }
precmd_functions+=(precmd_hello_one)
precmd_functions+=(precmd_hello_two)
```
###Tests
You can run tests using https://github.com/sstephenson/bats.
```bash
bats test
```
Should output something like:
```bash
elementz@Kashmir:~/git/bash-preexec(master)$ bats test
✓ No functions defined for preexec should simply return
✓ precmd should execute a function once
✓ preexec should execute a function with the last command in our history
✓ preexec should execute multiple functions in the order added to their arrays
✓ preecmd should execute multiple functions in the order added to their arrays
```