Browse Source

test execute = true

pull/5/head
Fredrik Ekre 8 years ago
parent
commit
039f084919
  1. 28
      test/runtests.jl

28
test/runtests.jl

@ -518,6 +518,34 @@ end @@ -518,6 +518,34 @@ end
@test contains(notebook, "name: foobar")
@test !contains(notebook, "name: inputfile")
@test !contains(notebook, "name: @__NAME__")
# execute = true
Literate.notebook(inputfile, outdir)
expected_outputs = rstrip.((
"""
"cells": [
""",
"""
"data": {
"text/plain": "3"
},
""",
"""
"text": [
"12345678910"
]
"""))
notebook = read(joinpath(outdir, "inputfile.ipynb"), String)
lastidx = 1
for out in expected_outputs
idx = Compat.findnext(out, notebook, lastidx)
@test idx !== nothing
lastidx = nextind(notebook, last(idx))
end
end
end
end

Loading…
Cancel
Save