Commit 942a7e4d88b25b096bf117c9107f468c0ce70687
1 parent
387fbc4d4b
Added more tests for the `-use` command.
Showing 1 changed file with 29 additions and 13 deletions Side-by-side Diff
tests/use.t
1 | -Load unknown library. | |
1 | +Use unknown library. | |
2 | 2 | |
3 | 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 | 6 | * oh-my-zsh |
6 | 7 | * prezto |
7 | 8 | [1] |
8 | 9 | |
9 | -# Fixme: loading prezto or oh-my-zsh library breaks all the tests. | |
10 | -# | |
11 | -# Load prezto library. | |
12 | -# | |
13 | -# $ antigen-use prezto &> /dev/null | |
14 | -# $ antigen-bundle git &> /dev/null | |
15 | -# | |
16 | -# Load oh-my-zsh library. | |
17 | -# | |
18 | -# $ antigen-use oh-my-zsh &> /dev/null | |
19 | -# $ antigen-bundle git &> /dev/null | |
10 | +Missing argument. | |
11 | + | |
12 | + $ antigen-use | |
13 | + Usage: antigen-use <library-name> | |
14 | + Where <library-name> is any one of the following: | |
15 | + * oh-my-zsh | |
16 | + * prezto | |
17 | + [1] | |
18 | + | |
19 | +Mock out the library loading functions. | |
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. |