In a docstring like:
```jldoctest
julia> x = rand(1000)
1000-element Vector{Float64}:
0.9193285028224774
0.35444797029663266
0.1201916693868853
0.35371426411293694
0.11668489865605236
0.6506991967008628
⋮
0.5180636146804571
0.3354691171077989
0.046577899510561904
0.5993088546568675
0.3926367429008284
0.7955460631376658
```#
Is there a way to set the number of elements of the array to be printed or tested? Or make the test not fail if the output has fewer or more elements than what is printed (assuming that
the first and last elements match)?
This is the kind of output I’m talking about:
│ Expected output:
│
│ 584-element Vector{Tuple{Int64, Int64, Float64}}:
│ (1, 12, 7.360804915224965)
│ (1, 13, 7.017762962654125)
│ ⋮
│ (50, 37, 7.546490310071297)
│ (50, 39, 3.900154099519657)
│
│ diff =
│ 584-element Vector{Tuple{Int64, Int64, Float64}}:
│ (1, 12, 7.360804915224965)
│ (1, 13, 7.017762962654125)
│ (1, 24, 7.976895636774997)
│ (1, 29, 3.177028328485598)
│ (1, 44, 5.394713986857875)
│ (1, 45, 5.4248765884580274)
│ (1, 11, 4.088651856052312)
│ (1, 17, 5.93977280710298)
│ (1, 30, 2.457228927063981)
│ (1, 28, 6.853834401267658)
│ ⋮
│ (50, 3, 7.232267901564487)
│ (50, 10, 3.9736202636890203)
│ (50, 27, 6.257296620746054)
│ (50, 32, 3.1099665593057426)
│ (50, 33, 2.919291694915052)
│ (50, 35, 5.043227240567294)
│ (50, 20, 6.995405134800987)
│ (50, 37, 7.546490310071297)
│ (50, 39, 3.900154099519657)
└ @ Documenter ~/.julia/dev/CellListMap/src/neighborlists.jl:568
(these tests fail because of the number of elements, the floating point precision is being filtered out).
20 elements, as it is expected, is too much, makes reading the docstring cumbersome.