2020-06-13 18:43:32 +02:00
|
|
|
# Test if running document with and without cache works
|
2015-01-08 17:52:42 +01:00
|
|
|
isdir("documents/cache") && rm("documents/cache", recursive = true)
|
2018-07-26 19:32:10 +02:00
|
|
|
weave("documents/chunk_options.noweb", cache=:all)
|
2018-07-23 12:37:25 +02:00
|
|
|
result = read("documents/chunk_options.md", String)
|
2015-01-08 18:35:47 +01:00
|
|
|
rm("documents/chunk_options.md")
|
2018-07-26 19:32:10 +02:00
|
|
|
weave("documents/chunk_options.noweb", cache=:all)
|
2018-07-23 12:37:25 +02:00
|
|
|
cached_result = read("documents/chunk_options.md", String)
|
2015-01-08 17:52:42 +01:00
|
|
|
@test result == cached_result
|
|
|
|
|
|
|
|
# cache = :user
|
|
|
|
isdir("documents/cache") && rm("documents/cache", recursive = true)
|
|
|
|
out = "documents/chunk_cache.md"
|
2018-07-26 19:32:10 +02:00
|
|
|
Weave.weave("documents/chunk_cache.noweb", cache=:user);
|
2018-07-23 12:37:25 +02:00
|
|
|
result = read(out, String)
|
2015-01-08 18:35:47 +01:00
|
|
|
rm(out)
|
2018-07-26 19:32:10 +02:00
|
|
|
Weave.weave("documents/chunk_cache.noweb", cache=:user);
|
2018-07-23 12:37:25 +02:00
|
|
|
cached_result = read(out, String)
|
2015-01-08 17:52:42 +01:00
|
|
|
@test result == cached_result
|
|
|
|
|
2016-12-28 00:12:53 +01:00
|
|
|
# cache = :all
|
|
|
|
isdir("documents/cache") && rm("documents/cache", recursive = true)
|
|
|
|
out = "documents/chunk_cache.md"
|
|
|
|
Weave.weave("documents/chunk_cache.noweb", cache=:all);
|
2018-07-23 12:37:25 +02:00
|
|
|
result = read(out, String)
|
2016-12-28 00:12:53 +01:00
|
|
|
rm(out)
|
|
|
|
Weave.weave("documents/chunk_cache.noweb", cache=:all);
|
2018-07-23 12:37:25 +02:00
|
|
|
cached_result = read(out, String)
|
2016-12-28 00:12:53 +01:00
|
|
|
@test result == cached_result
|