Skip to content

Commit 1d3de45

Browse files
committed
test: make doctests/ compatible with nightly
There has been a printing change for UndefVarError, adding some backticks.
1 parent 70017e0 commit 1d3de45

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

test/doctests/doctests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ function onormalize(s)
9090
# Remove stacktraces
9191
s = replace(s, r"(│\s+Stacktrace:)(\n(│\s+)\[[0-9]+\].*)(\n(│\s+)@.*)?+" => s"\1\\n\3{STACKTRACE}")
9292

93+
# In Julia 1.9, the printing of UndefVarError has slightly changed (added backticks around binding name)
94+
s = replace(s, r"UndefVarError: `([A-Za-z0-9.]+)` not defined"m => s"UndefVarError: \1 not defined")
95+
9396
return s
9497
end
9598

test/doctests/src/softscope.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ DocTestFilters = [
2121
# remove stacktraces
2222
r"Stacktrace:(\n \[[0-9]+\].*)*",
2323
# remove file paths from at-block URLs
24-
r"└ @ .+:[0-9]+"
24+
r"└ @ .+:[0-9]+",
25+
# Account for the printing change of UndefVarError
26+
r"UndefVarError: `?s`? not defined",
2527
]
2628
```
2729

0 commit comments

Comments
 (0)