Skip to content

Commit bb85900

Browse files
committed
Minor formatting changes (3), add nothing at end of tests (stop spurious output at REPL)
1 parent 0910be3 commit bb85900

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/iconv.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function iconv_open(tocode, fromcode)
2525
elseif errno() == EINVAL
2626
error("conversion from $fromcode to $tocode not supported by iconv implementation, check that specified encodings are correct")
2727
else
28-
error("iconv_open error $(errno()): $(strerror(errno()))")
28+
error("iconv_open error $(errno()): $(strerror(errno()))")
2929
end
3030
end
3131

@@ -248,7 +248,7 @@ end
248248
## Functions to encode/decode strings
249249

250250
encoding_string(::Type{ASCIIString}) = "ASCII"
251-
encoding_string(::Type{UTF8String}) = "UTF-8"
251+
encoding_string(::Type{UTF8String}) = "UTF-8"
252252
encoding_string(::Type{UTF16String}) = (ENDIAN_BOM == 0x04030201) ? "UTF-16LE" : "UTF-16BE"
253253
encoding_string(::Type{UTF32String}) = (ENDIAN_BOM == 0x04030201) ? "UTF-32LE" : "UTF-32BE"
254254

test/runtests.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ for s in ("", "a", "café crème",
1414
end
1515

1616
# Test a few non-Unicode encodings
17-
for (s, enc) in (("noël", "ISO-8859-1"), ("noël €", "ISO-8859-15", "CP1252"),
18-
("Код Обмена Информацией, 8 бит", "KOI8-R"), ("国家标准", "GB18030"))
17+
for (s, enc) in (("noël", "ISO-8859-1"),
18+
("noël €", "ISO-8859-15", "CP1252"),
19+
("Код Обмена Информацией, 8 бит", "KOI8-R"),
20+
("国家标准", "GB18030"))
1921
@test decode(encode(s, enc), enc) == s
2022
end
2123

@@ -76,3 +78,5 @@ end
7678

7779
@test_throws ErrorException p = StringEncoder(IOBuffer(), "nonexistent_encoding")
7880
@test_throws ErrorException p = StringDecoder(IOBuffer(), "nonexistent_encoding")
81+
82+
nothing

0 commit comments

Comments
 (0)