Skip to content

Commit

Permalink
Re-enable doctests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Dec 17, 2020
1 parent b7b3804 commit 9de5d40
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,9 @@ jobs:
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
#- name: Run doctests
# run: |
# julia --project=docs --color=yes -e '
# using Documenter, GAP
# DocMeta.setdocmeta!(GAP, :DocTestSetup, :(using GAP); recursive = true)
# doctest(GAP)'
- name: Run doctests
run: |
julia --project=docs --color=yes test/doctest.jl
- name: Deploy documentation
run: julia --project=docs --color=yes docs/make.jl
env:
Expand Down
4 changes: 2 additions & 2 deletions src/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ involves only native Julia objects such as integers and strings.
Dealing with results containing GAP objects will be inefficient.
# Examples
```jldoctest
```
julia> Set{Int}(GAP.evalstr("[ 1, 2, 1 ]"))
Set{Int64} with 2 elements:
2
Expand All @@ -373,7 +373,7 @@ Set{Array{Int64,1}} with 2 elements:
[1]
[2]
julia> Set{String}(GAP.evalstr("[\"a\", \"b\"]"))
julia> Set{String}(GAP.evalstr("[\\"a\\", \\"b\\"]"))
Set{String} with 2 elements:
"b"
"a"
Expand Down
2 changes: 1 addition & 1 deletion src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ not all expressions representing valid GAP code can be processed.
For example, the GAP syntax of permutations consisting of more than one cycle
cause problems, as well as the GAP syntax of non-dense lists.
```jldoctest
```
julia> @gap (1,2,3)
GAP: (1,2,3)
Expand Down
11 changes: 11 additions & 0 deletions test/doctest.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Documenter, GAP

DocMeta.setdocmeta!(GAP, :DocTestSetup, :(using GAP); recursive = true)

doctest(GAP; doctestfilters = Regex[
r"BitVector|BitArray\{1\}",
r"Matrix\{Int64\}|Array\{Int64,2\}",
r"Vector\{Any\}|Array\{Any,1\}",
r"Vector\{Int64\}|Array\{Int64,1\}",
r"Vector\{UInt8\}|Array\{UInt8,1\}",
])
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Test, Documenter, GAP

DocMeta.setdocmeta!(GAP, :DocTestSetup, :(using GAP); recursive = true)

include("basics.jl")
include("adapter.jl")
include("convenience.jl")
Expand All @@ -11,4 +9,6 @@ include("convert.jl")
include("macros.jl")
include("packages.jl")
include("help.jl")
# include("testmanual.jl") # skip this for now, difficult to get to work on all Julia versions
@testset "manual examples" begin
include("doctest.jl")
end
9 changes: 0 additions & 9 deletions test/testmanual.jl

This file was deleted.

0 comments on commit 9de5d40

Please sign in to comment.