Mercurial > vim
annotate src/testdir/test_input.vim @ 33333:fed9c5ffde42
patch 9.0.1931: make test_compilers fails on ubuntu
Commit: https://github.com/vim/vim/commit/ca0ffc0d63727850c520a80929698e4c199b17f4
Author: Dominique Pell? <dominique.pelle@tomtom.com>
Date: Sun Sep 24 22:57:41 2023 +0200
patch 9.0.1931: make test_compilers fails on ubuntu
Problem: make test_compilers fails on ubuntu
Solution: set LC_ALL=C
fix: make test_compiler failed on xubuntu 22.04.3
Problem: 'make test_compiler' failed on Linux xubuntu 22.04.3 but
succeeded on e.g. macOS. To reproduce:
```
$ ./configure --with-features=huge --enable-gui=no --enable-perlinterp=yes
$ make -j12
$ cd vim/src/testdir
$ make test_compiler
...snip...
Found errors in Test_compiler():
command line..script /home/dope/sb/vim/src/testdir/runtest.vim[601]..function RunTheTest[54]..Test_compiler line 24: command did not fail: clist
command line..script /home/dope/sb/vim/src/testdir/runtest.vim[601]..function RunTheTest[54]..Test_compiler line 30: Pattern '\\n \\d\\+ Xfoo.pl:3: Global symbol "$foo" requires explicit package name' does not match '\n19 Xfoo.pl:3: Global symbol "$foo" requires explicit package name (did you forget to declare "my $foo"?)'
make: *** [Makefile:70: test_compiler] Error 1
```
Solution: set `LC_ALL` to "C" in `Test_compiler()`
closes: #13173
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pell? <dominique.pelle@tomtom.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 24 Sep 2023 23:00:04 +0200 |
parents | 5da38c4ffe92 |
children |
rev | line source |
---|---|
29434
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
1 " Tests for character input and feedkeys() function. |
8485
675ec6cc9021
commit https://github.com/vim/vim/commit/74c5bbf13435a7ab1e3461078bbcb1200f0451e1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
675ec6cc9021
commit https://github.com/vim/vim/commit/74c5bbf13435a7ab1e3461078bbcb1200f0451e1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 func Test_feedkeys_x_with_empty_string() |
675ec6cc9021
commit https://github.com/vim/vim/commit/74c5bbf13435a7ab1e3461078bbcb1200f0451e1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 new |
675ec6cc9021
commit https://github.com/vim/vim/commit/74c5bbf13435a7ab1e3461078bbcb1200f0451e1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 call feedkeys("ifoo\<Esc>") |
675ec6cc9021
commit https://github.com/vim/vim/commit/74c5bbf13435a7ab1e3461078bbcb1200f0451e1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 call assert_equal('', getline('.')) |
675ec6cc9021
commit https://github.com/vim/vim/commit/74c5bbf13435a7ab1e3461078bbcb1200f0451e1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 call feedkeys('', 'x') |
675ec6cc9021
commit https://github.com/vim/vim/commit/74c5bbf13435a7ab1e3461078bbcb1200f0451e1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 call assert_equal('foo', getline('.')) |
8808
6b70b9cdebfc
commit https://github.com/vim/vim/commit/9bd547aca41799605c3a3f83444f6725c2d6eda9
Christian Brabandt <cb@256bit.org>
parents:
8485
diff
changeset
|
9 |
6b70b9cdebfc
commit https://github.com/vim/vim/commit/9bd547aca41799605c3a3f83444f6725c2d6eda9
Christian Brabandt <cb@256bit.org>
parents:
8485
diff
changeset
|
10 " check it goes back to normal mode immediately. |
6b70b9cdebfc
commit https://github.com/vim/vim/commit/9bd547aca41799605c3a3f83444f6725c2d6eda9
Christian Brabandt <cb@256bit.org>
parents:
8485
diff
changeset
|
11 call feedkeys('i', 'x') |
6b70b9cdebfc
commit https://github.com/vim/vim/commit/9bd547aca41799605c3a3f83444f6725c2d6eda9
Christian Brabandt <cb@256bit.org>
parents:
8485
diff
changeset
|
12 call assert_equal('foo', getline('.')) |
8485
675ec6cc9021
commit https://github.com/vim/vim/commit/74c5bbf13435a7ab1e3461078bbcb1200f0451e1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 quit! |
675ec6cc9021
commit https://github.com/vim/vim/commit/74c5bbf13435a7ab1e3461078bbcb1200f0451e1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 endfunc |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
8808
diff
changeset
|
15 |
26875
e06cbcf4b94b
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
16 func Test_feedkeys_with_abbreviation() |
e06cbcf4b94b
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
17 new |
e06cbcf4b94b
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
18 inoreabbrev trigger value |
e06cbcf4b94b
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
19 call feedkeys("atrigger ", 'x') |
e06cbcf4b94b
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
20 call feedkeys("atrigger ", 'x') |
e06cbcf4b94b
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
21 call assert_equal('value value ', getline(1)) |
e06cbcf4b94b
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
22 bwipe! |
e06cbcf4b94b
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
23 iunabbrev trigger |
e06cbcf4b94b
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
24 endfunc |
e06cbcf4b94b
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
25 |
28668
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
26 func Test_feedkeys_escape_special() |
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
27 nnoremap … <Cmd>let g:got_ellipsis += 1<CR> |
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
28 call feedkeys('…', 't') |
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
29 call assert_equal('…', getcharstr()) |
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
30 let g:got_ellipsis = 0 |
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
31 call feedkeys('…', 'xt') |
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
32 call assert_equal(1, g:got_ellipsis) |
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
33 unlet g:got_ellipsis |
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
34 nunmap … |
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
35 endfunc |
53c608c7ea9e
patch 8.2.4858: K_SPECIAL may be escaped twice
Bram Moolenaar <Bram@vim.org>
parents:
26875
diff
changeset
|
36 |
29434
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
37 func Test_input_simplify_ctrl_at() |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
38 new |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
39 " feeding unsimplified CTRL-@ should still trigger i_CTRL-@ |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
40 call feedkeys("ifoo\<Esc>A\<*C-@>x", 'xt') |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
41 call assert_equal('foofo', getline(1)) |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
42 bw! |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
43 endfunc |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
44 |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
45 func Test_input_simplify_noremap() |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
46 call feedkeys("i\<*C-M>", 'nx') |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
47 call assert_equal('', getline(1)) |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
48 call assert_equal([0, 2, 1, 0, 1], getcurpos()) |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
49 bw! |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
50 endfunc |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
51 |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
52 func Test_input_simplify_timedout() |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
53 inoremap <C-M>a b |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
54 call feedkeys("i\<*C-M>", 'xt') |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
55 call assert_equal('', getline(1)) |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
56 call assert_equal([0, 2, 1, 0, 1], getcurpos()) |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
57 iunmap <C-M>a |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
58 bw! |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
59 endfunc |
5da38c4ffe92
patch 9.0.0059: test file has wrong name
Bram Moolenaar <Bram@vim.org>
parents:
28668
diff
changeset
|
60 |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
8808
diff
changeset
|
61 " vim: shiftwidth=2 sts=2 expandtab |