We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37b5c92 commit 44882d5Copy full SHA for 44882d5
src/fmtspec.jl
@@ -214,6 +214,7 @@ function printfmt(io::IO, fs::FormatSpec, x)
214
else # cls == 'c'
215
_pfmt_s(io, fs, Char(x))
216
end
217
+ nothing
218
219
220
printfmt(fs::FormatSpec, x) = printfmt(_stdout(), fs, x)
src/formatexpr.jl
@@ -151,6 +151,7 @@ function printfmt(io::IO, fe::FormatExpr, args...)
151
152
153
isempty(fe.suffix) || print(io, fe.suffix)
154
155
156
157
const StringOrFE = Union{AbstractString, FormatExpr}
test/fmtspec.jl
@@ -223,13 +223,13 @@ end
223
# May need to change how separators are handled with zero padding,
224
# to produce the same results as Python
225
226
-# @test pyfmt("08,d", 1234) == "0,001,234"
227
-# @test pyfmt("09,d", 1234) == "0,001,234"
228
-# @test pyfmt("010,d", 1234) == "00,001,234"
+ @test_broken pyfmt("08,d", 1234) == "0,001,234"
+ @test_broken pyfmt("09,d", 1234) == "0,001,234"
+ @test_broken pyfmt("010,d", 1234) == "00,001,234"
229
230
@test pyfmt("+#012_b", 42) == "+0b0010_1010"
231
-# @test pyfmt("+#013_b", 42) == "+0b0_0010_1010"
232
-# @test pyfmt("+#014_b", 42) == "+0b0_0010_1010"
+ @test_broken pyfmt("+#013_b", 42) == "+0b0_0010_1010"
+ @test_broken pyfmt("+#014_b", 42) == "+0b0_0010_1010"
233
234
235
test/formatexpr.jl
@@ -34,13 +34,17 @@
34
@test_throws(ErrorException, format("{1", 10) )
35
36
f = FormatExpr("{1:s}")
37
- printfmt(f,"")
38
- printfmtln(f,"")
+ printfmt(f, "")
+ printfmtln(f, "")
39
io = IOBuffer()
40
- printfmt(io,f,"foobar")
+ printfmt(io, f, "foobar")
41
@test io.size == 6
42
- printfmtln(io,f,"ugly")
+ printfmtln(io, f, "ugly")
43
@test io.size == 11
44
+
45
+ # Issue #81
46
+ @test printfmt("{:d}", 1000) == nothing
47
48
49
50
@testset "format escape {{ and }}" begin
0 commit comments