Blame view

tests/bundle-syntaxes.t 1.67 KB
72c01604f   Shrikant Sharat   Skip the legacy t...
1
2
3
  Skip test.
  
    $ exit 80
968db0671   Shrikant Sharat   Trying to get tes...
4
  Test helper and mock functions.
fe44337cb   Shrikant Sharat   Add test file for...
5

968db0671   Shrikant Sharat   Trying to get tes...
6
7
8
    $ git () {
    >     echo git "$@"
    > }
aea2f87bd   Shrikant Sharat   Refactor bundle t...
9
10
11
12
    $ b () {
    >     bundle "$@"
    >     bundle-list | tail -1
    > }
fe44337cb   Shrikant Sharat   Add test file for...
13
14
  
  Short and sweet.
968db0671   Shrikant Sharat   Trying to get tes...
15
    $ b lol
fe44337cb   Shrikant Sharat   Add test file for...
16
17
18
19
20
    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...
21
22
23
24
25
    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...
26
27
28
29
30
    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...
31
32
33
34
35
    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...
36
37
38
39
40
    repo https://github.com/user/repo /
  
  Short repo with location.
  
    $ b user/plugin path/to/plugin
fe44337cb   Shrikant Sharat   Add test file for...
41
    plugin https://github.com/user/plugin.git path/to/plugin
fe44337cb   Shrikant Sharat   Add test file for...
42
  Keyword arguments, in respective places.
968db0671   Shrikant Sharat   Trying to get tes...
43
    $ b --url=user/repo --loc=path/of/plugin
fe44337cb   Shrikant Sharat   Add test file for...
44
45
46
    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...
47
    $ b --url=https://github.com/user/repo.git --loc=plugin/path
fe44337cb   Shrikant Sharat   Add test file for...
48
49
50
    name https://github.com/user/repo.git plugin/path
  
  Keyword arguments, in reversed order.
968db0671   Shrikant Sharat   Trying to get tes...
51
    $ b --loc=path/of/plugin --url=user/repo
fe44337cb   Shrikant Sharat   Add test file for...
52
53
54
    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...
55
56
    $ b user/repo --loc=plugin/loc
    plugin https://github.com/user/repo.git plugin/loc
fe44337cb   Shrikant Sharat   Add test file for...
57
58
59
60
61
  
  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...
62
  TODO: Error reporting with erroneous arguments or usage with incorrect syntax.