Description: Fix tests so that they can run non-interactively
Author: Lucas Nussbaum <lucas@debian.org>
Origin: vendor
Forwarded: not-needed
Last-Update: 2012-06-11

--- a/test/sinwave.rb
+++ b/test/sinwave.rb
@@ -1,4 +1,4 @@
-require '../lib/gnuplot'
+require 'gnuplot'
 
 Gnuplot.open do |gp|
   Gnuplot::Plot.new( gp ) do |plot|
@@ -7,6 +7,7 @@
     plot.title  "Sin Wave Example"
     plot.ylabel "x"
     plot.xlabel "sin(x)"
+    plot.set "terminal", "dumb"
     
     plot.data << Gnuplot::DataSet.new( "sin(x)" ) do |ds|
       ds.with = "lines"
--- a/test/multtest.rb
+++ b/test/multtest.rb
@@ -1,4 +1,4 @@
-require '../lib/gnuplot'
+require 'gnuplot'
 
 # File.open( "gnuplot.dat", "w") do |gp|
 Gnuplot.open do |gp|
@@ -8,6 +8,7 @@
     plot.title  "Sin Wave Example"
     plot.ylabel "x"
     plot.xlabel "sin(x)"
+    plot.set "terminal", "dumb"
     
     x = (0..50).collect { |v| v.to_f }
     y = x.collect { |v| v ** 2 }
--- a/test/arrtest.rb
+++ b/test/arrtest.rb
@@ -1,4 +1,4 @@
-require '../lib/gnuplot'
+require 'gnuplot'
 
 Gnuplot.open do |gp|
   Gnuplot::Plot.new( gp ) do |plot|
@@ -6,6 +6,7 @@
     plot.title  "Array Plot Example"
     plot.ylabel "x"
     plot.xlabel "x^2"
+    plot.set "terminal", "dumb"
     
     x = (0..50).collect { |v| v.to_f }
     y = x.collect { |v| v ** 2 }
--- a/test/histtest.rb
+++ b/test/histtest.rb
@@ -1,4 +1,4 @@
-require '../lib/gnuplot'
+require 'gnuplot'
 
 Gnuplot.open do |gp|
     gp << "bin(x, s) = s*int(x/s)\n"
@@ -7,6 +7,7 @@
 	plot.title  "Histogram"
 	plot.xlabel "x"
 	plot.ylabel "frequency"
+  plot.set "terminal", "dumb"
 
 	x = (0..500).collect { |v| (rand()-0.5)**3 }
 	plot.data << Gnuplot::DataSet.new( [x] ) do |ds|
--- a/test/test_gnuplot.rb
+++ b/test/test_gnuplot.rb
@@ -1,6 +1,6 @@
 # -*- ruby -*-
 
-require '../lib/gnuplot'
+require 'gnuplot'
 require 'test/unit'
 
 class StdDataTest < Test::Unit::TestCase
--- a/examples/discrete_points.rb
+++ b/examples/discrete_points.rb
@@ -6,7 +6,8 @@
     plot.title  "Array Plot Example"
     plot.ylabel "x^2"
     plot.xlabel "x"
-    
+    plot.set "terminal", "dumb"
+
     x = (0..50).collect { |v| v.to_f }
     y = x.collect { |v| v ** 2 }
 
--- a/examples/multiple_data_sets.rb
+++ b/examples/multiple_data_sets.rb
@@ -7,6 +7,7 @@
     plot.title  "Sin Wave Example"
     plot.ylabel "sin(x)"
     plot.xlabel "x"
+    plot.set "terminal", "dumb"
     
     x = (0..50).collect { |v| v.to_f }
     y = x.collect { |v| v ** 2 }
--- a/examples/sin_wave.rb
+++ b/examples/sin_wave.rb
@@ -7,6 +7,7 @@
     plot.title  "Sin Wave Example"
     plot.ylabel "sin(x)"
     plot.xlabel "x"
+    plot.terminal "dumb"
     
     plot.data << Gnuplot::DataSet.new( "sin(x)" ) do |ds|
       ds.with = "lines"
@@ -15,4 +16,4 @@
     
   end
   sleep 10
-end
\ No newline at end of file
+end
--- a/examples/histogram.rb
+++ b/examples/histogram.rb
@@ -6,6 +6,7 @@
     plot.title  "Histogram example"
     plot.style  "data histograms"
     plot.xtics  "nomirror rotate by -45"
+    plot.terminal "dumb"
     
     titles = %w{decade Austria Hungary  Belgium} 
     data = [
@@ -29,4 +30,4 @@
     end
   
   end
-end
\ No newline at end of file
+end
