Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docstring tests for Julia v1.12 and test on v1.10 (LTS) #744

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
julia-version:
- "1.0"
- "1.6"
- "1.10"
- "1"
- "nightly"
os:
Expand Down
17 changes: 9 additions & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2212,8 +2212,9 @@ using REPL # This is necessary to make `@doc` work correctly
@test string(@doc DocUnits.𝐃) == "dimension docs\n"
@test string(@doc DocUnits.dRefFoo) == "refunit docs\n"
@test string(@doc DocUnits.dFoo) == "unit docs\n"
CODEBLOCK_LANG = VERSION ≥ v"1.12.0-DEV" ? "julia" : ""
@test string(@doc DocUnits.DocDimension) == """
```
```$CODEBLOCK_LANG
$(@__MODULE__).DocUnits.DocDimension{T, U}
```

Expand All @@ -2222,7 +2223,7 @@ using REPL # This is necessary to make `@doc` work correctly
See also: [`$(@__MODULE__).DocUnits.𝐃`](@ref), `Unitful.Quantity`, `Unitful.Level`.
"""
@test string(@doc DocUnits.DocDimensionUnits) == """
```
```$CODEBLOCK_LANG
$(@__MODULE__).DocUnits.DocDimensionUnits{U}
```

Expand All @@ -2231,7 +2232,7 @@ using REPL # This is necessary to make `@doc` work correctly
See also: [`$(@__MODULE__).DocUnits.𝐃`](@ref), `Unitful.Units`.
"""
@test string(@doc DocUnits.DocDimensionFreeUnits) == """
```
```$CODEBLOCK_LANG
$(@__MODULE__).DocUnits.DocDimensionFreeUnits{U}
```

Expand All @@ -2240,7 +2241,7 @@ using REPL # This is necessary to make `@doc` work correctly
See also: [`$(@__MODULE__).DocUnits.𝐃`](@ref).
"""
@test string(@doc DocUnits.DerivedDocDimension) == """
```
```$CODEBLOCK_LANG
$(@__MODULE__).DocUnits.DerivedDocDimension{T, U}
```

Expand All @@ -2249,7 +2250,7 @@ using REPL # This is necessary to make `@doc` work correctly
See also: `Unitful.Quantity`, `Unitful.Level`.
"""
@test string(@doc DocUnits.DerivedDocDimensionUnits) == """
```
```$CODEBLOCK_LANG
$(@__MODULE__).DocUnits.DerivedDocDimensionUnits{U}
```

Expand All @@ -2258,14 +2259,14 @@ using REPL # This is necessary to make `@doc` work correctly
See also: `Unitful.Units`.
"""
@test string(@doc DocUnits.DerivedDocDimensionFreeUnits) == """
```
```$CODEBLOCK_LANG
$(@__MODULE__).DocUnits.DerivedDocDimensionFreeUnits{U}
```

A supertype for `Unitful.FreeUnits` of dimension `𝐃 * 𝐋`. Equivalent to `Unitful.FreeUnits{U, 𝐃 * 𝐋}`.
"""
@test string(@doc DocUnits.kdFoo) == """
```
```$CODEBLOCK_LANG
$(@__MODULE__).DocUnits.kdFoo
```

Expand All @@ -2276,7 +2277,7 @@ using REPL # This is necessary to make `@doc` work correctly
See also: [`$(@__MODULE__).DocUnits.dFoo`](@ref).
"""
@test string(@doc DocUnits.kdRefFoo) == """
```
```$CODEBLOCK_LANG
$(@__MODULE__).DocUnits.kdRefFoo
```

Expand Down
Loading