annotate src/testdir/setup.vim @ 32570:5d8cff99a027 v9.0.1617

patch 9.0.1617: charidx() result is not consistent with byteidx() Commit: https://github.com/vim/vim/commit/577922b917e48285a7a312daf7b5bbc6e272939c Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Jun 8 17:09:45 2023 +0100 patch 9.0.1617: charidx() result is not consistent with byteidx() Problem: charidx() and utf16idx() result is not consistent with byteidx(). Solution: When the index is equal to the length of the text return the lenght of the text instead of -1. (Yegappan Lakshmanan, closes #12503)
author Bram Moolenaar <Bram@vim.org>
date Thu, 08 Jun 2023 18:15:04 +0200
parents dbec60b8c253
children 852040d9b096
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9501
f0201deac2a2 commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Common preparations for running tests.
f0201deac2a2 commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
11852
825a4717f14a patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents: 11850
diff changeset
3 " Only load this once.
825a4717f14a patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents: 11850
diff changeset
4 if 1
31241
ee50174810ac patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled
Bram Moolenaar <Bram@vim.org>
parents: 12331
diff changeset
5
ee50174810ac patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled
Bram Moolenaar <Bram@vim.org>
parents: 12331
diff changeset
6 " When using xterm version 377 the response to the modifyOtherKeys status
ee50174810ac patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled
Bram Moolenaar <Bram@vim.org>
parents: 12331
diff changeset
7 " interferes with some tests. Remove the request from the t_TI termcap
ee50174810ac patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled
Bram Moolenaar <Bram@vim.org>
parents: 12331
diff changeset
8 " entry.
ee50174810ac patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled
Bram Moolenaar <Bram@vim.org>
parents: 12331
diff changeset
9 let &t_TI = substitute(&t_TI, "\<Esc>\\[?4m", '', '')
ee50174810ac patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled
Bram Moolenaar <Bram@vim.org>
parents: 12331
diff changeset
10
11852
825a4717f14a patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents: 11850
diff changeset
11 if exists('s:did_load')
825a4717f14a patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents: 11850
diff changeset
12 finish
825a4717f14a patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents: 11850
diff changeset
13 endif
825a4717f14a patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents: 11850
diff changeset
14 let s:did_load = 1
825a4717f14a patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents: 11850
diff changeset
15 endif
825a4717f14a patch 8.0.0806: tests may try to create XfakeHOME twice
Christian Brabandt <cb@256bit.org>
parents: 11850
diff changeset
16
9778
4360b2b46125 commit https://github.com/vim/vim/commit/66459b7c98c67f8a9d39de8f08e8e8f1fca0e359
Christian Brabandt <cb@256bit.org>
parents: 9501
diff changeset
17 " Make sure 'runtimepath' and 'packpath' does not include $HOME.
9501
f0201deac2a2 commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after
9784
60a06c331524 commit https://github.com/vim/vim/commit/c96a2f3b887d9a1f850f0dacc92616bee11f966b
Christian Brabandt <cb@256bit.org>
parents: 9778
diff changeset
19 if has('packages')
60a06c331524 commit https://github.com/vim/vim/commit/c96a2f3b887d9a1f850f0dacc92616bee11f966b
Christian Brabandt <cb@256bit.org>
parents: 9778
diff changeset
20 let &packpath = &rtp
60a06c331524 commit https://github.com/vim/vim/commit/c96a2f3b887d9a1f850f0dacc92616bee11f966b
Christian Brabandt <cb@256bit.org>
parents: 9778
diff changeset
21 endif
9501
f0201deac2a2 commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 31241
diff changeset
23 " Only when the +eval feature is present.
9501
f0201deac2a2 commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 if 1
11637
bcab4e804c20 patch 8.0.0701: system test failing when using X11 forwarding
Christian Brabandt <cb@256bit.org>
parents: 9784
diff changeset
25 " Make sure the .Xauthority file can be found after changing $HOME.
bcab4e804c20 patch 8.0.0701: system test failing when using X11 forwarding
Christian Brabandt <cb@256bit.org>
parents: 9784
diff changeset
26 if $XAUTHORITY == ''
bcab4e804c20 patch 8.0.0701: system test failing when using X11 forwarding
Christian Brabandt <cb@256bit.org>
parents: 9784
diff changeset
27 let $XAUTHORITY = $HOME . '/.Xauthority'
bcab4e804c20 patch 8.0.0701: system test failing when using X11 forwarding
Christian Brabandt <cb@256bit.org>
parents: 9784
diff changeset
28 endif
bcab4e804c20 patch 8.0.0701: system test failing when using X11 forwarding
Christian Brabandt <cb@256bit.org>
parents: 9784
diff changeset
29
12331
16647bd6372c patch 8.0.1045: running tests may pollute shell history
Christian Brabandt <cb@256bit.org>
parents: 11860
diff changeset
30 " Avoid storing shell history.
16647bd6372c patch 8.0.1045: running tests may pollute shell history
Christian Brabandt <cb@256bit.org>
parents: 11860
diff changeset
31 let $HISTFILE = ""
16647bd6372c patch 8.0.1045: running tests may pollute shell history
Christian Brabandt <cb@256bit.org>
parents: 11860
diff changeset
32
9501
f0201deac2a2 commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 " Make sure $HOME does not get read or written.
11850
eb339f9af281 patch 8.0.0805: GUI test fails with gnome2
Christian Brabandt <cb@256bit.org>
parents: 11637
diff changeset
34 " It must exist, gnome tries to create $HOME/.gnome2
eb339f9af281 patch 8.0.0805: GUI test fails with gnome2
Christian Brabandt <cb@256bit.org>
parents: 11637
diff changeset
35 let $HOME = getcwd() . '/XfakeHOME'
11860
4276e114b34a patch 8.0.0810: MS-Windows: tests still hang
Christian Brabandt <cb@256bit.org>
parents: 11852
diff changeset
36 if !isdirectory($HOME)
4276e114b34a patch 8.0.0810: MS-Windows: tests still hang
Christian Brabandt <cb@256bit.org>
parents: 11852
diff changeset
37 call mkdir($HOME)
4276e114b34a patch 8.0.0810: MS-Windows: tests still hang
Christian Brabandt <cb@256bit.org>
parents: 11852
diff changeset
38 endif
9501
f0201deac2a2 commit https://github.com/vim/vim/commit/89b10421ca1aea55acbafac1df93be4e20210ceb
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 endif