vedeu 0.8.19 → 0.8.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/integrations/342_streams.rb +5 -16
- data/integrations/dsl_app_001.rb +8 -19
- data/integrations/dsl_app_002.rb +8 -20
- data/integrations/dsl_app_003.rb +8 -19
- data/integrations/dsl_app_004.rb +8 -19
- data/integrations/dsl_app_005.rb +8 -19
- data/integrations/dsl_app_006.rb +8 -19
- data/integrations/dsl_app_007.rb +8 -19
- data/integrations/dsl_app_008.rb +8 -19
- data/integrations/dsl_app_009.rb +8 -19
- data/integrations/dsl_app_010.rb +8 -19
- data/integrations/dsl_app_011.rb +8 -19
- data/integrations/dsl_app_012.rb +8 -19
- data/integrations/dsl_app_013.rb +8 -19
- data/integrations/dsl_app_014.rb +8 -19
- data/integrations/dsl_app_015.rb +8 -19
- data/integrations/dsl_app_016.rb +8 -19
- data/integrations/dsl_app_017.rb +8 -19
- data/integrations/dsl_app_018.rb +8 -19
- data/integrations/dsl_app_019.rb +8 -19
- data/integrations/dsl_app_020.rb +8 -19
- data/integrations/dsl_app_021.rb +8 -19
- data/integrations/dsl_app_022.rb +8 -19
- data/integrations/dsl_app_border_001.rb +8 -19
- data/integrations/dsl_app_border_002.rb +8 -19
- data/integrations/dsl_app_border_003.rb +8 -19
- data/integrations/dsl_app_border_004.rb +8 -19
- data/integrations/dsl_app_border_005.rb +8 -19
- data/integrations/dsl_app_border_006.rb +58 -0
- data/integrations/dsl_app_border_007.rb +58 -0
- data/integrations/dsl_app_border_008.rb +57 -0
- data/integrations/dsl_app_border_009.rb +57 -0
- data/integrations/dsl_app_border_010.rb +57 -0
- data/integrations/dsl_app_border_011.rb +57 -0
- data/integrations/expected/dsl_app_border_006.out +1 -0
- data/integrations/expected/dsl_app_border_007.out +1 -0
- data/integrations/expected/dsl_app_border_008.out +1 -0
- data/integrations/expected/dsl_app_border_009.out +1 -0
- data/integrations/expected/dsl_app_border_010.out +1 -0
- data/integrations/expected/dsl_app_border_011.out +1 -0
- data/integrations/test_runner.rb +60 -0
- data/integrations/test_runner.sh +11 -5
- data/lib/vedeu/version.rb +1 -1
- data/test/lib/vedeu/repositories/repositories_test.rb +18 -4
- data/test/lib/vedeu_test.rb +12 -0
- data/test/support/examples/material_colours_app.rb +0 -134
- data/vedeu.gemspec +1 -1
- metadata +17 -4
@@ -5,6 +5,8 @@
|
|
5
5
|
require 'bundler/setup'
|
6
6
|
require 'vedeu'
|
7
7
|
|
8
|
+
TESTCASE = 'dsl_app_border_005'
|
9
|
+
|
8
10
|
class DSLApp
|
9
11
|
|
10
12
|
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
@@ -15,11 +17,11 @@ class DSLApp
|
|
15
17
|
log '/tmp/vedeu_views_dsl.log'
|
16
18
|
renderers [
|
17
19
|
Vedeu::Renderers::Terminal.new(
|
18
|
-
filename:
|
20
|
+
filename: "/tmp/#{TESTCASE}.out",
|
19
21
|
write_file: true),
|
20
|
-
# Vedeu::Renderers::JSON.new(filename:
|
21
|
-
# Vedeu::Renderers::HTML.new(filename:
|
22
|
-
# Vedeu::Renderers::Text.new(filename:
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: "/tmp/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: "/tmp/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: "/tmp/#{TESTCASE}.txt"),
|
23
25
|
]
|
24
26
|
run_once!
|
25
27
|
standalone!
|
@@ -39,14 +41,6 @@ class DSLApp
|
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
42
|
-
def self.actual
|
43
|
-
File.read('/tmp/dsl_app_border_005.out')
|
44
|
-
end
|
45
|
-
|
46
|
-
def self.expected
|
47
|
-
File.read(File.expand_path('../expected/dsl_app_border_005.out', __FILE__))
|
48
|
-
end
|
49
|
-
|
50
44
|
def self.start(argv = ARGV)
|
51
45
|
Vedeu::Launcher.execute!(argv)
|
52
46
|
end
|
@@ -55,10 +49,5 @@ end # DSLApp
|
|
55
49
|
|
56
50
|
DSLApp.start
|
57
51
|
|
58
|
-
|
59
|
-
|
60
|
-
exit 0;
|
61
|
-
else
|
62
|
-
puts "#{__FILE__} \e[31mFailed.\e[39m"
|
63
|
-
exit 1;
|
64
|
-
end
|
52
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
53
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
TESTCASE = 'dsl_app_border_006'
|
9
|
+
|
10
|
+
class DSLApp
|
11
|
+
|
12
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
13
|
+
|
14
|
+
Vedeu.configure do
|
15
|
+
debug!
|
16
|
+
height 10
|
17
|
+
log '/tmp/vedeu_views_dsl.log'
|
18
|
+
renderers [
|
19
|
+
Vedeu::Renderers::Terminal.new(
|
20
|
+
filename: "/tmp/#{TESTCASE}.out",
|
21
|
+
write_file: true),
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: "/tmp/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: "/tmp/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: "/tmp/#{TESTCASE}.txt"),
|
25
|
+
]
|
26
|
+
run_once!
|
27
|
+
standalone!
|
28
|
+
end
|
29
|
+
|
30
|
+
load File.dirname(__FILE__) + '/support/test_interface.rb'
|
31
|
+
|
32
|
+
Vedeu.border :test_interface do
|
33
|
+
foreground '#ff5722'
|
34
|
+
top_left 'A', colour: { background: '#ff0000' }
|
35
|
+
top_right 'B', colour: { background: '#0000ff', foreground: '#ffffff' }
|
36
|
+
bottom_left 'C', colour: { background: '#ffff00', foreground: '#000000' }
|
37
|
+
bottom_right 'D', colour: { background: '#ffffff' }
|
38
|
+
end
|
39
|
+
|
40
|
+
Vedeu.render do
|
41
|
+
view(:test_interface) do
|
42
|
+
lines do
|
43
|
+
line 'custom'
|
44
|
+
line 'vertices'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.start(argv = ARGV)
|
50
|
+
Vedeu::Launcher.execute!(argv)
|
51
|
+
end
|
52
|
+
|
53
|
+
end # DSLApp
|
54
|
+
|
55
|
+
DSLApp.start
|
56
|
+
|
57
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
58
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
TESTCASE = 'dsl_app_border_007'
|
9
|
+
|
10
|
+
class DSLApp
|
11
|
+
|
12
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
13
|
+
|
14
|
+
Vedeu.configure do
|
15
|
+
debug!
|
16
|
+
height 10
|
17
|
+
log '/tmp/vedeu_views_dsl.log'
|
18
|
+
renderers [
|
19
|
+
Vedeu::Renderers::Terminal.new(
|
20
|
+
filename: "/tmp/#{TESTCASE}.out",
|
21
|
+
write_file: true),
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: "/tmp/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: "/tmp/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: "/tmp/#{TESTCASE}.txt"),
|
25
|
+
]
|
26
|
+
run_once!
|
27
|
+
standalone!
|
28
|
+
end
|
29
|
+
|
30
|
+
load File.dirname(__FILE__) + '/support/test_interface.rb'
|
31
|
+
|
32
|
+
Vedeu.border :test_interface do
|
33
|
+
foreground '#ff5722'
|
34
|
+
top_horizontal '*', colour: { background: '#000000', foreground: '#ffffff' }
|
35
|
+
left_vertical '$', colour: { background: '#0000ff', foreground: '#ffffff' }
|
36
|
+
right_vertical '%', colour: { background: '#ffff00', foreground: '#000000' }
|
37
|
+
bottom_horizontal '&', colour: { background: '#ffffff' }
|
38
|
+
end
|
39
|
+
|
40
|
+
Vedeu.render do
|
41
|
+
view(:test_interface) do
|
42
|
+
lines do
|
43
|
+
line 'custom'
|
44
|
+
line 'edges'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.start(argv = ARGV)
|
50
|
+
Vedeu::Launcher.execute!(argv)
|
51
|
+
end
|
52
|
+
|
53
|
+
end # DSLApp
|
54
|
+
|
55
|
+
DSLApp.start
|
56
|
+
|
57
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
58
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
TESTCASE = 'dsl_app_border_008'
|
9
|
+
|
10
|
+
class DSLApp
|
11
|
+
|
12
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
13
|
+
|
14
|
+
Vedeu.configure do
|
15
|
+
debug!
|
16
|
+
height 10
|
17
|
+
log '/tmp/vedeu_views_dsl.log'
|
18
|
+
renderers [
|
19
|
+
Vedeu::Renderers::Terminal.new(
|
20
|
+
filename: "/tmp/#{TESTCASE}.out",
|
21
|
+
write_file: true),
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: "/tmp/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: "/tmp/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: "/tmp/#{TESTCASE}.txt"),
|
25
|
+
]
|
26
|
+
run_once!
|
27
|
+
standalone!
|
28
|
+
end
|
29
|
+
|
30
|
+
load File.dirname(__FILE__) + '/support/test_interface.rb'
|
31
|
+
|
32
|
+
Vedeu.border :test_interface do
|
33
|
+
foreground '#ffffff'
|
34
|
+
show_right false
|
35
|
+
show_bottom false
|
36
|
+
show_left false
|
37
|
+
end
|
38
|
+
|
39
|
+
Vedeu.render do
|
40
|
+
view(:test_interface) do
|
41
|
+
lines do
|
42
|
+
line 'only'
|
43
|
+
line 'top'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.start(argv = ARGV)
|
49
|
+
Vedeu::Launcher.execute!(argv)
|
50
|
+
end
|
51
|
+
|
52
|
+
end # DSLApp
|
53
|
+
|
54
|
+
DSLApp.start
|
55
|
+
|
56
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
57
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
TESTCASE = 'dsl_app_border_009'
|
9
|
+
|
10
|
+
class DSLApp
|
11
|
+
|
12
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
13
|
+
|
14
|
+
Vedeu.configure do
|
15
|
+
debug!
|
16
|
+
height 10
|
17
|
+
log '/tmp/vedeu_views_dsl.log'
|
18
|
+
renderers [
|
19
|
+
Vedeu::Renderers::Terminal.new(
|
20
|
+
filename: "/tmp/#{TESTCASE}.out",
|
21
|
+
write_file: true),
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: "/tmp/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: "/tmp/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: "/tmp/#{TESTCASE}.txt"),
|
25
|
+
]
|
26
|
+
run_once!
|
27
|
+
standalone!
|
28
|
+
end
|
29
|
+
|
30
|
+
load File.dirname(__FILE__) + '/support/test_interface.rb'
|
31
|
+
|
32
|
+
Vedeu.border :test_interface do
|
33
|
+
foreground '#ffffff'
|
34
|
+
show_top false
|
35
|
+
show_bottom false
|
36
|
+
show_left false
|
37
|
+
end
|
38
|
+
|
39
|
+
Vedeu.render do
|
40
|
+
view(:test_interface) do
|
41
|
+
lines do
|
42
|
+
line 'only'
|
43
|
+
line 'right'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.start(argv = ARGV)
|
49
|
+
Vedeu::Launcher.execute!(argv)
|
50
|
+
end
|
51
|
+
|
52
|
+
end # DSLApp
|
53
|
+
|
54
|
+
DSLApp.start
|
55
|
+
|
56
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
57
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
TESTCASE = 'dsl_app_border_010'
|
9
|
+
|
10
|
+
class DSLApp
|
11
|
+
|
12
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
13
|
+
|
14
|
+
Vedeu.configure do
|
15
|
+
debug!
|
16
|
+
height 10
|
17
|
+
log '/tmp/vedeu_views_dsl.log'
|
18
|
+
renderers [
|
19
|
+
Vedeu::Renderers::Terminal.new(
|
20
|
+
filename: "/tmp/#{TESTCASE}.out",
|
21
|
+
write_file: true),
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: "/tmp/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: "/tmp/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: "/tmp/#{TESTCASE}.txt"),
|
25
|
+
]
|
26
|
+
run_once!
|
27
|
+
standalone!
|
28
|
+
end
|
29
|
+
|
30
|
+
load File.dirname(__FILE__) + '/support/test_interface.rb'
|
31
|
+
|
32
|
+
Vedeu.border :test_interface do
|
33
|
+
foreground '#ffffff'
|
34
|
+
show_top false
|
35
|
+
show_right false
|
36
|
+
show_left false
|
37
|
+
end
|
38
|
+
|
39
|
+
Vedeu.render do
|
40
|
+
view(:test_interface) do
|
41
|
+
lines do
|
42
|
+
line 'only'
|
43
|
+
line 'bottom'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.start(argv = ARGV)
|
49
|
+
Vedeu::Launcher.execute!(argv)
|
50
|
+
end
|
51
|
+
|
52
|
+
end # DSLApp
|
53
|
+
|
54
|
+
DSLApp.start
|
55
|
+
|
56
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
57
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'vedeu'
|
7
|
+
|
8
|
+
TESTCASE = 'dsl_app_border_011'
|
9
|
+
|
10
|
+
class DSLApp
|
11
|
+
|
12
|
+
Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }
|
13
|
+
|
14
|
+
Vedeu.configure do
|
15
|
+
debug!
|
16
|
+
height 10
|
17
|
+
log '/tmp/vedeu_views_dsl.log'
|
18
|
+
renderers [
|
19
|
+
Vedeu::Renderers::Terminal.new(
|
20
|
+
filename: "/tmp/#{TESTCASE}.out",
|
21
|
+
write_file: true),
|
22
|
+
# Vedeu::Renderers::JSON.new(filename: "/tmp/#{TESTCASE}.json"),
|
23
|
+
# Vedeu::Renderers::HTML.new(filename: "/tmp/#{TESTCASE}.html"),
|
24
|
+
# Vedeu::Renderers::Text.new(filename: "/tmp/#{TESTCASE}.txt"),
|
25
|
+
]
|
26
|
+
run_once!
|
27
|
+
standalone!
|
28
|
+
end
|
29
|
+
|
30
|
+
load File.dirname(__FILE__) + '/support/test_interface.rb'
|
31
|
+
|
32
|
+
Vedeu.border :test_interface do
|
33
|
+
foreground '#ffffff'
|
34
|
+
show_top false
|
35
|
+
show_right false
|
36
|
+
show_bottom false
|
37
|
+
end
|
38
|
+
|
39
|
+
Vedeu.render do
|
40
|
+
view(:test_interface) do
|
41
|
+
lines do
|
42
|
+
line 'only'
|
43
|
+
line 'left'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.start(argv = ARGV)
|
49
|
+
Vedeu::Launcher.execute!(argv)
|
50
|
+
end
|
51
|
+
|
52
|
+
end # DSLApp
|
53
|
+
|
54
|
+
DSLApp.start
|
55
|
+
|
56
|
+
load File.dirname(__FILE__) + '/test_runner.rb'
|
57
|
+
TestRunner.result(TESTCASE, __FILE__)
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[2;2H[48;5;196m(0A(B[2;3H[38;5;202m[49m(0q(B[2;4H(0q(B[2;5H(0q(B[2;6H(0q(B[2;7H(0q(B[2;8H(0q(B[2;9H(0q(B[2;10H(0q(B[2;11H(0q(B[2;12H(0q(B[2;13H(0q(B[2;14H(0q(B[2;15H(0q(B[2;16H(0q(B[2;17H(0q(B[2;18H(0q(B[2;19H(0q(B[2;20H(0q(B[2;21H(0q(B[2;22H(0q(B[2;23H(0q(B[2;24H(0q(B[2;25H(0q(B[2;26H(0q(B[2;27H(0q(B[2;28H(0q(B[2;29H(0q(B[2;30H(0q(B[2;31H(0q(B[2;32H[38;5;231m[48;5;21m(0B(B[0m[3;2H[38;5;202m[49m(0x(B[3;3H[39m[49mc[3;4Hu[3;5Hs[3;6Ht[3;7Ho[3;8Hm[3;9H [3;10H [3;11H [3;12H [3;13H [3;14H [3;15H [3;16H [3;17H [3;18H [3;19H [3;20H [3;21H [3;22H [3;23H [3;24H [3;25H [3;26H [3;27H [3;28H [3;29H [3;30H [3;31H [3;32H[38;5;202m[49m(0x(B[0m[4;2H[38;5;202m[49m(0x(B[4;3H[39m[49mv[4;4He[4;5Hr[4;6Ht[4;7Hi[4;8Hc[4;9He[4;10Hs[4;11H [4;12H [4;13H [4;14H [4;15H [4;16H [4;17H [4;18H [4;19H [4;20H [4;21H [4;22H [4;23H [4;24H [4;25H [4;26H [4;27H [4;28H [4;29H [4;30H [4;31H [4;32H[38;5;202m[49m(0x(B[0m[5;2H[38;5;202m[49m(0x(B[5;3H[39m[49m [5;4H [5;5H [5;6H [5;7H [5;8H [5;9H [5;10H [5;11H [5;12H [5;13H [5;14H [5;15H [5;16H [5;17H [5;18H [5;19H [5;20H [5;21H [5;22H [5;23H [5;24H [5;25H [5;26H [5;27H [5;28H [5;29H [5;30H [5;31H [5;32H[38;5;202m[49m(0x(B[0m[6;2H[38;5;16m[48;5;226m(0C(B[6;3H[38;5;202m[49m(0q(B[6;4H(0q(B[6;5H(0q(B[6;6H(0q(B[6;7H(0q(B[6;8H(0q(B[6;9H(0q(B[6;10H(0q(B[6;11H(0q(B[6;12H(0q(B[6;13H(0q(B[6;14H(0q(B[6;15H(0q(B[6;16H(0q(B[6;17H(0q(B[6;18H(0q(B[6;19H(0q(B[6;20H(0q(B[6;21H(0q(B[6;22H(0q(B[6;23H(0q(B[6;24H(0q(B[6;25H(0q(B[6;26H(0q(B[6;27H(0q(B[6;28H(0q(B[6;29H(0q(B[6;30H(0q(B[6;31H(0q(B[6;32H[48;5;231m(0D(B[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[2;2H[38;5;202m[49m(0l(B[2;3H[38;5;231m[48;5;16m(0*(B[2;4H(0*(B[2;5H(0*(B[2;6H(0*(B[2;7H(0*(B[2;8H(0*(B[2;9H(0*(B[2;10H(0*(B[2;11H(0*(B[2;12H(0*(B[2;13H(0*(B[2;14H(0*(B[2;15H(0*(B[2;16H(0*(B[2;17H(0*(B[2;18H(0*(B[2;19H(0*(B[2;20H(0*(B[2;21H(0*(B[2;22H(0*(B[2;23H(0*(B[2;24H(0*(B[2;25H(0*(B[2;26H(0*(B[2;27H(0*(B[2;28H(0*(B[2;29H(0*(B[2;30H(0*(B[2;31H(0*(B[2;32H[38;5;202m[49m(0k(B[0m[3;2H[38;5;231m[48;5;21m(0$(B[3;3H[39m[49mc[3;4Hu[3;5Hs[3;6Ht[3;7Ho[3;8Hm[3;9H [3;10H [3;11H [3;12H [3;13H [3;14H [3;15H [3;16H [3;17H [3;18H [3;19H [3;20H [3;21H [3;22H [3;23H [3;24H [3;25H [3;26H [3;27H [3;28H [3;29H [3;30H [3;31H [3;32H[38;5;16m[48;5;226m(0%(B[0m[4;2H[38;5;231m[48;5;21m(0$(B[4;3H[39m[49me[4;4Hd[4;5Hg[4;6He[4;7Hs[4;8H [4;9H [4;10H [4;11H [4;12H [4;13H [4;14H [4;15H [4;16H [4;17H [4;18H [4;19H [4;20H [4;21H [4;22H [4;23H [4;24H [4;25H [4;26H [4;27H [4;28H [4;29H [4;30H [4;31H [4;32H[38;5;16m[48;5;226m(0%(B[0m[5;2H[38;5;231m[48;5;21m(0$(B[5;3H[39m[49m [5;4H [5;5H [5;6H [5;7H [5;8H [5;9H [5;10H [5;11H [5;12H [5;13H [5;14H [5;15H [5;16H [5;17H [5;18H [5;19H [5;20H [5;21H [5;22H [5;23H [5;24H [5;25H [5;26H [5;27H [5;28H [5;29H [5;30H [5;31H [5;32H[38;5;16m[48;5;226m(0%(B[0m[6;2H[38;5;202m[49m(0m(B[6;3H[48;5;231m(0&(B[6;4H(0&(B[6;5H(0&(B[6;6H(0&(B[6;7H(0&(B[6;8H(0&(B[6;9H(0&(B[6;10H(0&(B[6;11H(0&(B[6;12H(0&(B[6;13H(0&(B[6;14H(0&(B[6;15H(0&(B[6;16H(0&(B[6;17H(0&(B[6;18H(0&(B[6;19H(0&(B[6;20H(0&(B[6;21H(0&(B[6;22H(0&(B[6;23H(0&(B[6;24H(0&(B[6;25H(0&(B[6;26H(0&(B[6;27H(0&(B[6;28H(0&(B[6;29H(0&(B[6;30H(0&(B[6;31H(0&(B[6;32H[38;5;202m[49m(0j(B[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[2;2H[38;5;231m[49m(0q(B[2;3H(0q(B[2;4H(0q(B[2;5H(0q(B[2;6H(0q(B[2;7H(0q(B[2;8H(0q(B[2;9H(0q(B[2;10H(0q(B[2;11H(0q(B[2;12H(0q(B[2;13H(0q(B[2;14H(0q(B[2;15H(0q(B[2;16H(0q(B[2;17H(0q(B[2;18H(0q(B[2;19H(0q(B[2;20H(0q(B[2;21H(0q(B[2;22H(0q(B[2;23H(0q(B[2;24H(0q(B[2;25H(0q(B[2;26H(0q(B[2;27H(0q(B[2;28H(0q(B[2;29H(0q(B[2;30H(0q(B[2;31H(0q(B[2;32H(0q(B[0m[3;2H[39m[49mo[3;3Hn[3;4Hl[3;5Hy[3;6H [3;7H [3;8H [3;9H [3;10H [3;11H [3;12H [3;13H [3;14H [3;15H [3;16H [3;17H [3;18H [3;19H [3;20H [3;21H [3;22H [3;23H [3;24H [3;25H [3;26H [3;27H [3;28H [3;29H [3;30H [3;31H [3;32H [0m[4;2H[39m[49mt[4;3Ho[4;4Hp[4;5H [4;6H [4;7H [4;8H [4;9H [4;10H [4;11H [4;12H [4;13H [4;14H [4;15H [4;16H [4;17H [4;18H [4;19H [4;20H [4;21H [4;22H [4;23H [4;24H [4;25H [4;26H [4;27H [4;28H [4;29H [4;30H [4;31H [4;32H [0m[5;2H[39m[49m [5;3H [5;4H [5;5H [5;6H [5;7H [5;8H [5;9H [5;10H [5;11H [5;12H [5;13H [5;14H [5;15H [5;16H [5;17H [5;18H [5;19H [5;20H [5;21H [5;22H [5;23H [5;24H [5;25H [5;26H [5;27H [5;28H [5;29H [5;30H [5;31H [5;32H [0m[6;2H[39m[49m [6;3H [6;4H [6;5H [6;6H [6;7H [6;8H [6;9H [6;10H [6;11H [6;12H [6;13H [6;14H [6;15H [6;16H [6;17H [6;18H [6;19H [6;20H [6;21H [6;22H [6;23H [6;24H [6;25H [6;26H [6;27H [6;28H [6;29H [6;30H [6;31H [6;32H [0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[2;2H[39m[49mo[2;3Hn[2;4Hl[2;5Hy[2;6H [2;7H [2;8H [2;9H [2;10H [2;11H [2;12H [2;13H [2;14H [2;15H [2;16H [2;17H [2;18H [2;19H [2;20H [2;21H [2;22H [2;23H [2;24H [2;25H [2;26H [2;27H [2;28H [2;29H [2;30H [2;31H [2;32H[38;5;231m[49m(0x(B[0m[3;2H[39m[49mr[3;3Hi[3;4Hg[3;5Hh[3;6Ht[3;7H [3;8H [3;9H [3;10H [3;11H [3;12H [3;13H [3;14H [3;15H [3;16H [3;17H [3;18H [3;19H [3;20H [3;21H [3;22H [3;23H [3;24H [3;25H [3;26H [3;27H [3;28H [3;29H [3;30H [3;31H [3;32H[38;5;231m[49m(0x(B[0m[4;2H[39m[49m [4;3H [4;4H [4;5H [4;6H [4;7H [4;8H [4;9H [4;10H [4;11H [4;12H [4;13H [4;14H [4;15H [4;16H [4;17H [4;18H [4;19H [4;20H [4;21H [4;22H [4;23H [4;24H [4;25H [4;26H [4;27H [4;28H [4;29H [4;30H [4;31H [4;32H[38;5;231m[49m(0x(B[0m[5;2H[39m[49m [5;3H [5;4H [5;5H [5;6H [5;7H [5;8H [5;9H [5;10H [5;11H [5;12H [5;13H [5;14H [5;15H [5;16H [5;17H [5;18H [5;19H [5;20H [5;21H [5;22H [5;23H [5;24H [5;25H [5;26H [5;27H [5;28H [5;29H [5;30H [5;31H [5;32H[38;5;231m[49m(0x(B[0m[6;2H[39m[49m [6;3H [6;4H [6;5H [6;6H [6;7H [6;8H [6;9H [6;10H [6;11H [6;12H [6;13H [6;14H [6;15H [6;16H [6;17H [6;18H [6;19H [6;20H [6;21H [6;22H [6;23H [6;24H [6;25H [6;26H [6;27H [6;28H [6;29H [6;30H [6;31H [6;32H[38;5;231m[49m(0x(B[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[2;2H[39m[49mo[2;3Hn[2;4Hl[2;5Hy[2;6H [2;7H [2;8H [2;9H [2;10H [2;11H [2;12H [2;13H [2;14H [2;15H [2;16H [2;17H [2;18H [2;19H [2;20H [2;21H [2;22H [2;23H [2;24H [2;25H [2;26H [2;27H [2;28H [2;29H [2;30H [2;31H [2;32H [0m[3;2H[39m[49mb[3;3Ho[3;4Ht[3;5Ht[3;6Ho[3;7Hm[3;8H [3;9H [3;10H [3;11H [3;12H [3;13H [3;14H [3;15H [3;16H [3;17H [3;18H [3;19H [3;20H [3;21H [3;22H [3;23H [3;24H [3;25H [3;26H [3;27H [3;28H [3;29H [3;30H [3;31H [3;32H [0m[4;2H[39m[49m [4;3H [4;4H [4;5H [4;6H [4;7H [4;8H [4;9H [4;10H [4;11H [4;12H [4;13H [4;14H [4;15H [4;16H [4;17H [4;18H [4;19H [4;20H [4;21H [4;22H [4;23H [4;24H [4;25H [4;26H [4;27H [4;28H [4;29H [4;30H [4;31H [4;32H [0m[5;2H[39m[49m [5;3H [5;4H [5;5H [5;6H [5;7H [5;8H [5;9H [5;10H [5;11H [5;12H [5;13H [5;14H [5;15H [5;16H [5;17H [5;18H [5;19H [5;20H [5;21H [5;22H [5;23H [5;24H [5;25H [5;26H [5;27H [5;28H [5;29H [5;30H [5;31H [5;32H [0m[6;2H[38;5;231m[49m(0q(B[6;3H(0q(B[6;4H(0q(B[6;5H(0q(B[6;6H(0q(B[6;7H(0q(B[6;8H(0q(B[6;9H(0q(B[6;10H(0q(B[6;11H(0q(B[6;12H(0q(B[6;13H(0q(B[6;14H(0q(B[6;15H(0q(B[6;16H(0q(B[6;17H(0q(B[6;18H(0q(B[6;19H(0q(B[6;20H(0q(B[6;21H(0q(B[6;22H(0q(B[6;23H(0q(B[6;24H(0q(B[6;25H(0q(B[6;26H(0q(B[6;27H(0q(B[6;28H(0q(B[6;29H(0q(B[6;30H(0q(B[6;31H(0q(B[6;32H(0q(B[0m
|
@@ -0,0 +1 @@
|
|
1
|
+
[0m[2;2H[38;5;231m[49m(0x(B[2;3H[39m[49mo[2;4Hn[2;5Hl[2;6Hy[2;7H [2;8H [2;9H [2;10H [2;11H [2;12H [2;13H [2;14H [2;15H [2;16H [2;17H [2;18H [2;19H [2;20H [2;21H [2;22H [2;23H [2;24H [2;25H [2;26H [2;27H [2;28H [2;29H [2;30H [2;31H [2;32H [0m[3;2H[38;5;231m[49m(0x(B[3;3H[39m[49ml[3;4He[3;5Hf[3;6Ht[3;7H [3;8H [3;9H [3;10H [3;11H [3;12H [3;13H [3;14H [3;15H [3;16H [3;17H [3;18H [3;19H [3;20H [3;21H [3;22H [3;23H [3;24H [3;25H [3;26H [3;27H [3;28H [3;29H [3;30H [3;31H [3;32H [0m[4;2H[38;5;231m[49m(0x(B[4;3H[39m[49m [4;4H [4;5H [4;6H [4;7H [4;8H [4;9H [4;10H [4;11H [4;12H [4;13H [4;14H [4;15H [4;16H [4;17H [4;18H [4;19H [4;20H [4;21H [4;22H [4;23H [4;24H [4;25H [4;26H [4;27H [4;28H [4;29H [4;30H [4;31H [4;32H [0m[5;2H[38;5;231m[49m(0x(B[5;3H[39m[49m [5;4H [5;5H [5;6H [5;7H [5;8H [5;9H [5;10H [5;11H [5;12H [5;13H [5;14H [5;15H [5;16H [5;17H [5;18H [5;19H [5;20H [5;21H [5;22H [5;23H [5;24H [5;25H [5;26H [5;27H [5;28H [5;29H [5;30H [5;31H [5;32H [0m[6;2H[38;5;231m[49m(0x(B[6;3H[39m[49m [6;4H [6;5H [6;6H [6;7H [6;8H [6;9H [6;10H [6;11H [6;12H [6;13H [6;14H [6;15H [6;16H [6;17H [6;18H [6;19H [6;20H [6;21H [6;22H [6;23H [6;24H [6;25H [6;26H [6;27H [6;28H [6;29H [6;30H [6;31H [6;32H [0m
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Provides the result of running an integration test.
|
4
|
+
#
|
5
|
+
# @api private
|
6
|
+
class TestRunner
|
7
|
+
|
8
|
+
# @param (see #initialize)
|
9
|
+
# @return [void]
|
10
|
+
def self.result(testcase, file)
|
11
|
+
new(testcase, file).result
|
12
|
+
end
|
13
|
+
|
14
|
+
# @param testcase [String]
|
15
|
+
# @param file [String]
|
16
|
+
# @return [TestRunner]
|
17
|
+
def initialize(testcase, file)
|
18
|
+
@testcase = testcase
|
19
|
+
@file = file
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [void]
|
23
|
+
def result
|
24
|
+
print "\e[36m#{file}: "
|
25
|
+
if expected == actual
|
26
|
+
print "\e[32mPassed.\e[39m\n"
|
27
|
+
exit 0;
|
28
|
+
else
|
29
|
+
print "\e[31mFailed.\e[39m\n"
|
30
|
+
puts "\e[33mExpected:\e[39m"
|
31
|
+
puts expected.inspect
|
32
|
+
puts "\e[34mActual:\e[39m"
|
33
|
+
puts actual.inspect
|
34
|
+
exit 1;
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
protected
|
39
|
+
|
40
|
+
# @!attribute [r] testcase
|
41
|
+
# @return [String]
|
42
|
+
attr_reader :testcase
|
43
|
+
|
44
|
+
# @!attribute [r] file
|
45
|
+
# @return [String]
|
46
|
+
attr_reader :file
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
# @return [String]
|
51
|
+
def actual
|
52
|
+
File.read("/tmp/#{testcase}.out")
|
53
|
+
end
|
54
|
+
|
55
|
+
# @return [String]
|
56
|
+
def expected
|
57
|
+
File.read(File.expand_path("../expected/#{testcase}.out", file))
|
58
|
+
end
|
59
|
+
|
60
|
+
end # TestRunner
|