mirror of https://github.com/mpastell/Weave.jl
Add script reader test
parent
361f404f95
commit
9e5ad966eb
|
@ -33,7 +33,10 @@ infile = "documents/chunk_options.noweb"
|
||||||
convert_doc(infile, outfile)
|
convert_doc(infile, outfile)
|
||||||
input = contents(Weave.read_doc(infile))
|
input = contents(Weave.read_doc(infile))
|
||||||
output = contents(Weave.read_doc(outfile))
|
output = contents(Weave.read_doc(outfile))
|
||||||
|
@test input == output
|
||||||
rm(outfile)
|
rm(outfile)
|
||||||
|
|
||||||
@test input == output
|
# Test script reader
|
||||||
|
@test contents(
|
||||||
|
Weave.read_doc("documents/chunk_options.noweb")) == contents(
|
||||||
|
Weave.read_doc("documents/chunk_options.jl"))
|
|
@ -0,0 +1,66 @@
|
||||||
|
|
||||||
|
#+ term=true
|
||||||
|
|
||||||
|
y= [2, 5, 12]
|
||||||
|
|
||||||
|
|
||||||
|
#+ term=true
|
||||||
|
|
||||||
|
x = 1:10
|
||||||
|
d = Dict("Weave" => "testing")
|
||||||
|
y = [2, 4 ,8]
|
||||||
|
|
||||||
|
|
||||||
|
#+
|
||||||
|
|
||||||
|
x = [12, 10]
|
||||||
|
println(y)
|
||||||
|
println(x)
|
||||||
|
|
||||||
|
|
||||||
|
#+ echo=false
|
||||||
|
|
||||||
|
println("Results without code")
|
||||||
|
println(x)
|
||||||
|
|
||||||
|
|
||||||
|
#+ eval=false; tangle=false
|
||||||
|
|
||||||
|
y = randn(5)
|
||||||
|
println("Don't eval, but show code")
|
||||||
|
|
||||||
|
|
||||||
|
#+
|
||||||
|
|
||||||
|
y = 1:5
|
||||||
|
println(y)
|
||||||
|
|
||||||
|
|
||||||
|
#+ results="hidden"
|
||||||
|
|
||||||
|
a = "Don't print me"
|
||||||
|
println(a)
|
||||||
|
|
||||||
|
|
||||||
|
#+ results="as_is"
|
||||||
|
|
||||||
|
println("No markup for results.")
|
||||||
|
|
||||||
|
#'
|
||||||
|
#'
|
||||||
|
#' Test wrapping:
|
||||||
|
#'
|
||||||
|
#+
|
||||||
|
|
||||||
|
println(collect(0:10:1000))
|
||||||
|
|
||||||
|
|
||||||
|
#+ wrap=false
|
||||||
|
|
||||||
|
println(collect(0:10:1000))
|
||||||
|
|
||||||
|
|
||||||
|
#+ line_width=60
|
||||||
|
|
||||||
|
println(collect(0:10:1000))
|
||||||
|
|
Loading…
Reference in New Issue