-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathgv.vader
More file actions
29 lines (26 loc) · 1.5 KB
/
Copy pathgv.vader
File metadata and controls
29 lines (26 loc) · 1.5 KB
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
Execute (Test gv#shellwords):
AssertEqual [], gv#shellwords('')
AssertEqual ['foo', 'bar'], gv#shellwords('foo bar')
AssertEqual ['foo bar'], gv#shellwords("'foo bar'")
AssertEqual ['foo bar'], gv#shellwords('"foo bar"')
AssertEqual ['foo bar'], gv#shellwords('"foo "'' bar''')
AssertEqual ['foo bar'], gv#shellwords('''foo ''" bar"')
AssertEqual ['foo bar'], gv#shellwords("'foo '' bar'")
AssertEqual ['foo bar'], gv#shellwords('"foo "" bar"')
AssertEqual ['foo bar'], gv#shellwords('foo\ \ bar')
AssertEqual ['foo " bar'], gv#shellwords('"foo \" bar"')
AssertEqual ['foo " bar', 'baz'], gv#shellwords("'foo \" bar' baz")
AssertEqual ['foo', 'bar baz'], gv#shellwords("'foo' 'bar baz'")
AssertEqual ['--'], gv#shellwords('--')
AssertEqual ['--'], gv#shellwords('"--"')
Execute (Test gv#sha):
AssertEqual '33d2a88', gv#sha('* 2016-06-18 33d2a88 Let fugitive add buffer-local Git command to GV buffer (Junegunn Choi)')
AssertEqual '4990bce', gv#sha('| * 2016-03-05 4990bce <nomodeline> (Justin M. Keyes)')
AssertEqual '', gv#sha('|/| | | ')
AssertEqual 'fb213582e6', gv#sha('| * | | 2017-02-27 fb213582e6 fix typo retries (timchenxiaoyu)')
AssertEqual '', gv#sha(' ')
AssertEqual '', gv#sha('')
Given (line text):
| * | | 2017-02-27 fb213582e6 fix typo retries (timchenxiaoyu)
Execute:
AssertEqual 'fb213582e6', gv#sha()