Skip to content

Commit

Permalink
remove @mockup
Browse files Browse the repository at this point in the history
  • Loading branch information
wookay committed Dec 31, 2019
1 parent f698daf commit 68a620b
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 225 deletions.
50 changes: 32 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
- [@onlyonce](#onlyonce)
- [@If](#If)
- [@useinside](#useinside)
- [@mockup](#mockup)
- [`@__END__`](#__end__)
- [`@__REPL__`](#__repl__)


# runtests
Expand All @@ -33,19 +33,17 @@ runtests(@__DIR__)
for the `runtests.jl`, `ARGS` are used to filter the targets and to set the start offset of the tests.

```
~/.julia/dev/Jive/test $ julia --color=yes runtests.jl jive/s jive/m start=3
1/5 jive/mockup/mockup.jl --
2/5 jive/skip/skip-calls.jl --
3/5 jive/skip/skip-exprs.jl
Pass 4 (0.38 seconds)
4/5 jive/skip/skip-functions.jl
Pass 4 (0.05 seconds)
5/5 jive/skip/skip-modules.jl
~/.julia/dev/Jive/test $ julia --color=yes runtests.jl jive/s start=3
1/4 jive/skip/skip-calls.jl --
2/4 jive/skip/skip-exprs.jl --
3/4 jive/skip/skip-functions.jl
Pass 4 (0.37 seconds)
4/4 jive/skip/skip-modules.jl
Pass 4 (0.01 seconds)
✅ All 12 tests have been completed. (0.73 seconds)
All 8 tests have been completed. (0.65 seconds)
```

in the above example, test files are matched for only have `jive/s` `jive/m` and jumping up to the 3rd file.
in the above example, test files are matched for only have `jive/s` and jumping up to the 3rd file.

### Examples

Expand Down Expand Up @@ -180,13 +178,6 @@ end
```


# @mockup

used to produce a replica from the other module.

* [test/jive/mockup](https://github.com/wookay/Jive.jl/blob/master/test/jive/mockup)


# `@__END__`

`throw(Jive.EndError())`
Expand All @@ -199,6 +190,29 @@ using Jive
```


# `@__REPL__`

* [`test/jive/__REPL__`](https://github.com/wookay/Jive.jl/blob/master/test/jive/__REPL__)

```
~/.julia/dev/Jive/test/jive/__REPL__ $ cat test.jl
using Jive
a = 1
@__REPL__
@info :a a
~/.julia/dev/Jive/test/jive/__REPL__ $ julia test.jl
julia> a += 2
3
julia> ^D # Ctrl + D to exit the REPL
┌ Info: a
└ a = 3
```


[docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg
[docs-latest-url]: https://wookay.github.io/docs/Jive.jl/

Expand Down
1 change: 0 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ makedocs(
"@onlyonce" => "onlyonce.md",
"@If" => "If.md",
"@useinside" => "useinside.md",
"@mockup" => "mockup.md",
"`@__END__`" => "END.md",
"`@__REPL__`" => "REPL.md",
],
Expand Down
20 changes: 20 additions & 0 deletions docs/src/REPL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,23 @@
```@docs
Jive.@__REPL__
```

* [`test/jive/__REPL__`](https://github.com/wookay/Jive.jl/blob/master/test/jive/__REPL__)

```
~/.julia/dev/Jive/test/jive/__REPL__ $ cat test.jl
using Jive
a = 1
@__REPL__
@info :a a
~/.julia/dev/Jive/test/jive/__REPL__ $ julia test.jl
julia> a += 2
3
julia> ^D # Ctrl + D to exit the REPL
┌ Info: a
└ a = 3
```
50 changes: 32 additions & 18 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
- [@onlyonce](#onlyonce)
- [@If](#If)
- [@useinside](#useinside)
- [@mockup](#mockup)
- [`@__END__`](#__end__)
- [`@__REPL__`](#__repl__)


# runtests
Expand All @@ -30,19 +30,17 @@ runtests(@__DIR__)
for the `runtests.jl`, `ARGS` are used to filter the targets and to set the start offset of the tests.

```
~/.julia/dev/Jive/test $ julia --color=yes runtests.jl jive/s jive/m start=3
1/5 jive/mockup/mockup.jl --
2/5 jive/skip/skip-calls.jl --
3/5 jive/skip/skip-exprs.jl
Pass 4 (0.38 seconds)
4/5 jive/skip/skip-functions.jl
Pass 4 (0.05 seconds)
5/5 jive/skip/skip-modules.jl
~/.julia/dev/Jive/test $ julia --color=yes runtests.jl jive/s start=3
1/4 jive/skip/skip-calls.jl --
2/4 jive/skip/skip-exprs.jl --
3/4 jive/skip/skip-functions.jl
Pass 4 (0.37 seconds)
4/4 jive/skip/skip-modules.jl
Pass 4 (0.01 seconds)
✅ All 12 tests have been completed. (0.73 seconds)
✅ All 8 tests have been completed. (0.65 seconds)
```

in the above example, test files are matched for only have `jive/s` `jive/m` and jumping up to the 3rd file.
in the above example, test files are matched for only have `jive/s` and jumping up to the 3rd file.

### Examples

Expand Down Expand Up @@ -177,13 +175,6 @@ end
```


# @mockup

used to produce a replica from the other module.

* [test/jive/mockup](https://github.com/wookay/Jive.jl/blob/master/test/jive/mockup)


# `@__END__`

`throw(Jive.EndError())`
Expand All @@ -194,3 +185,26 @@ used to produce a replica from the other module.
using Jive
@__END__
```


# `@__REPL__`

* [`test/jive/__REPL__`](https://github.com/wookay/Jive.jl/blob/master/test/jive/__REPL__)

```
~/.julia/dev/Jive/test/jive/__REPL__ $ cat test.jl
using Jive
a = 1
@__REPL__
@info :a a
~/.julia/dev/Jive/test/jive/__REPL__ $ julia test.jl
julia> a += 2
3
julia> ^D # Ctrl + D to exit the REPL
┌ Info: a
└ a = 3
```
48 changes: 0 additions & 48 deletions docs/src/mockup.md

This file was deleted.

18 changes: 8 additions & 10 deletions docs/src/runtests.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ runtests(@__DIR__, skip=[], node1=[], targets=ARGS)
for the `runtests.jl`, `ARGS` are used to filter the targets and to set the start offset of the tests.

```
~/.julia/dev/Jive/test $ julia --color=yes runtests.jl jive/s jive/m start=3
1/5 jive/mockup/mockup.jl --
2/5 jive/skip/skip-calls.jl --
3/5 jive/skip/skip-exprs.jl
Pass 4 (0.38 seconds)
4/5 jive/skip/skip-functions.jl
Pass 4 (0.05 seconds)
5/5 jive/skip/skip-modules.jl
~/.julia/dev/Jive/test $ julia --color=yes runtests.jl jive/s start=3
1/4 jive/skip/skip-calls.jl --
2/4 jive/skip/skip-exprs.jl --
3/4 jive/skip/skip-functions.jl
Pass 4 (0.37 seconds)
4/4 jive/skip/skip-modules.jl
Pass 4 (0.01 seconds)
✅ All 12 tests have been completed. (0.73 seconds)
All 8 tests have been completed. (0.65 seconds)
```

in the above example, test files are matched for only have `jive/s` `jive/m` and jumping up to the 3rd file.
in the above example, test files are matched for only have `jive/s` and jumping up to the 3rd file.

### Examples

Expand Down
3 changes: 0 additions & 3 deletions src/Jive.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
module Jive

export Mock, @mockup
include("mockup.jl")

export @skip
include("skip.jl")

Expand Down
4 changes: 2 additions & 2 deletions src/__REPL__.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ macro __REPL__()
end
end
quote
if Base.JLOptions().isinteractive == 1
if Base.JLOptions().isinteractive == 1 || isdefined(Base, :active_repl)
throw(REPLError())
elseif !isdefined(Base, :active_repl)
else
interactiveinput = isa(stdin, Base.TTY)
quiet = true
banner = false
Expand Down
84 changes: 0 additions & 84 deletions src/mockup.jl

This file was deleted.

Loading

0 comments on commit 68a620b

Please sign in to comment.