view src/testdir/test83.in @ 10557:018b7ecc58db v8.0.0168

patch 8.0.0168: not all float functionality is tested commit https://github.com/vim/vim/commit/872004132f25cabe59352912889e042d6c7e6b4e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 10 16:31:20 2017 +0100 patch 8.0.0168: not all float functionality is tested Problem: Still some float functionality is not covered by tests. Solution: Add more tests. (Dominique Pelle, closes https://github.com/vim/vim/issues/1364)
author Christian Brabandt <cb@256bit.org>
date Tue, 10 Jan 2017 16:45:04 +0100
parents bc269cf15ccd
children
line wrap: on
line source

Tests for tag search with !_TAG_FILE_ENCODING.

STARTTEST
:so mbyte.vim
:set enc=utf8
:if !has('iconv') || iconv("\x82\x60", "cp932", "utf-8") != "\uff21"
: e! test.ok
: w! test.out
: qa!
:endif
:
:/^text for tags1$/,/^text for tags1$/+1w! Xtags1.txt
:/^text for tags2$/,/^text for tags2$/+1w! Xtags2.txt
:/^text for tags3$/,/^text for tags3$/+1w! Xtags3.txt
:/^tags1$/+1,/^tags1-end$/-1w! Xtags1
:
ggdG:
:
:call setline('.', 'Results of test83')
:
:" case1:
:new
:set tags=Xtags1
:let v:errmsg = ''
:tag abcdefghijklmnopqrs
:if v:errmsg =~ 'E426:' || getline('.') != 'abcdefghijklmnopqrs'
: close
: put ='case1: failed'
:else
: close
: put ='case1: ok'
:endif
:
:" case2:
:new
:set tags=test83-tags2
:let v:errmsg = ''
:tag /.BC
:if v:errmsg =~ 'E426:' || getline('.') != 'ABC'
: close
: put ='case2: failed'
:else
: close
: put ='case2: ok'
:endif
:
:" case3:
:new
:set tags=test83-tags3
:let v:errmsg = ''
:tag abc50
:if v:errmsg =~ 'E426:' || getline('.') != 'ABC'
: close
: put ='case3: failed'
:else
: close
: put ='case3: ok'
:endif
:close
:
:wq! test.out
ENDTEST

text for tags1
abcdefghijklmnopqrs

text for tags2
ABC

text for tags3
ABC

tags1
!_TAG_FILE_ENCODING	utf-8	//
abcdefghijklmnopqrs	Xtags1.txt	/abcdefghijklmnopqrs
tags1-end