2020-05-16 16:25:44 +02:00
|
|
|
@testset "limit HMTL output" begin
|
|
|
|
|
|
|
|
@static VERSION ≥ v"1.4" && let
|
|
|
|
|
|
|
|
# no limit
|
2020-06-05 11:59:02 +02:00
|
|
|
doc = mock_run("""
|
2020-05-16 16:25:44 +02:00
|
|
|
```julia
|
|
|
|
using DataFrames
|
|
|
|
DataFrame(rand(10,3))
|
|
|
|
```
|
2020-06-05 11:59:02 +02:00
|
|
|
"""; doctype = "md2html")
|
2020-05-16 16:25:44 +02:00
|
|
|
@test isdefined(doc.chunks[1], :rich_output)
|
|
|
|
@test count("<tr>", doc.chunks[1].rich_output) == 12 # additonal 2 for name and type row
|
|
|
|
|
|
|
|
# limit
|
|
|
|
n = 100000
|
2020-06-05 11:59:02 +02:00
|
|
|
doc = mock_run("""
|
2020-05-16 16:25:44 +02:00
|
|
|
```julia
|
|
|
|
using DataFrames
|
2020-06-05 11:59:02 +02:00
|
|
|
DataFrame(rand($n,3))
|
2020-05-16 16:25:44 +02:00
|
|
|
```
|
2020-06-05 11:59:02 +02:00
|
|
|
"""; doctype = "md2html")
|
2020-05-16 16:25:44 +02:00
|
|
|
@test isdefined(doc.chunks[1], :rich_output)
|
|
|
|
@test count("<tr>", doc.chunks[1].rich_output) < n
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|