Skip to content

Commit f9e5e54

Browse files
Throw if test_end_expr not a :block expr (#191)
* Throw if `test_end_expr` not a `:block` expression * Bump version
1 parent fc7845b commit f9e5e54

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ReTestItems"
22
uuid = "817f1d60-ba6b-4fd5-9520-3cf149f6a823"
3-
version = "1.28.0"
3+
version = "1.29.0"
44

55
[deps]
66
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"

src/ReTestItems.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ function runtests(
272272
(0 memory_threshold 1) || throw(ArgumentError("`memory_threshold` must be between 0 and 1, got $(repr(memory_threshold))"))
273273
testitem_timeout > 0 || throw(ArgumentError("`testitem_timeout` must be a positive number, got $(repr(testitem_timeout))"))
274274
timeout_profile_wait >= 0 || throw(ArgumentError("`timeout_profile_wait` must be a non-negative number, got $(repr(timeout_profile_wait))"))
275+
test_end_expr.head === :block || throw(ArgumentError("`test_end_expr` must be a `:block` expression, got a `$(repr(test_end_expr.head))` expression"))
275276
# If we were given paths but none were valid, then nothing to run.
276277
!isempty(paths) && isempty(paths′) && return nothing
277278
ti_filter = TestItemFilter(shouldrun, tags, name)

test/integrationtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,4 +1503,8 @@ else
15031503
end # VERSION
15041504
end
15051505

1506+
@testset "`test_end_expr` must be `:block`" begin
1507+
@test_throws "`test_end_expr` must be a `:block` expression" runtests(; test_end_expr=:(@assert false))
1508+
end
1509+
15061510
end # integrationtests.jl testset

0 commit comments

Comments
 (0)