You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then calling `julia` from that directory will run the initialization code without the additional
79
-
command line argument.
42
+
and includes tests for the contents of `Tmp`.
43
+
Alternatively, you can wrap the contents of your test file in a module, as
44
+
45
+
```julia
46
+
module Tst
47
+
include("Tmp.jl")
48
+
import .Tmp
49
+
#using .Tmp
50
+
51
+
Tmp.say_hello()
52
+
# say_hello()
53
+
54
+
# your other test code here
55
+
end
56
+
```
57
+
58
+
The advantage is that your testing code is now contained in a module and does not use the global scope in`Main`for
59
+
definitions, which is a bit more tidy.
60
+
61
+
*`include` the `tst.jl` file in the Julia REPL with `include("tst.jl")`.
62
+
63
+
***Lather. Rinse. Repeat.** Explore ideas at the `julia` command prompt. Save good ideas in`tst.jl`. To execute `tst.jl` after it has been changed, just `include` it again.
0 commit comments