Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tpapp committed Sep 28, 2022
1 parent 71129a1 commit de05395
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ using DisplayAs, MarkdownTables, Tables, Test

table = [(a = 1, b = :b), (a = 2, b = :d)]

table_string = markdown_table(table, String)
@test table_string == "| *a* | *b* |\n|-----|-----|\n| 1 | `b` |\n| 2 | `d` |\n"
@test table |> markdown_table(String) == table_string
# get rid of whitespace for comparison
_normalize(str::AbstractString) = filter(x -> x ' ', str)

table_string = _normalize(markdown_table(table, String))
@test table_string == _normalize("| a | b |\n|---|-----|\n| 1 | `b` |\n| 2 | `d` |\n")
@test table |> markdown_table(String) |> _normalize == table_string
@test markdown_table(table) isa DisplayAs.Raw.Showable{MIME"text/markdown"}

2 comments on commit de05395

@tpapp
Copy link
Owner Author

@tpapp tpapp commented on de05395 Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/69114

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.0 -m "<description of version>" de0539546c253e35b3cf5542d4ae1f0471e4d6aa
git push origin v1.1.0

Please sign in to comment.