mirror of
https://github.com/rcaloras/bash-preexec.git
synced 2026-11-03 22:49:41 -09:00
Added test instructions
This commit is contained in:
parent
3b18322a5d
commit
3c029d8548
1 changed files with 14 additions and 6 deletions
20
README.md
20
README.md
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue