File tree Expand file tree Collapse file tree 5 files changed +18
-1
lines changed
Expand file tree Collapse file tree 5 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 11name = " TestExtras"
22uuid = " 5ed8adda-3752-4e41-b88a-e8b09835ee3a"
33authors = [
" Jutho Haegeman <[email protected] > and contributors" ]
4- version = " 0.2.2 "
4+ version = " 0.3 "
55
66[deps ]
77InteractiveUtils = " b77e0a4c-d291-57a0-90e8-8db25a27a240"
Original file line number Diff line number Diff line change @@ -2,9 +2,12 @@ module TestExtras
22
33export @constinferred , @constinferred_broken
44export @timedtestset
5+ export @include
56export ConstInferred
67
78include (" constinferred.jl" )
9+ include (" includemacro.jl" )
10+
811if VERSION >= v " 1.8"
912 include (" timedtest_new.jl" )
1013else
Original file line number Diff line number Diff line change 1+ # include file as-is in local scope
2+ macro include (filename:: String )
3+ dir = dirname (string (__source__. file))
4+ filepath = joinpath (dir, filename)
5+ source = " quote; " * read (filepath, String) * " ; end"
6+ return esc (Meta. parse (source). args[1 ])
7+ end
Original file line number Diff line number Diff line change 127127 @test a === 1
128128 end
129129end
130+ const constval = false
131+ @timedtestset " @include" begin
132+ val = true
133+ @include (" testinclude.jl" )
134+ end
Original file line number Diff line number Diff line change 1+ @test val
2+ @test_broken constval
You can’t perform that action at this time.
0 commit comments