File: fix-tests.patch

package info (click to toggle)
ruby-gnuplot 2.6.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 216 kB
  • ctags: 64
  • sloc: ruby: 456; makefile: 2
file content (136 lines) | stat: -rw-r--r-- 3,178 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
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