Blame view

tests/bundle-syntaxes.t 1.64 KB
968db0671   Shrikant Sharat   Trying to get tes...
1
  Test helper and mock functions.
fe44337cb   Shrikant Sharat   Add test file for...
2

968db0671   Shrikant Sharat   Trying to get tes...
3
4
5
    $ git () {
    >     echo git "$@"
    > }
aea2f87bd   Shrikant Sharat   Refactor bundle t...
6
7
8
9
    $ b () {
    >     bundle "$@"
    >     bundle-list | tail -1
    > }
fe44337cb   Shrikant Sharat   Add test file for...
10
11
  
  Short and sweet.
968db0671   Shrikant Sharat   Trying to get tes...
12
    $ b lol
fe44337cb   Shrikant Sharat   Add test file for...
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   Shrikant Sharat   Add test file for...
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   Shrikant Sharat   Add test file for...
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   Shrikant Sharat   Add test file for...
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   Shrikant Sharat   Add test file for...
33
34
35
36
37
    repo https://github.com/user/repo /
  
  Short repo with location.
  
    $ b user/plugin path/to/plugin
fe44337cb   Shrikant Sharat   Add test file for...
38
    plugin https://github.com/user/plugin.git path/to/plugin
fe44337cb   Shrikant Sharat   Add test file for...
39
  Keyword arguments, in respective places.
968db0671   Shrikant Sharat   Trying to get tes...
40
    $ b --url=user/repo --loc=path/of/plugin
fe44337cb   Shrikant Sharat   Add test file for...
41
42
43
    plugin-name https://github.com/user/repo.git path/of/plugin
  
  Keyword arguments, in respective places, with full repo url.
968db0671   Shrikant Sharat   Trying to get tes...
44
    $ b --url=https://github.com/user/repo.git --loc=plugin/path
fe44337cb   Shrikant Sharat   Add test file for...
45
46
47
    name https://github.com/user/repo.git plugin/path
  
  Keyword arguments, in reversed order.
968db0671   Shrikant Sharat   Trying to get tes...
48
    $ b --loc=path/of/plugin --url=user/repo
fe44337cb   Shrikant Sharat   Add test file for...
49
50
51
    plugin-name https://github.com/user/repo.git path/of/plugin
  
  Mixed positional and keyword arguments, and skip `loc`.
968db0671   Shrikant Sharat   Trying to get tes...
52
53
    $ b user/repo --loc=plugin/loc
    plugin https://github.com/user/repo.git plugin/loc
fe44337cb   Shrikant Sharat   Add test file for...
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   Shrikant Sharat   Tests for all val...
59
  TODO: Error reporting with erroneous arguments or usage with incorrect syntax.