Skip to content

Commit

Permalink
Expand code coverage, fix array slice
Browse files Browse the repository at this point in the history
  • Loading branch information
aaruni96 committed Feb 12, 2024
1 parent aea371b commit 24ca34d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/PrettyPrinting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ function _write_line(io::IOCustom, str::AbstractString)
written += write_indent(io)
written += write(io.io, printstr)
io.printed = textwidth(printstr)
printstr = join(partcollect[j+1:end])
printstr = join(partcollect[j:end])
written += write(io.io, "\n")
written += write_indent(io)
written += write(io.io, printstr)
Expand Down
18 changes: 13 additions & 5 deletions test/PrettyPrinting-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -529,17 +529,17 @@ let
wedge = String([0xe2, 0x88, 0xa7])
iacute = String([0xc3, 0xad])
evil_a = String([0x61, 0xcc, 0x81, 0xcc, 0xa7, 0xcc, 0xa7])
wide_boat = String([0xe2, 0x9b, 0xb5])
boat = String([0xe2, 0x9b, 0xb5])
family = String([0xf0, 0x9f, 0x91, 0xaa])
print(io, AbstractAlgebra.Indent())
println(io, "Ŏ"^c)
println(io, ellipses^c)
println(io, "aa", "Ś"^c)
println(io, wide_boat^80)
println(io, boat^(3*c))
println(io, "bb", wedge^c)
print(io, AbstractAlgebra.Indent())
println(io, "aa", "Ŗ"^c)
println(io, family^c)
println(io, family^(3*c))
println(io, iacute^c)
println(io, evil_a^c)
print(io, evil_a^c)
Expand All @@ -551,14 +551,22 @@ let
" ŚŚŚŚ" * "\n" *
" " * boat^39 * "\n" *
" " * boat^39 * "\n" *
" " * boat^2 * "\n" *
" " * boat^39 * "\n" *
" " * boat^39 * "\n" *
" " * boat^39 * "\n" *
" " * boat^39 * "\n" *
" " * boat^6 * "\n" *
" bb" * wedge^(c-4) * "\n" *
" " * wedge^4 * "\n" *
" aa" * "Ŗ"^(c-6) * "\n" *
" ŖŖŖŖŖŖ" * "\n" *
" " * family^38 * "\n" *
" " * family^38 * "\n" *
" " * family^4 * "\n" *
" " * family^38 * "\n" *
" " * family^38 * "\n" *
" " * family^38 * "\n" *
" " * family^38 * "\n" *
" " * family^12 * "\n" *
" " * iacute^(c-4) * "\n" *
" " * iacute^4 *"\n" *
" " * evil_a^(c-4) * "\n" *
Expand Down

0 comments on commit 24ca34d

Please sign in to comment.