Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Jun 13, 2024
1 parent 859feb6 commit e3273f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ end
@test parent(deepcopy(a)) === parent(a)

latex = CustomLaTeXPrint(" \$\$ \\[\\(α_β∀ \\) \\]\t \$\$")
@test sprint((io, x) -> show(io, "text/latex", x),
SA.AlgebraElement(SA.SparseCoefficients([p], [latex]), RG)) ==
a = SA.AlgebraElement(SA.SparseCoefficients([p], [latex]), RG)
@test SA.coeffs(a)[p] == latex
@test sprint((io, x) -> show(io, "text/latex", x), a) ==
"\$\$ (α_β∀) \\cdot b·c \$\$"
# Test that the check for `\\)` handles unicode well
latex = CustomLaTeXPrint("\\(β∀")
@test sprint((io, x) -> show(io, "text/latex", x),
SA.AlgebraElement(SA.SparseCoefficients([p], [latex]), RG)) ==
"\$\$ (\\(β∀) \\cdot b·c \$\$"

end

0 comments on commit e3273f2

Please sign in to comment.