Browse Source

replace \ with / in writer instead of tests

pull/5/head
Fredrik Ekre 8 years ago
parent
commit
8e6b12b9d9
  1. 2
      src/Examples.jl
  2. 5
      test/runtests.jl

2
src/Examples.jl

@ -221,7 +221,7 @@ function markdown(inputfile, outputdir; preprocess = identity, postprocess = ide @@ -221,7 +221,7 @@ function markdown(inputfile, outputdir; preprocess = identity, postprocess = ide
pkg = first(split(last(split(repo, '/')), '.'))
content = """
#' ```@meta
#' EditURL = "@__REPO_ROOT_URL__$(relpath(inputfile, Pkg.dir(pkg)))"
#' EditURL = "@__REPO_ROOT_URL__$(replace(relpath(inputfile, Pkg.dir(pkg)), "\\" => "/"))"
#' ```
""" * content

5
test/runtests.jl

@ -207,7 +207,6 @@ content = """ @@ -207,7 +207,6 @@ content = """
"""
script = read(joinpath(outdir, "inputfile.jl"), String)
script = replace(script, "\\" => "/") # normalize \ to / on Windows
@test script == expected_script
# no tag -> latest directory
@ -305,12 +304,11 @@ end @@ -305,12 +304,11 @@ end
Some math:
```math
/int f(x) dx
\\int f(x) dx
```
"""
markdown = read(joinpath(outdir, "inputfile.md"), String)
markdown = replace(markdown, "\\" => "/") # normalize \ to / on Windows
@test markdown == expected_markdown
# no tag -> latest directory
@ -487,7 +485,6 @@ end @@ -487,7 +485,6 @@ end
" \"name\": \"julia-", " \"display_name\": \"Julia ", " \"language\": \"julia\"")
@test contains(notebook, metadata)
end
# notebook = replace(notebook, "\\" => "/") # normalize \ to / on Windows
# no tag -> latest directory
withenv("TRAVIS_REPO_SLUG" => "fredrikekre/Examples.jl",

Loading…
Cancel
Save