mirror of https://github.com/mpastell/Weave.jl
Adds tests for display and prompt chunk options
parent
cffbb7ff5c
commit
4a2062644b
|
@ -21,6 +21,40 @@ plot(x = x, y = x)
|
|||
display(x)
|
||||
@
|
||||
|
||||
# Prompt
|
||||
|
||||
<<term=true; prompt="\njulietta> ">>=
|
||||
using Gadfly
|
||||
x = 1:10
|
||||
plot(x = x, y = x)
|
||||
print(x)
|
||||
plot(x = x, y = x)
|
||||
display(x)
|
||||
@
|
||||
|
||||
# Display
|
||||
|
||||
<<display=true>>=
|
||||
using Gadfly
|
||||
x = 1:10
|
||||
plot(x = x, y = x)
|
||||
print(x)
|
||||
plot(x = x, y = x)
|
||||
display(x)
|
||||
@
|
||||
|
||||
# Both display and term
|
||||
|
||||
<<display=true;term=true>>=
|
||||
using Gadfly
|
||||
x = 1:10
|
||||
plot(x = x, y = x)
|
||||
print(x)
|
||||
plot(x = x, y = x)
|
||||
display(x)
|
||||
@
|
||||
|
||||
|
||||
# Hold results
|
||||
|
||||
<<hold=true>>=
|
||||
|
|
|
@ -82,6 +82,137 @@ julia> display(x)
|
|||
|
||||
|
||||
|
||||
# Prompt
|
||||
|
||||
~~~~{.julia}
|
||||
julietta> using Gadfly
|
||||
|
||||
julietta> x = 1:10
|
||||
|
||||
1:10
|
||||
julietta> plot(x = x, y = x)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
![](figures/test_hold_3_1.png)\
|
||||
|
||||
|
||||
~~~~{.julia}
|
||||
julietta> print(x)
|
||||
1:10
|
||||
julietta> plot(x = x, y = x)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
![](figures/test_hold_3_2.png)\
|
||||
|
||||
|
||||
~~~~{.julia}
|
||||
julietta> display(x)
|
||||
1:10
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Display
|
||||
|
||||
~~~~{.julia}
|
||||
using Gadfly
|
||||
x = 1:10
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
~~~~
|
||||
1:10
|
||||
~~~~
|
||||
|
||||
|
||||
|
||||
~~~~{.julia}
|
||||
plot(x = x, y = x)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
![](figures/test_hold_4_1.png)\
|
||||
|
||||
|
||||
~~~~{.julia}
|
||||
print(x)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
~~~~
|
||||
1:10
|
||||
~~~~
|
||||
|
||||
|
||||
|
||||
~~~~{.julia}
|
||||
plot(x = x, y = x)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
![](figures/test_hold_4_2.png)\
|
||||
|
||||
|
||||
~~~~{.julia}
|
||||
display(x)
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
~~~~
|
||||
1:10
|
||||
~~~~
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Both display and term
|
||||
|
||||
~~~~{.julia}
|
||||
julia> using Gadfly
|
||||
|
||||
julia> x = 1:10
|
||||
|
||||
1:10
|
||||
julia> plot(x = x, y = x)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
![](figures/test_hold_5_1.png)\
|
||||
|
||||
|
||||
~~~~{.julia}
|
||||
julia> print(x)
|
||||
1:10
|
||||
julia> plot(x = x, y = x)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
![](figures/test_hold_5_2.png)\
|
||||
|
||||
|
||||
~~~~{.julia}
|
||||
julia> display(x)
|
||||
1:10
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Hold results
|
||||
|
||||
~~~~{.julia}
|
||||
|
@ -100,7 +231,7 @@ display(x)
|
|||
~~~~
|
||||
|
||||
|
||||
![](figures/test_hold_3_1.png)\
|
||||
![](figures/test_hold_6_1.png)\
|
||||
|
||||
![](figures/test_hold_3_2.png)\
|
||||
![](figures/test_hold_6_2.png)\
|
||||
|
||||
|
|
Loading…
Reference in New Issue