Blame view

tests/bundle-syntaxes.t 2.16 KB
fe44337cb   Shrikant Sharat   Add test file for...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  Helper aliases.
  
    $ alias b=bundle
    $ alias lb='bundle-list | tail -1' # lb = last bundle
  
  Short and sweet.
  
    $ b plugin-name
    $ lb
    plugin-name https://github.com/robbyrussell/oh-my-zsh.git plugins/plugin-name
  
  Short repo url.
  
    $ b github-username/repo-name
    $ lb
    repo-name https://github.com/github-username/repo-name.git /
  
  Short repo url with `.git` suffix.
  
    $ b github-username/repo-name.git
    $ lb
    repo-name https://github.com/github-username/repo-name.git /
  
  Long repo url.
  
    $ b https://github.com/user/repo.git
    $ lb
    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
    $ lb
    repo https://github.com/user/repo /
  
  Short repo with location.
  
    $ b user/plugin path/to/plugin
    $ lb
    plugin https://github.com/user/plugin.git path/to/plugin
  
  Short repo with location and name.
  
    $ b user/repo plugin/path plugin-name
    $ lb
    plugin-name https://github.com/user/repo.git plugin/path
  
  Long repo with location and name.
02f4901c5   Shrikant Sharat   Tests for all val...
49
    $ b https://github.com/user/repo.git plugin/path plugin-name
fe44337cb   Shrikant Sharat   Add test file for...
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
    $ lb
    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
    $ lb
    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
    $ lb
    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
    $ lb
    plugin-name https://github.com/user/repo.git path/of/plugin
  
  Mixed positional and keyword arguments, and skip `loc`.
  
    $ b user/repo --name=plugin
02f4901c5   Shrikant Sharat   Tests for all val...
74
    $ lb
fe44337cb   Shrikant Sharat   Add test file for...
75
76
77
78
79
    plugin https://github.com/user/repo.git /
  
  Just `loc`, using keyword arguments.
  
    $ b --loc=plugin/path
02f4901c5   Shrikant Sharat   Tests for all val...
80
    $ lb
fe44337cb   Shrikant Sharat   Add test file for...
81
82
83
84
85
    path https://github.com/robbyrussell/oh-my-zsh.git plugin/path
  
  Just `name`, using keyword arguments.
  
    $ b --name=robby-oh-my-zsh
02f4901c5   Shrikant Sharat   Tests for all val...
86
    $ lb
fe44337cb   Shrikant Sharat   Add test file for...
87
    robby-oh-my-zsh https://github.com/robbyrussell/oh-my-zsh.git /
02f4901c5   Shrikant Sharat   Tests for all val...
88
89
  
  TODO: Error reporting with erroneous arguments or usage with incorrect syntax.