Skip to content

Commit e7ba51b

Browse files
adienescharleskawczynski
authored andcommitted
follow up to: "relax some doctests to better match non-requirement of ordering of Dict and Set" (JuliaLang#58053)
I missed a few of these in the initial PR here JuliaLang#57693 hopefully there aren't any more...
1 parent 9e28096 commit e7ba51b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

base/abstractdict.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ But `keys(a)`, `values(a)` and `pairs(a)` all iterate `a`
9292
and return the elements in the same order.
9393
9494
# Examples
95-
```jldoctest
95+
```jldoctest; filter = r"^\\s+'\\S'.*\$"m
9696
julia> D = Dict('a'=>2, 'b'=>3)
9797
Dict{Char, Int64} with 2 entries:
9898
'a' => 2
@@ -118,7 +118,7 @@ But `keys(a)`, `values(a)` and `pairs(a)` all iterate `a`
118118
and return the elements in the same order.
119119
120120
# Examples
121-
```jldoctest
121+
```jldoctest; filter = r"^\\s+\\S+(\\s+=>\\s+\\d)?\$"m
122122
julia> D = Dict('a'=>2, 'b'=>3)
123123
Dict{Char, Int64} with 2 entries:
124124
'a' => 2
@@ -332,7 +332,7 @@ value for that key will be the value it has in the last collection listed.
332332
See also [`mergewith`](@ref) for custom handling of values with the same key.
333333
334334
# Examples
335-
```jldoctest
335+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\S+\$"m
336336
julia> a = Dict("foo" => 0.0, "bar" => 42.0)
337337
Dict{String, Float64} with 2 entries:
338338
"bar" => 42.0
@@ -377,7 +377,7 @@ Method `merge(combine::Union{Function,Type}, args...)` as an alias of
377377
`mergewith` requires Julia 1.5 or later.
378378
379379
# Examples
380-
```jldoctest
380+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\S+\$"m
381381
julia> a = Dict("foo" => 0.0, "bar" => 42.0)
382382
Dict{String, Float64} with 2 entries:
383383
"bar" => 42.0

base/dict.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ end
532532
Determine whether a collection has a mapping for a given `key`.
533533
534534
# Examples
535-
```jldoctest
535+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
536536
julia> D = Dict('a'=>2, 'b'=>3)
537537
Dict{Char, Int64} with 2 entries:
538538
'a' => 2
@@ -554,7 +554,7 @@ in(key, v::KeySet{<:Any, <:Dict}) = (ht_keyindex(v.dict, key) >= 0)
554554
Return the key matching argument `key` if one exists in `collection`, otherwise return `default`.
555555
556556
# Examples
557-
```jldoctest
557+
```jldoctest; filter = r"^\\s+\\S+\\s+=>\\s+\\d\$"m
558558
julia> D = Dict('a'=>2, 'b'=>3)
559559
Dict{Char, Int64} with 2 entries:
560560
'a' => 2

base/set.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ If `count` is specified, then replace at most `count` occurrences in total.
717717
See also [`replace`](@ref replace(A, old_new::Pair...)).
718718
719719
# Examples
720-
```jldoctest
720+
```jldoctest; filter = r"^\\s+\\d\$"m
721721
julia> replace!([1, 2, 1, 3], 1=>0, 2=>4, count=2)
722722
4-element Vector{Int64}:
723723
0

0 commit comments

Comments
 (0)