File: user-command-test

package info (click to toggle)
tig 2.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,188 kB
  • sloc: ansic: 36,941; sh: 10,934; makefile: 394
file content (59 lines) | stat: -rwxr-xr-x 1,773 bytes parent folder | download
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
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh

. libtest.sh

export COLUMNS=100

tigrc <<EOF
bind generic a !?@user-test-cmd
bind generic b ?@user-test-cmd
bind generic c !?user-test-cmd
bind generic d !user-test-cmd
bind generic ca !?@git commit --amend --no-edit
source $base_dir/../contrib/vim.tigrc
EOF

steps '
	:view-help
	/user-test-cmd<Enter>
	?toggle author<Enter>
	:save-display default.screen
'

stdin <<EOF
test
EOF

test_tig

assert_equals 'default.screen' <<EOF
                             oa :toggle author
                             og :toggle line-graphics
                             of :toggle file-name
                             op :toggle ignore-space
                             oi :toggle id
                             ot :toggle commit-title-overflow
                             oF :toggle file-filter
                             or :toggle commit-title-refs
                             @- :toggle diff-context -1
                             @+ :toggle diff-context +1
Internal commands:
                             @j :/^@@
                             @k :?^@@
External commands:
                              a @?user-test-cmd
                              b @?user-test-cmd
                              d !user-test-cmd
                             cc !git commit
                             ca @?git commit --amend --no-edit
[-] search bindings
View manipulation
                       <Ctrl-C> view-close          Close the current view
Searching
     <Down>, <Ctrl-N>, <Ctrl-J> find-next           Find next search match
       <Up>, <Ctrl-P>, <Ctrl-K> find-prev           Find previous search match
[+] main bindings
[+] diff bindings
[+] reflog bindings
[help] - line 83 of 134                                                                          82%
EOF