Blame view
tests/bundle-syntaxes.t
2.06 KB
|
aea2f87bd
|
1 |
Test helper function. |
|
fe44337cb
|
2 |
|
|
aea2f87bd
|
3 4 5 6 |
$ b () {
> bundle "$@"
> bundle-list | tail -1
> }
|
|
fe44337cb
|
7 8 9 10 |
Short and sweet.
$ b plugin-name
|
|
fe44337cb
|
11 12 13 14 15 |
plugin-name https://github.com/robbyrussell/oh-my-zsh.git plugins/plugin-name
Short repo url.
$ b github-username/repo-name
|
|
fe44337cb
|
16 17 18 19 20 |
repo-name https://github.com/github-username/repo-name.git /
Short repo url with `.git` suffix.
$ b github-username/repo-name.git
|
|
fe44337cb
|
21 22 23 24 25 |
repo-name https://github.com/github-username/repo-name.git /
Long repo url.
$ b https://github.com/user/repo.git
|
|
fe44337cb
|
26 27 28 29 30 |
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
|
31 32 33 34 35 |
repo https://github.com/user/repo /
Short repo with location.
$ b user/plugin path/to/plugin
|
|
fe44337cb
|
36 37 38 39 40 |
plugin https://github.com/user/plugin.git path/to/plugin
Short repo with location and name.
$ b user/repo plugin/path plugin-name
|
|
fe44337cb
|
41 42 43 |
plugin-name https://github.com/user/repo.git plugin/path Long repo with location and name. |
|
02f4901c5
|
44 |
$ b https://github.com/user/repo.git plugin/path plugin-name |
|
fe44337cb
|
45 46 47 48 49 |
plugin-name https://github.com/user/repo.git plugin/path
Keyword arguments, in respective places.
$ b --url=user/repo --loc=path/of/plugin --name=plugin-name
|
|
fe44337cb
|
50 51 52 53 54 |
plugin-name https://github.com/user/repo.git path/of/plugin
Keyword arguments, in respective places, with full repo url.
$ b --url=https://github.com/user/repo.git --loc=plugin/path --name=name
|
|
fe44337cb
|
55 56 57 58 59 |
name https://github.com/user/repo.git plugin/path
Keyword arguments, in reversed order.
$ b --name=plugin-name --loc=path/of/plugin --url=user/repo
|
|
fe44337cb
|
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
plugin-name https://github.com/user/repo.git path/of/plugin
Mixed positional and keyword arguments, and skip `loc`.
$ b user/repo --name=plugin
plugin https://github.com/user/repo.git /
Just `loc`, using keyword arguments.
$ b --loc=plugin/path
path https://github.com/robbyrussell/oh-my-zsh.git plugin/path
Just `name`, using keyword arguments.
$ b --name=robby-oh-my-zsh
robby-oh-my-zsh https://github.com/robbyrussell/oh-my-zsh.git /
|
|
02f4901c5
|
76 77 |
TODO: Error reporting with erroneous arguments or usage with incorrect syntax. |