Mercurial > vim
annotate src/testdir/test_profile.vim @ 10599:2748b23db6bb v8.0.0189
patch 8.0.0189: profile commands are not tested
commit https://github.com/vim/vim/commit/296b1f28ca9cedeb55872f306808b2214b519ce7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 15 15:22:33 2017 +0100
patch 8.0.0189: profile commands are not tested
Problem: There are no tests for the :profile command.
Solution: Add tests. (Dominique Pelle, closes https://github.com/vim/vim/issues/1383)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 15 Jan 2017 15:30:04 +0100 |
parents | |
children | 302aedeed8c9 |
rev | line source |
---|---|
10599
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test Vim profiler |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 if !has('profile') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 finish |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 endif |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 func Test_profile_func() |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 if !has('unix') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 return |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 endif |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 let lines = [ |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 \ "func! Foo1()", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 \ "endfunc", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 \ "func! Foo2()", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 \ " let count = 100", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 \ " while count > 0", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 \ " let count = count - 1", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 \ " endwhile", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 \ "endfunc", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 \ "func! Foo3()", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 \ "endfunc", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 \ "func! Bar()", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 \ "endfunc", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 \ "call Foo1()", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 \ "call Foo1()", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 \ "profile pause", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 \ "call Foo1()", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 \ "profile continue", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 \ "call Foo2()", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 \ "call Foo3()", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 \ "call Bar()", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 \ "if !v:profiling", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 \ " delfunc Foo2", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 \ "endif", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 \ "delfunc Foo3", |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 \ ] |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 call writefile(lines, 'Xprofile_func.vim') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 let a = system(v:progpath |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 \ . " -u NONE -i NONE --noplugin" |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 \ . " -c 'profile start Xprofile_func.log'" |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 \ . " -c 'profile func Foo*'" |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 \ . " -c 'so Xprofile_func.vim'" |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 \ . " -c 'qall!'") |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 let lines = readfile('Xprofile_func.log') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 call assert_equal(28, len(lines)) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 call assert_equal('FUNCTION Foo1()', lines[0]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 call assert_equal('Called 2 times', lines[1]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 call assert_equal('FUNCTION Foo2()', lines[7]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 call assert_equal('Called 1 time', lines[8]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 " - Foo1() is called 3 times but should be reported as called twice |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 " since one call is in between "profile pause" .. "profile continue". |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 " - Foo2() should come before Foo1() since Foo1() does much more work.\ |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 " - Foo3() is not reported because function is deleted. |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 " - Unlike Foo3(), Foo2() should not be deleted since there is a check |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 " for v:profiling. |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 " - Bar() is not reported since it does not match "profile func Foo*". |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[18]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 call assert_equal('count total (s) self (s) function', lines[19]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[20]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[21]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 call assert_equal('', lines[22]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[23]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 call assert_equal('count total (s) self (s) function', lines[24]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo2()$', lines[25]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 call assert_match('^\s*2\s\+\d\+\.\d\+\s\+Foo1()$', lines[26]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 call assert_equal('', lines[27]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
71 call delete('Xprofile_func.vim') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 call delete('Xprofile_func.log') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
73 endfunc |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 func Test_profile_file() |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 if !has('unix') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 return |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 endif |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 let lines = [ |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 \ 'func! Foo()', |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 \ 'endfunc', |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 \ 'for i in range(10)', |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 \ ' " a comment', |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 \ ' call Foo()', |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 \ 'endfor', |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 \ 'call Foo()', |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 \ ] |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 call writefile(lines, 'Xprofile_file.vim') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
90 let a = system(v:progpath |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
91 \ . " -u NONE -i NONE --noplugin" |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
92 \ . " -c 'profile start Xprofile_file.log'" |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
93 \ . " -c 'profile file Xprofile_file.vim'" |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
94 \ . " -c 'so Xprofile_file.vim'" |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
95 \ . " -c 'so Xprofile_file.vim'" |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 \ . " -c 'qall!'") |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
98 let lines = readfile('Xprofile_file.log') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
100 call assert_equal(14, len(lines)) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
101 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
102 call assert_match('^SCRIPT .*Xprofile_file.vim$', lines[0]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 call assert_equal('Sourced 2 times', lines[1]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[2]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
105 call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[3]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
106 call assert_equal('', lines[4]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
107 call assert_equal('count total (s) self (s)', lines[5]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
108 call assert_equal(' func! Foo()', lines[6]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
109 call assert_equal(' endfunc', lines[7]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 " Loop iterates 10 times. Since script runs twice, body executes 20 times. |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
111 " First line of loop executes one more time than body to detect end of loop. |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 call assert_match('^\s*22\s\+\d\+\.\d\+\s\+for i in range(10)$', lines[8]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 call assert_equal(' " a comment', lines[9]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
114 call assert_match('^\s*20\s\+\d\+\.\d\+\s\+\d\+\.\d\+\s\+call Foo()$', lines[10]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 call assert_match('^\s*20\s\+\d\+\.\d\+\s\+endfor$', lines[11]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 call assert_match('^\s*2\s\+\d\+\.\d\+\s\+\d\+\.\d\+\s\+call Foo()$', lines[12]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
117 call assert_equal('', lines[13]) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
118 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
119 call delete('Xprofile_file.vim') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
120 call delete('Xprofile_file.log') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
121 endfunc |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
122 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
123 func Test_profile_completion() |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
124 call feedkeys(":profile \<C-A>\<C-B>\"\<CR>", 'tx') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
125 call assert_equal('"profile continue file func pause start', @:) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
126 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
127 call feedkeys(":profile start test_prof\<C-A>\<C-B>\"\<CR>", 'tx') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
128 call assert_match('^"profile start.* test_profile\.vim', @:) |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
129 endfunc |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
130 |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
131 func Test_profile_errors() |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
132 call assert_fails("profile func Foo", 'E750:') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
133 call assert_fails("profile pause", 'E750:') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
134 call assert_fails("profile continue", 'E750:') |
2748b23db6bb
patch 8.0.0189: profile commands are not tested
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
135 endfunc |