From 1ddff9a1b7aa65839a489da823285bc450d41030 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Mon, 11 May 2020 09:40:10 +0900 Subject: [PATCH] more test clean up --- test/chunk_opts_gadfly.jl | 18 --- test/documents/default_opts.noweb | 30 ---- test/documents/default_opts_ref.tex | 43 ------ test/documents/test_hold.mdw | 67 -------- test/documents/test_hold_ref.md | 232 ---------------------------- 5 files changed, 390 deletions(-) delete mode 100644 test/chunk_opts_gadfly.jl delete mode 100644 test/documents/default_opts.noweb delete mode 100644 test/documents/default_opts_ref.tex delete mode 100644 test/documents/test_hold.mdw delete mode 100644 test/documents/test_hold_ref.md diff --git a/test/chunk_opts_gadfly.jl b/test/chunk_opts_gadfly.jl deleted file mode 100644 index fced443..0000000 --- a/test/chunk_opts_gadfly.jl +++ /dev/null @@ -1,18 +0,0 @@ -using Weave -using Test - -cleanup = true - -#Test hold and term options -weave("documents/test_hold.mdw", doctype="pandoc", plotlib="Gadfly") -result = read("documents/test_hold.md", String) -ref = read("documents/test_hold_ref.md", String) -@test result == ref -cleanup && rm("documents/test_hold.md") - -#Test setting and restoring chunk options -Weave.weave("documents/default_opts.noweb", doctype = "tex") -result = read("documents/default_opts.tex", String) -ref = read("documents/default_opts_ref.tex", String) -@test result == ref -cleanup && rm("documents/default_opts.tex") diff --git a/test/documents/default_opts.noweb b/test/documents/default_opts.noweb deleted file mode 100644 index fe571bb..0000000 --- a/test/documents/default_opts.noweb +++ /dev/null @@ -1,30 +0,0 @@ - - -<<>>= -using Gadfly -print(1:10) -plot(x = 1:10) -@ - -<<>>= -import Weave -Weave.set_chunk_defaults(Dict{Symbol, Any}( - :out_width => "\\0.5linewidth", - :results => "tex" - )) -@ - -<<>>= -print(1:10) -plot(x = 1:10) -@ - - -<>= -Weave.restore_chunk_defaults() -@ - -<<>>= -print(1:10) -plot(x = 1:10) -@ diff --git a/test/documents/default_opts_ref.tex b/test/documents/default_opts_ref.tex deleted file mode 100644 index 271a831..0000000 --- a/test/documents/default_opts_ref.tex +++ /dev/null @@ -1,43 +0,0 @@ -\begin{juliacode} -using Gadfly -print(1:10) -\end{juliacode} -\begin{juliaout} -1:10 -\end{juliaout} - -\begin{juliacode} -plot(x = 1:10) -\end{juliacode} -\includegraphics[width=\linewidth]{figures/default_opts_1_1.pdf} - -\begin{juliacode} -import Weave -Weave.set_chunk_defaults(Dict{Symbol, Any}( - :out_width => "\\0.5linewidth", - :results => "tex" - )) -\end{juliacode} - -\begin{juliacode} -print(1:10) -\end{juliacode} -1:10 - -\begin{juliacode} -plot(x = 1:10) -\end{juliacode} -\includegraphics[width=\0.5linewidth]{figures/default_opts_3_1.pdf} - - -\begin{juliacode} -print(1:10) -\end{juliacode} -\begin{juliaout} -1:10 -\end{juliaout} - -\begin{juliacode} -plot(x = 1:10) -\end{juliacode} -\includegraphics[width=\linewidth]{figures/default_opts_5_1.pdf} diff --git a/test/documents/test_hold.mdw b/test/documents/test_hold.mdw deleted file mode 100644 index af5dd48..0000000 --- a/test/documents/test_hold.mdw +++ /dev/null @@ -1,67 +0,0 @@ - -# Default - -<<>>= -using Gadfly -x = 1:10 -plot(x = x, y = x) -print(x) -plot(x = x, y = x) -display(x) -@ - -# Terminal - -<>= -using Gadfly -x = 1:10 -plot(x = x, y = x) -print(x) -plot(x = x, y = x) -display(x) -@ - -# Prompt - -<>= -using Gadfly -x = 1:10 -plot(x = x, y = x) -print(x) -plot(x = x, y = x) -display(x) -@ - -# Display - -<>= -using Gadfly -x = 1:10 -plot(x = x, y = x) -print(x) -plot(x = x, y = x) -display(x) -@ - -# Both display and term - -<>= -using Gadfly -x = 1:10 -plot(x = x, y = x) -print(x) -plot(x = x, y = x) -display(x) -@ - - -# Hold results - -<>= -using Gadfly -x = 1:10 -plot(x = x, y = x) -print(x) -plot(x = x, y = x) -display(x) -@ diff --git a/test/documents/test_hold_ref.md b/test/documents/test_hold_ref.md deleted file mode 100644 index abb20fc..0000000 --- a/test/documents/test_hold_ref.md +++ /dev/null @@ -1,232 +0,0 @@ - -# Default - -~~~~{.julia} -using Gadfly -x = 1:10 -plot(x = x, y = x) -~~~~~~~~~~~~~ - - -![](figures/test_hold_1_1.png)\ - - -~~~~{.julia} -print(x) -~~~~~~~~~~~~~ - - -~~~~ -1:10 -~~~~ - - - -~~~~{.julia} -plot(x = x, y = x) -~~~~~~~~~~~~~ - - -![](figures/test_hold_1_2.png)\ - - -~~~~{.julia} -display(x) -~~~~~~~~~~~~~ - - -~~~~ -1:10 -~~~~ - - - - - -# Terminal - -~~~~{.julia} -julia> using Gadfly - -julia> x = 1:10 -1:10 - -julia> plot(x = x, y = x) - -~~~~~~~~~~~~~ - - -![](figures/test_hold_2_1.png)\ - - -~~~~{.julia} -julia> print(x) -1:10 -julia> plot(x = x, y = x) - -~~~~~~~~~~~~~ - - -![](figures/test_hold_2_2.png)\ - - -~~~~{.julia} -julia> display(x) -1:10 - -~~~~~~~~~~~~~ - - - - - -# 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} -using Gadfly -x = 1:10 -plot(x = x, y = x) -print(x) -plot(x = x, y = x) -display(x) -~~~~~~~~~~~~~ - - -~~~~ -1:101:10 -~~~~ - - -![](figures/test_hold_6_1.png)\ - -![](figures/test_hold_6_2.png)\ -