From e36563990a8d95c6ae58a2cdb06cfc9af5bbb76c Mon Sep 17 00:00:00 2001 From: Giorgio Calderone Date: Thu, 17 Jan 2019 16:28:27 +0100 Subject: [PATCH] Updated --- .travis.yml | 11 ++--------- src/Gnuplot.jl | 3 +-- test/runtests.jl | 13 ++++++++----- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 298f9e9..a3c6afd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ os: - linux - osx julia: - - 0.7 + - 1.0 - nightly notifications: email: false @@ -17,18 +17,11 @@ matrix: allow_failures: - julia: nightly -## uncomment and modify the following lines to manually install system packages -addons: - apt: # apt-get for linux - packages: - - gnuplot - -before_script: # homebrew for mac - - if [ $TRAVIS_OS_NAME = osx ]; then brew install gnuplot; fi ## uncomment the following lines to override the default test script #script: # - julia -e 'Pkg.clone(pwd()); Pkg.build("Gnuplot"); Pkg.test("Gnuplot"; coverage=true)' + # after_success: # # push coverage results to Coveralls # - julia -e 'cd(Pkg.dir("Gnuplot")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' diff --git a/src/Gnuplot.jl b/src/Gnuplot.jl index 380dc0e..d3168e2 100644 --- a/src/Gnuplot.jl +++ b/src/Gnuplot.jl @@ -106,7 +106,6 @@ function CheckGnuplotVersion(cmd::AbstractString) end if ver < v"4.7" - # Do not raise error in order to pass Travis CI test, since it has v4.6 error("gnuplot ver. >= 4.7 is required, but " * string(ver) * " was found.") end @info " Gnuplot version: " * string(ver) @@ -214,7 +213,7 @@ end # -------------------------------------------------------------------- -writeread(gp::DrySession, str::AbstractString) = nothing +writeread(gp::DrySession, str::AbstractString) = "" function writeread(gp::Session, str::AbstractString) global state write(gp.pin, "print 'GNUPLOT_CAPTURE_BEGIN'\n") diff --git a/test/runtests.jl b/test/runtests.jl index 76a1a13..3f09684 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -54,11 +54,14 @@ name = "\$MyDataSet1" @gp :- 2 xlab="X label" ylab="Residuals" :- @gp :- "plot $name u 1:((f(\$1)-\$2) / \$3):(1) w errorbars notit" -# Retrieve values fr a, b and c -a = parse(Float64, exec("print a")) -b = parse(Float64, exec("print b")) -c = parse(Float64, exec("print c")) - +# Retrieve values for a, b and c +a = 0; b = 0; c = 0; +try + a = parse(Float64, exec("print a")) + b = parse(Float64, exec("print b")) + c = parse(Float64, exec("print c")) +catch +end gnuplot(:dry) @gp :dry "f(x) = a * sin(b + c*x); a = 1; b = 1; c = 1;" :- @gp :- :dry "a = $a; b = $b; c = $c" :-