Skip to content

Commit 959f23f

Browse files
committed
updated for version 7.3.838
Problem: Insufficient testing for mksession. Solution: Add tests. (mostly by Roland Eggner)
1 parent 29a883e commit 959f23f

File tree

12 files changed

+160
-8
lines changed

12 files changed

+160
-8
lines changed

src/ex_docmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10839,7 +10839,7 @@ put_view(fd, wp, add_edit, flagp, current_arg_idx)
1083910839
(long)wp->w_virtcol + 1) < 0
1084010840
|| put_eol(fd) == FAIL
1084110841
|| put_line(fd, "else") == FAIL
10842-
|| fprintf(fd, " normal! %d|", wp->w_virtcol + 1) < 0
10842+
|| fprintf(fd, " normal! 0%d|", wp->w_virtcol + 1) < 0
1084310843
|| put_eol(fd) == FAIL
1084410844
|| put_line(fd, "endif") == FAIL)
1084510845
return FAIL;

src/testdir/Make_amiga.mak

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
3232
test71.out test72.out test73.out test74.out test75.out \
3333
test76.out test77.out test78.out test79.out test80.out \
3434
test81.out test82.out test83.out test84.out test88.out \
35-
test89.out test90.out test91.out
35+
test89.out test90.out test91.out test92.out test93.out
3636

3737
.SUFFIXES: .in .out
3838

@@ -140,3 +140,5 @@ test88.out: test88.in
140140
test89.out: test89.in
141141
test90.out: test90.in
142142
test91.out: test91.in
143+
test92.out: test92.in
144+
test93.out: test93.in

src/testdir/Make_dos.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
3131
test74.out test75.out test76.out test77.out test78.out \
3232
test79.out test80.out test81.out test82.out test83.out \
3333
test84.out test85.out test86.out test87.out test88.out \
34-
test89.out test90.out test91.out
34+
test89.out test90.out test91.out test92.out test93.out
3535

3636
SCRIPTS32 = test50.out test70.out
3737

src/testdir/Make_ming.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
5151
test74.out test75.out test76.out test77.out test78.out \
5252
test79.out test80.out test81.out test82.out test83.out \
5353
test84.out test85.out test86.out test87.out test88.out \
54-
test89.out test90.out test91.out
54+
test89.out test90.out test91.out test92.out test93.out
5555

5656
SCRIPTS32 = test50.out test70.out
5757

src/testdir/Make_os2.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
3232
test71.out test72.out test73.out test74.out test75.out \
3333
test76.out test77.out test78.out test79.out test80.out \
3434
test81.out test82.out test83.out test84.out test88.out \
35-
test89.out test90.out test91.out
35+
test89.out test90.out test91.out test92.out test93.out
3636

3737
.SUFFIXES: .in .out
3838

src/testdir/Make_vms.mms

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Authors: Zoltan Arpadffy, <[email protected]>
55
# Sandor Kopanyi, <[email protected]>
66
#
7-
# Last change: 2013 Feb 20
7+
# Last change: 2013-02-21
88
#
99
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
1010
# Edit the lines in the Configuration section below to select.
@@ -77,7 +77,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
7777
test71.out test72.out test74.out test75.out test76.out \
7878
test77.out test78.out test79.out test80.out test81.out \
7979
test82.out test83.out test84.out test88.out test89.out \
80-
test90.out test91.out
80+
test90.out test91.out test92.out test93.out
8181

8282
# Known problems:
8383
# Test 30: a problem around mac format - unknown reason

src/testdir/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
2828
test74.out test75.out test76.out test77.out test78.out \
2929
test79.out test80.out test81.out test82.out test83.out \
3030
test84.out test85.out test86.out test87.out test88.out \
31-
test89.out test90.out test91.out
31+
test89.out test90.out test91.out test92.out test93.out
3232

3333
SCRIPTS_GUI = test16.out
3434

src/testdir/test92.in

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
vim: set ft=vim fenc=utf-8:
2+
3+
Tests if :mksession saves cursor columns correctly in presence of tab and
4+
multibyte characters when fileencoding=utf-8.
5+
6+
STARTTEST
7+
:so mbyte.vim
8+
:if !has('mksession')
9+
: e! test.ok
10+
: wq! test.out
11+
:endif
12+
:set sessionoptions=buffers splitbelow fileencoding=utf-8
13+
/^start:
14+
:vsplit
15+
j16|:split
16+
j16|:split
17+
j16|:split
18+
j8|:split
19+
j8|:split
20+
j16|:split
21+
j16|:split
22+
j16|:wincmd l
23+
/^start:
24+
:set nowrap
25+
j16|3zl:split
26+
j016|3zl:split
27+
j016|3zl:split
28+
j08|3zl:split
29+
j08|3zl:split
30+
j016|3zl:split
31+
j016|3zl:split
32+
j016|3zl:split
33+
:mksession! test.out
34+
:new test.out
35+
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
36+
:w
37+
:qa!
38+
ENDTEST
39+
40+
start:
41+
no multibyte chAracter
42+
one leaDing tab
43+
four leadinG spaces
44+
two consecutive tabs
45+
two tabs in one line
46+
one … multibyteCharacter
47+
ab” two multiByte characters
48+
c1€ three mulTibyte characters

src/testdir/test92.ok

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
normal! 016|
2+
normal! 016|
3+
normal! 016|
4+
normal! 08|
5+
normal! 08|
6+
normal! 016|
7+
normal! 016|
8+
normal! 016|
9+
exe 'normal! ' . s:c . '|zs' . 16 . '|'
10+
normal! 016|
11+
exe 'normal! ' . s:c . '|zs' . 16 . '|'
12+
normal! 016|
13+
exe 'normal! ' . s:c . '|zs' . 16 . '|'
14+
normal! 016|
15+
exe 'normal! ' . s:c . '|zs' . 8 . '|'
16+
normal! 08|
17+
exe 'normal! ' . s:c . '|zs' . 8 . '|'
18+
normal! 08|
19+
exe 'normal! ' . s:c . '|zs' . 16 . '|'
20+
normal! 016|
21+
exe 'normal! ' . s:c . '|zs' . 16 . '|'
22+
normal! 016|
23+
exe 'normal! ' . s:c . '|zs' . 16 . '|'
24+
normal! 016|
25+
exe 'normal! ' . s:c . '|zs' . 16 . '|'
26+
normal! 016|

src/testdir/test93.in

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
vim: set ft=vim fenc=latin1:
2+
3+
Tests if :mksession saves cursor columns correctly in presence of tab and
4+
multibyte characters when fileencoding=latin1.
5+
6+
STARTTEST
7+
:so mbyte.vim
8+
:if !has('mksession')
9+
: e! test.ok
10+
: wq! test.out
11+
:endif
12+
:set sessionoptions=buffers splitbelow fileencoding=latin1
13+
/^start:
14+
:vsplit
15+
j16|:split
16+
j16|:split
17+
j16|:split
18+
j8|:split
19+
j8|:split
20+
j16|:split
21+
j16|:split
22+
j16|:wincmd l
23+
/^start:
24+
:set nowrap
25+
j16|3zl:split
26+
j016|3zl:split
27+
j016|3zl:split
28+
j08|3zl:split
29+
j08|3zl:split
30+
j016|3zl:split
31+
j016|3zl:split
32+
j016|3zl:split
33+
:mksession! test.out
34+
:new test.out
35+
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
36+
:w
37+
:qa!
38+
ENDTEST
39+
40+
start:
41+
no multibyte chAracter
42+
one leaDing tab
43+
four leadinG spaces
44+
two consecutive tabs
45+
two tabs in one line
46+
one ä multibyteCharacter
47+
aä Ä two multiByte characters
48+
Aäöü three mulTibyte characters

0 commit comments

Comments
 (0)