Blame view
tests/bundle-syntaxes.t
1.64 KB
|
968db0671
|
1 |
Test helper and mock functions. |
|
fe44337cb
|
2 |
|
|
968db0671
|
3 4 5 |
$ git () {
> echo git "$@"
> }
|
|
aea2f87bd
|
6 7 8 9 |
$ b () {
> bundle "$@"
> bundle-list | tail -1
> }
|
|
fe44337cb
|
10 11 |
Short and sweet. |
|
968db0671
|
12 |
$ b lol |
|
fe44337cb
|
13 14 15 16 17 |
plugin-name https://github.com/robbyrussell/oh-my-zsh.git plugins/plugin-name
Short repo url.
$ b github-username/repo-name
|
|
fe44337cb
|
18 19 20 21 22 |
repo-name https://github.com/github-username/repo-name.git /
Short repo url with `.git` suffix.
$ b github-username/repo-name.git
|
|
fe44337cb
|
23 24 25 26 27 |
repo-name https://github.com/github-username/repo-name.git /
Long repo url.
$ b https://github.com/user/repo.git
|
|
fe44337cb
|
28 29 30 31 32 |
repo https://github.com/user/repo.git /
Long repo url with missing `.git` suffix (should'nt add the suffix).
$ b https://github.com/user/repo
|
|
fe44337cb
|
33 34 35 36 37 |
repo https://github.com/user/repo /
Short repo with location.
$ b user/plugin path/to/plugin
|
|
fe44337cb
|
38 |
plugin https://github.com/user/plugin.git path/to/plugin |
|
fe44337cb
|
39 |
Keyword arguments, in respective places. |
|
968db0671
|
40 |
$ b --url=user/repo --loc=path/of/plugin |
|
fe44337cb
|
41 42 43 |
plugin-name https://github.com/user/repo.git path/of/plugin Keyword arguments, in respective places, with full repo url. |
|
968db0671
|
44 |
$ b --url=https://github.com/user/repo.git --loc=plugin/path |
|
fe44337cb
|
45 46 47 |
name https://github.com/user/repo.git plugin/path Keyword arguments, in reversed order. |
|
968db0671
|
48 |
$ b --loc=path/of/plugin --url=user/repo |
|
fe44337cb
|
49 50 51 |
plugin-name https://github.com/user/repo.git path/of/plugin Mixed positional and keyword arguments, and skip `loc`. |
|
968db0671
|
52 53 |
$ b user/repo --loc=plugin/loc
plugin https://github.com/user/repo.git plugin/loc
|
|
fe44337cb
|
54 55 56 57 58 |
Just `loc`, using keyword arguments.
$ b --loc=plugin/path
path https://github.com/robbyrussell/oh-my-zsh.git plugin/path
|
|
02f4901c5
|
59 |
TODO: Error reporting with erroneous arguments or usage with incorrect syntax. |