Commit 942a7e4d88b25b096bf117c9107f468c0ce70687
1 parent
387fbc4d4b
Added more tests for the `-use` command.
Showing 1 changed file with 29 additions and 13 deletions Inline Diff
tests/use.t
1 | Load unknown library. | 1 | Use unknown library. |
2 | 2 | ||
3 | $ antigen-use unknown | 3 | $ antigen-use unknown |
4 | Antigen currently supports only following libraries: | 4 | Usage: antigen-use <library-name> |
5 | Where <library-name> is any one of the following: | ||
5 | * oh-my-zsh | 6 | * oh-my-zsh |
6 | * prezto | 7 | * prezto |
7 | [1] | 8 | [1] |
8 | 9 | ||
9 | # Fixme: loading prezto or oh-my-zsh library breaks all the tests. | 10 | Missing argument. |
10 | # | 11 | |
11 | # Load prezto library. | 12 | $ antigen-use |
12 | # | 13 | Usage: antigen-use <library-name> |
13 | # $ antigen-use prezto &> /dev/null | 14 | Where <library-name> is any one of the following: |
14 | # $ antigen-bundle git &> /dev/null | 15 | * oh-my-zsh |
15 | # | 16 | * prezto |
16 | # Load oh-my-zsh library. | 17 | [1] |
17 | # | 18 | |
18 | # $ antigen-use oh-my-zsh &> /dev/null | 19 | Mock out the library loading functions. |
19 | # $ antigen-bundle git &> /dev/null | 20 | |
21 | $ -antigen-use-oh-my-zsh () { echo Using oh-my-zsh. } | ||
22 | $ -antigen-use-prezto () { echo Using prezto. } | ||
23 | |||
24 | Note: We lack tests for these internal functions. I'm not sure how feasible | ||
25 | testing them is given they most certainly use the network. | ||
26 | |||
27 | Use oh-my-zsh library. | ||
28 | |||
29 | $ antigen-use oh-my-zsh | ||
30 | Using oh-my-zsh. | ||
31 | |||
32 | Use prezto library. | ||
33 | |||
34 | $ antigen-use prezto | ||
35 | Using prezto. | ||
20 | 36 |