File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ _zero(T) = zero(T)
143
143
_zero (T:: Type{<:MaxLengthString} ) = T (" " )
144
144
_zero (T:: Type{ASCIIChar} ) = ASCIIChar (0 )
145
145
_zero (:: Type{<:Vector{T}} ) where T = T[]
146
+ _zero (:: Type{Char} ) = Char (0 )
146
147
getchunkarray (z:: ZArray ) = fill (_zero (eltype (z)), z. metadata. chunks)
147
148
148
149
maybeinner (a:: Array ) = a
Original file line number Diff line number Diff line change @@ -214,14 +214,18 @@ end
214
214
@test_throws ArgumentError resize! (a,(- 1 ,2 ))
215
215
end
216
216
217
- @testset " string array getindex/setindex" begin
217
+ @testset " string/Char array getindex/setindex" begin
218
218
aa = [" this" , " is" , " all " , " ascii" ]
219
219
bb = [" And" " Unicode" ; " ματριξ" missing ]
220
+ cc = ' A' :' D'
220
221
a = ZArray (aa)
221
222
b = ZArray (bb, fill_value = " " )
223
+ c = ZArray (cc)
222
224
@test eltype (a) == String
223
225
@test eltype (b) == Union{String,Missing}
226
+ @test eltype (c) == Char
224
227
@test a[:] == [" this" , " is" , " all " , " ascii" ]
228
+ @test c[:] == ' A' :' D'
225
229
@test all (isequal .(b[:,:],[" And" " Unicode" ; " ματριξ" missing ]))
226
230
end
227
231
You can’t perform that action at this time.
0 commit comments