Skip to content

Commit

Permalink
Fix docstring tests for Julia v1.12 and test on v1.10 (LTS) (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
sostock authored Oct 31, 2024
1 parent 601f9e1 commit 5b31faf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
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

0 comments on commit 5b31faf

Please sign in to comment.