summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0347
blob: 4c45fdef81b43a96502f08829187cf096087515f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0347
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0347
Problem:    Some tests fail on Solaris.
Solution:   Skip writefile test. Fix path to libc.so. Improve test for Turkish
            case change. (Libor Bukata, Bjorn Linse, closes #3403)
Files:	    src/testdir/test_functions.vim, src/testdir/test_normal.vim,
            src/testdir/test_writefile.vim


*** ../vim-8.1.0346/src/testdir/test_functions.vim	2018-08-20 22:53:00.210105086 +0200
--- src/testdir/test_functions.vim	2018-09-03 22:05:48.870072965 +0200
***************
*** 1,4 ****
--- 1,5 ----
  " Tests for various functions.
+ source shared.vim
  
  " Must be done first, since the alternate buffer must be unset.
  func Test_00_bufexists()
***************
*** 1006,1011 ****
--- 1007,1023 ----
      let libc = 'msvcrt.dll'
    elseif has('mac')
      let libc = 'libSystem.B.dylib'
+   elseif system('uname -s') =~ 'SunOS'
+     " Set the path to libc.so according to the architecture.
+     let test_bits = system('file ' . GetVimProg())
+     let test_arch = system('uname -p')
+     if test_bits =~ '64-bit' && test_arch =~ 'sparc'
+       let libc = '/usr/lib/sparcv9/libc.so'
+     elseif test_bits =~ '64-bit' && test_arch =~ 'i386'
+       let libc = '/usr/lib/amd64/libc.so'
+     else
+       let libc = '/usr/lib/libc.so'
+     endif
    else
      " On Unix, libc.so can be in various places.
      " Interestingly, using an empty string for the 1st argument of libcall
*** ../vim-8.1.0346/src/testdir/test_normal.vim	2018-08-24 22:07:54.094796047 +0200
--- src/testdir/test_normal.vim	2018-09-03 22:02:34.495974021 +0200
***************
*** 1630,1641 ****
    norm! V~
    call assert_equal('THIS IS A simple test: äüöss', getline('.'))
  
!   " Turkish ASCII turns to multi-byte.  On Mac the Turkish locale is available
!   " but toupper()/tolower() don't do the right thing.
!   if !has('mac') && !has('osx')
!     try
!       lang tr_TR.UTF-8
!       set casemap=
        call setline(1, 'iI')
        1normal gUU
        call assert_equal("\u0130I", getline(1))
--- 1630,1642 ----
    norm! V~
    call assert_equal('THIS IS A simple test: äüöss', getline('.'))
  
!   " Turkish ASCII turns to multi-byte.  On some systems Turkish locale
!   " is available but toupper()/tolower() don't do the right thing.
!   try
!     lang tr_TR.UTF-8
!     set casemap=
!     let iupper = toupper('i')
!     if iupper == "\u0130"
        call setline(1, 'iI')
        1normal gUU
        call assert_equal("\u0130I", getline(1))
***************
*** 1645,1652 ****
        1normal guu
        call assert_equal("i\u0131", getline(1))
        call assert_equal("i\u0131", tolower("iI"))
! 
!       set casemap&
        call setline(1, 'iI')
        1normal gUU
        call assert_equal("II", getline(1))
--- 1646,1652 ----
        1normal guu
        call assert_equal("i\u0131", getline(1))
        call assert_equal("i\u0131", tolower("iI"))
!     elseif iupper == "I"
        call setline(1, 'iI')
        1normal gUU
        call assert_equal("II", getline(1))
***************
*** 1656,1668 ****
        1normal guu
        call assert_equal("ii", getline(1))
        call assert_equal("ii", tolower("iI"))
! 
!       lang en_US.UTF-8
!     catch /E197:/
!       " can't use Turkish locale
!       throw 'Skipped: Turkish locale not available'
!     endtry
!   endif
  
    " clean up
    bw!
--- 1656,1680 ----
        1normal guu
        call assert_equal("ii", getline(1))
        call assert_equal("ii", tolower("iI"))
!     else
!       call assert_true(false, "expected toupper('i') to be either 'I' or '\u0130'")
!     endif
!     set casemap&
!     call setline(1, 'iI')
!     1normal gUU
!     call assert_equal("II", getline(1))
!     call assert_equal("II", toupper("iI"))
! 
!     call setline(1, 'iI')
!     1normal guu
!     call assert_equal("ii", getline(1))
!     call assert_equal("ii", tolower("iI"))
! 
!     lang en_US.UTF-8
!   catch /E197:/
!     " can't use Turkish locale
!     throw 'Skipped: Turkish locale not available'
!   endtry
  
    " clean up
    bw!
*** ../vim-8.1.0346/src/testdir/test_writefile.vim	2018-08-30 13:07:12.026033864 +0200
--- src/testdir/test_writefile.vim	2018-09-03 22:02:34.495974021 +0200
***************
*** 33,39 ****
  endfunc
  
  func Test_writefile_fails_conversion()
!   if !has('multi_byte') || !has('iconv')
      return
    endif
    set nobackup nowritebackup
--- 33,39 ----
  endfunc
  
  func Test_writefile_fails_conversion()
!   if !has('multi_byte') || !has('iconv') || system('uname -s') =~ 'SunOS'
      return
    endif
    set nobackup nowritebackup
*** ../vim-8.1.0346/src/version.c	2018-09-02 15:26:53.829022193 +0200
--- src/version.c	2018-09-03 22:04:32.654818113 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     347,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
17. You turn on your intercom when leaving the room so you can hear if new
    e-mail arrives.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///