@@ -6,7 +6,6 @@ using Compat: view, String
6
6
using LegacyStrings
7
7
using LegacyStrings: ASCIIString, UTF8String # override Compat's version
8
8
import LegacyStrings:
9
- ascii,
10
9
checkstring,
11
10
UnicodeError,
12
11
UTF_ERR_SHORT
@@ -208,13 +207,13 @@ let ch = 0x10000
208
207
end
209
208
210
209
let str = UTF8String (b " this is a test\x ed\x 80" )
211
- @test next (str, 15 ) == (' \u fffd' , 16 )
210
+ @test iterate (str, 15 ) == (' \u fffd' , 16 )
212
211
@test_throws BoundsError getindex (str, 0 : 3 )
213
212
@test_throws BoundsError getindex (str, 17 : 18 )
214
213
@test_throws BoundsError getindex (str, 2 : 17 )
215
214
@test_throws UnicodeError getindex (str, 16 : 17 )
216
215
# @test string(Char(0x110000)) == "\ufffd"
217
- sa = SubString {ASCIIString} (ascii (" This is a silly test" ), 1 , 14 )
216
+ sa = SubString {ASCIIString} (LegacyStrings . ascii (" This is a silly test" ), 1 , 14 )
218
217
s8 = convert (SubString{UTF8String}, sa)
219
218
@test typeof (s8) == SubString{UTF8String}
220
219
@test s8 == " This is a sill"
@@ -283,7 +282,7 @@ function tstcvt(strUTF8::UTF8String, strUTF16::UTF16String, strUTF32::UTF32Strin
283
282
end
284
283
285
284
# Create some ASCII, UTF8, UTF16, and UTF32 strings
286
- strAscii = ascii (" abcdefgh" )
285
+ strAscii = LegacyStrings . ascii (" abcdefgh" )
287
286
strA_UTF8 = utf8 ((" abcdefgh\u ff" )[1 : 8 ])
288
287
strL_UTF8 = utf8 (" abcdef\u ff\u ff" )
289
288
str2_UTF8 = utf8 (" abcd\u ff\u ff\u 7ff\u 7ff" )
464
463
@test reverse (utf32 (" abcd \u ff\u 7ff\u 7fff\U 7ffff" )) == utf32 (" \U 7ffff\u 7fff\u 7ff\u ff dcba" )
465
464
466
465
# Test pointer() functions
467
- let str = ascii (" this " )
466
+ let str = LegacyStrings . ascii (" this " )
468
467
u8 = utf8 (str)
469
468
u16 = utf16 (str)
470
469
u32 = utf32 (str)
545
544
546
545
@test lastindex (srep) == 7
547
546
548
- @test next (srep, 3 ) == (' β' ,5 )
549
- @test next (srep, 7 ) == (' β' ,9 )
547
+ @test iterate (srep, 3 ) == (' β' ,5 )
548
+ @test iterate (srep, 7 ) == (' β' ,9 )
550
549
551
550
@test srep[7 ] == ' β'
552
551
@static if VERSION < v " 0.7.0-DEV.2924"
0 commit comments