File: heading_get_text.vader

package info (click to toggle)
vim-link-vim 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 524 kB
  • sloc: python: 66; makefile: 30
file content (49 lines) | stat: -rw-r--r-- 1,513 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
Before:
  unlet! g:link_heading
  unlet! b:link_heading
After:
  unlet! g:link_heading
  unlet! b:link_heading

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Given markdown:
Execute (Use default heading (Markdown)):
  let expected = '## Links'
  let actual = linkvim#x#heading#get_text()
  AssertEqual expected, actual

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Given mail:
Execute (Use default heading (mail)):
  let expected = 'Links:'
  let actual = linkvim#x#heading#get_text()
  AssertEqual expected, actual

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Execute (Modify global heading):
  let g:link_heading = '# My Resources'
  let expected = g:link_heading
  let actual = linkvim#x#heading#get_text()
  AssertEqual expected, actual

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Execute (Modify buffer-local heading):
  let b:link_heading = 'My Links:'
  let expected = b:link_heading
  let actual = linkvim#x#heading#get_text()
  AssertEqual expected, actual

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Execute (Modify global and buffer-local heading):
  let b:link_heading = 'My Links:'
  let g:link_heading = '# My Resources'
  let expected = b:link_heading
  let actual = linkvim#x#heading#get_text()
  AssertEqual expected, actual

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~