cmpfs-ruby 0.2.0 → 0.2.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/cmpfs/compare.rb CHANGED
@@ -1,16 +1,17 @@
1
1
 
2
2
  # ######################################################################## #
3
- # File: cmpfs/version.rb
3
+ # File: cmpfs/version.rb
4
4
  #
5
- # Purpose: Version for cmpfs.Ruby library
5
+ # Purpose: Version for cmpfs.Ruby library
6
6
  #
7
- # Created: 1st March 2019
8
- # Updated: 13th March 2019
7
+ # Created: 1st March 2019
8
+ # Updated: 1st April 2024
9
9
  #
10
- # Home: http://github.com/synesissoftware/cmpfs.Ruby
10
+ # Home: http://github.com/synesissoftware/cmpfs.Ruby
11
11
  #
12
- # Author: Matthew Wilson
12
+ # Author: Matthew Wilson
13
13
  #
14
+ # Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems
14
15
  # Copyright (c) 2019, Matthew Wilson and Synesis Software
15
16
  # All rights reserved.
16
17
  #
@@ -46,12 +47,13 @@
46
47
 
47
48
  if RUBY_VERSION >= '2'
48
49
 
49
- require 'cmpfs/compare/api_2'
50
+ require 'cmpfs/compare/api_2'
50
51
  else
51
52
 
52
- require 'cmpfs/compare/api_1_9'
53
+ require 'cmpfs/compare/api_1_9'
53
54
  end
54
55
 
56
+
55
57
  =begin
56
58
  =end
57
59
 
@@ -73,32 +75,32 @@ module CmpFS
73
75
  #
74
76
  module Compare
75
77
 
76
- def self.extended receiver
78
+ def self.extended receiver
77
79
 
78
- receiver.class_eval do
80
+ receiver.class_eval do
79
81
 
80
- extend CmpFS_Compare_Methods
81
- end
82
+ extend CmpFS_Compare_Methods
83
+ end
82
84
 
83
- $stderr.puts "#{receiver} extended by #{CmpFS_Compare_Methods}" if $DEBUG
84
- end
85
+ $stderr.puts "#{receiver} extended by #{CmpFS_Compare_Methods}" if $DEBUG
86
+ end
85
87
 
86
- def self.included receiver
88
+ def self.included receiver
87
89
 
88
- receiver.class_eval do
90
+ receiver.class_eval do
89
91
 
90
- include CmpFS_Compare_Methods
91
- end
92
+ include CmpFS_Compare_Methods
93
+ end
92
94
 
93
- $stderr.puts "#{receiver} included #{CmpFS_Compare_Methods}" if $DEBUG
94
- end
95
+ $stderr.puts "#{receiver} included #{CmpFS_Compare_Methods}" if $DEBUG
96
+ end
95
97
 
96
- extend CmpFS_Compare_Methods
97
- include CmpFS_Compare_Methods
98
+ extend CmpFS_Compare_Methods
99
+ include CmpFS_Compare_Methods
98
100
 
99
101
  end # module Compare
100
102
  end # module CmpFS
101
103
 
102
- # ############################## end of file ############################# #
103
104
 
105
+ # ############################## end of file ############################# #
104
106
 
data/lib/cmpfs/version.rb CHANGED
@@ -1,16 +1,17 @@
1
1
 
2
2
  # ######################################################################## #
3
- # File: cmpfs/version.rb
3
+ # File: cmpfs/version.rb
4
4
  #
5
- # Purpose: Version for cmpfs.Ruby library
5
+ # Purpose: Version for cmpfs.Ruby library
6
6
  #
7
- # Created: 1st March 2019
8
- # Updated: 13th March 2019
7
+ # Created: 1st March 2019
8
+ # Updated: 2nd April 2024
9
9
  #
10
- # Home: http://github.com/synesissoftware/cmpfs.Ruby
10
+ # Home: http://github.com/synesissoftware/cmpfs.Ruby
11
11
  #
12
- # Author: Matthew Wilson
12
+ # Author: Matthew Wilson
13
13
  #
14
+ # Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems
14
15
  # Copyright (c) 2019, Matthew Wilson and Synesis Software
15
16
  # All rights reserved.
16
17
  #
@@ -49,23 +50,23 @@
49
50
 
50
51
  module CmpFS
51
52
 
52
- # Current version of the cmpfs.Ruby library
53
- VERSION = '0.2.0'
53
+ # Current version of the cmpfs.Ruby library
54
+ VERSION = '0.2.1.2'
54
55
 
55
- private
56
- VERSION_PARTS_ = VERSION.split(/[.]/).collect { |n| n.to_i } # :nodoc:
57
- public
58
- # Major version of the cmpfs.Ruby library
59
- VERSION_MAJOR = VERSION_PARTS_[0] # :nodoc:
60
- # Minor version of the cmpfs.Ruby library
61
- VERSION_MINOR = VERSION_PARTS_[1] # :nodoc:
62
- # Revision version of the cmpfs.Ruby library
63
- VERSION_PATCH = VERSION_PARTS_[2] # :nodoc:
56
+ private
57
+ VERSION_PARTS_ = VERSION.split(/[.]/).collect { |n| n.to_i } # :nodoc:
58
+ public
59
+ # Major version of the cmpfs.Ruby library
60
+ VERSION_MAJOR = VERSION_PARTS_[0] # :nodoc:
61
+ # Minor version of the cmpfs.Ruby library
62
+ VERSION_MINOR = VERSION_PARTS_[1] # :nodoc:
63
+ # Revision version of the cmpfs.Ruby library
64
+ VERSION_PATCH = VERSION_PARTS_[2] # :nodoc:
64
65
 
65
- VERSION_REVISION = VERSION_PATCH # :nodoc:
66
+ VERSION_REVISION = VERSION_PATCH # :nodoc:
66
67
 
67
68
  end # module CmpFS
68
69
 
69
- # ############################## end of file ############################# #
70
70
 
71
+ # ############################## end of file ############################# #
71
72
 
data/lib/cmpfs.rb CHANGED
@@ -1,16 +1,17 @@
1
1
 
2
2
  # ######################################################################## #
3
- # File: cmpfs.rb
3
+ # File: cmpfs.rb
4
4
  #
5
- # Purpose: Primary require for cmpfs.Ruby library
5
+ # Purpose: Primary require for cmpfs.Ruby library
6
6
  #
7
- # Created: 1st March 2019
8
- # Updated: 13th March 2019
7
+ # Created: 1st March 2019
8
+ # Updated: 2nd April 2024
9
9
  #
10
- # Home: http://github.com/synesissoftware/cmpfs.Ruby
10
+ # Home: http://github.com/synesissoftware/cmpfs.Ruby
11
11
  #
12
- # Author: Matthew Wilson
12
+ # Author: Matthew Wilson
13
13
  #
14
+ # Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems
14
15
  # Copyright (c) 2019, Matthew Wilson and Synesis Software
15
16
  # All rights reserved.
16
17
  #
@@ -53,25 +54,28 @@ require 'cmpfs/version'
53
54
  ## Root module for *cmpfs*
54
55
  module CmpFS
55
56
 
56
- def self.extended receiver
57
+ def self.extended receiver
57
58
 
58
- receiver.class_eval do
59
+ receiver.class_eval do
59
60
 
60
- extend CmpFS::Compare
61
- end
61
+ extend CmpFS::Compare
62
+ end
62
63
 
63
- $stderr.puts "#{receiver} extended by #{CmpFS}" if $DEBUG
64
- end
64
+ $stderr.puts "#{receiver} extended by #{CmpFS}" if $DEBUG
65
+ end
65
66
 
66
- def self.included receiver
67
+ def self.included receiver
67
68
 
68
- receiver.class_eval do
69
+ receiver.class_eval do
69
70
 
70
- include CmpFS::Compare
71
- end
71
+ include CmpFS::Compare
72
+ end
72
73
 
73
- $stderr.puts "#{receiver} included #{CmpFS}" if $DEBUG
74
- end
74
+ $stderr.puts "#{receiver} included #{CmpFS}" if $DEBUG
75
+ end
75
76
 
76
77
  end # module CmpFS
77
78
 
79
+
80
+ # ############################## end of file ############################# #
81
+
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby
1
+ #! /usr/bin/env ruby
2
2
 
3
3
  $:.unshift File.join(File.dirname(__FILE__), '../../../lib')
4
4
 
@@ -10,94 +10,95 @@ require 'test/unit'
10
10
  require 'stringio'
11
11
  require 'tempfile'
12
12
 
13
+
13
14
  class Test_CmpFS_Compare_compare_binary < Test::Unit::TestCase
14
15
 
15
- def test_compare_binary_identical_1
16
+ def test__compare_binary__identical_1
16
17
 
17
- lhs = StringIO.new 'abcdefghijiklmno'
18
- rhs_eq = StringIO.new 'abcdefghijiklmno'
18
+ lhs = StringIO.new 'abcdefghijiklmno'
19
+ rhs_eq = StringIO.new 'abcdefghijiklmno'
19
20
 
20
- assert CmpFS::Compare.compare_binary(lhs, rhs_eq), 'streams should be the same'
21
+ assert CmpFS::Compare.compare_binary(lhs, rhs_eq), 'streams should be the same'
21
22
 
22
- rhs_ne = StringIO.new 'abcdefghijiklmn'
23
+ rhs_ne = StringIO.new 'abcdefghijiklmn'
23
24
 
24
- assert_false CmpFS::Compare.compare_binary(lhs, rhs_ne), 'streams should not be the same'
25
- end
25
+ assert_false CmpFS::Compare.compare_binary(lhs, rhs_ne), 'streams should not be the same'
26
+ end
26
27
 
27
- def test_compare_binary_identical_2
28
+ def test__compare_binary__identical_2
28
29
 
29
- lhs_f = Tempfile.new('compare_binary-2')
30
+ lhs_f = Tempfile.new('compare_binary-2')
30
31
 
31
- begin
32
+ begin
32
33
 
33
- lhs_f << 'abcdefghijiklmno'
34
+ lhs_f << 'abcdefghijiklmno'
34
35
 
35
- lhs_f.rewind
36
- lhs_f.close
36
+ lhs_f.rewind
37
+ lhs_f.close
37
38
 
38
- rhs_eq = StringIO.new 'abcdefghijiklmno'
39
+ rhs_eq = StringIO.new 'abcdefghijiklmno'
39
40
 
40
- assert CmpFS::Compare.compare_binary(lhs_f.path, rhs_eq), 'streams should be the same'
41
+ assert CmpFS::Compare.compare_binary(lhs_f.path, rhs_eq), 'streams should be the same'
41
42
 
42
- rhs_ne = StringIO.new 'abcdefghijiklmnop'
43
+ rhs_ne = StringIO.new 'abcdefghijiklmnop'
43
44
 
44
- assert_false CmpFS::Compare.compare_binary(lhs_f.path, rhs_ne), 'streams should not be the same'
45
- ensure
45
+ assert_false CmpFS::Compare.compare_binary(lhs_f.path, rhs_ne), 'streams should not be the same'
46
+ ensure
46
47
 
47
- lhs_f.unlink
48
- end
49
- end
48
+ lhs_f.unlink
49
+ end
50
+ end
50
51
 
51
- def test_compare_binary_identical_3
52
+ def test__compare_binary__identical_3
52
53
 
53
- lhs_f = Tempfile.new('compare_binary-3')
54
+ lhs_f = Tempfile.new('compare_binary-3')
54
55
 
55
- begin
56
+ begin
56
57
 
57
- lhs_f << 'abcdefghijiklmno'
58
+ lhs_f << 'abcdefghijiklmno'
58
59
 
59
- lhs_f.rewind
60
- lhs_f.close
60
+ lhs_f.rewind
61
+ lhs_f.close
61
62
 
62
63
 
63
- rhs_eq_f = Tempfile.new('compare_binary-3')
64
+ rhs_eq_f = Tempfile.new('compare_binary-3')
64
65
 
65
- begin
66
+ begin
66
67
 
67
- rhs_eq_f << 'abcdefghijiklmno'
68
+ rhs_eq_f << 'abcdefghijiklmno'
68
69
 
69
- rhs_eq_f.rewind
70
- rhs_eq_f.close
70
+ rhs_eq_f.rewind
71
+ rhs_eq_f.close
71
72
 
72
- assert CmpFS::Compare.compare_binary(lhs_f.path, rhs_eq_f.path), 'streams should be the same'
73
- ensure
73
+ assert CmpFS::Compare.compare_binary(lhs_f.path, rhs_eq_f.path), 'streams should be the same'
74
+ ensure
74
75
 
75
- rhs_eq_f.unlink
76
- end
76
+ rhs_eq_f.unlink
77
+ end
77
78
 
78
79
 
79
- rhs_ne_f = Tempfile.new('compare_binary-3')
80
+ rhs_ne_f = Tempfile.new('compare_binary-3')
80
81
 
81
- begin
82
+ begin
82
83
 
83
- rhs_ne_f << 'xyz'
84
+ rhs_ne_f << 'xyz'
84
85
 
85
- rhs_ne_f.rewind
86
- rhs_ne_f.close
86
+ rhs_ne_f.rewind
87
+ rhs_ne_f.close
87
88
 
88
- assert_false CmpFS::Compare.compare_binary(lhs_f.path, rhs_ne_f.path), 'streams should not be the same'
89
- ensure
89
+ assert_false CmpFS::Compare.compare_binary(lhs_f.path, rhs_ne_f.path), 'streams should not be the same'
90
+ ensure
90
91
 
91
- rhs_ne_f.unlink
92
- end
92
+ rhs_ne_f.unlink
93
+ end
93
94
 
94
- ensure
95
+ ensure
95
96
 
96
- lhs_f.unlink
97
- end
98
- end
97
+ lhs_f.unlink
98
+ end
99
+ end
99
100
  end
100
101
 
101
- # ############################## end of file ############################# #
102
102
 
103
+ # ############################## end of file ############################# #
103
104
 
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_dir = File.expand_path(File.dirname(__FILE__))
5
+ this_dir = File.expand_path(File.dirname(__FILE__))
6
6
 
7
7
  # all tc_*rb in current directory
8
8
  Dir[File.join(this_dir, 'tc_*rb')].each { |file| require file }
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby
1
+ #! /usr/bin/env ruby
2
2
 
3
3
  $:.unshift File.join(File.dirname(__FILE__), '../../lib')
4
4
 
@@ -10,98 +10,97 @@ require 'test/unit'
10
10
  require 'stringio'
11
11
  require 'tempfile'
12
12
 
13
- class Test_CmpFS_compare_binary < Test::Unit::TestCase
14
-
15
- include ::CmpFS
16
13
 
17
- def test_compare_binary_identical_1
14
+ class Test_CmpFS_compare_binary < Test::Unit::TestCase
18
15
 
19
- lhs = StringIO.new 'abcdefghijiklmno'
20
- rhs_eq = StringIO.new 'abcdefghijiklmno'
16
+ include ::CmpFS
21
17
 
22
- assert compare_binary(lhs, rhs_eq), 'streams should be the same'
18
+ def test__compare_binary__identical_1
23
19
 
24
- rhs_ne = StringIO.new 'abcdefghijiklmn'
20
+ lhs = StringIO.new 'abcdefghijiklmno'
21
+ rhs_eq = StringIO.new 'abcdefghijiklmno'
25
22
 
26
- assert_false compare_binary(lhs, rhs_ne), 'streams should not be the same'
27
- end
23
+ assert compare_binary(lhs, rhs_eq), 'streams should be the same'
28
24
 
29
- def test_compare_binary_identical_2
25
+ rhs_ne = StringIO.new 'abcdefghijiklmn'
30
26
 
31
- lhs_f = Tempfile.new('compare_binary-2')
27
+ assert_false compare_binary(lhs, rhs_ne), 'streams should not be the same'
28
+ end
32
29
 
33
- begin
30
+ def test__compare_binary__identical_2
34
31
 
35
- lhs_f << 'abcdefghijiklmno'
32
+ lhs_f = Tempfile.new('compare_binary-2')
36
33
 
37
- lhs_f.rewind
38
- lhs_f.close
34
+ begin
39
35
 
40
- rhs_eq = StringIO.new 'abcdefghijiklmno'
36
+ lhs_f << 'abcdefghijiklmno'
41
37
 
42
- assert compare_binary(lhs_f.path, rhs_eq), 'streams should be the same'
38
+ lhs_f.rewind
39
+ lhs_f.close
43
40
 
44
- rhs_ne = StringIO.new 'abcdefghijiklmnop'
41
+ rhs_eq = StringIO.new 'abcdefghijiklmno'
45
42
 
46
- assert_false compare_binary(lhs_f.path, rhs_ne), 'streams should not be the same'
47
- ensure
43
+ assert compare_binary(lhs_f.path, rhs_eq), 'streams should be the same'
48
44
 
49
- lhs_f.unlink
50
- end
51
- end
45
+ rhs_ne = StringIO.new 'abcdefghijiklmnop'
52
46
 
53
- def test_compare_binary_identical_3
47
+ assert_false compare_binary(lhs_f.path, rhs_ne), 'streams should not be the same'
48
+ ensure
54
49
 
55
- lhs_f = Tempfile.new('compare_binary-3')
50
+ lhs_f.unlink
51
+ end
52
+ end
56
53
 
57
- begin
54
+ def test__compare_binary__identical_3
58
55
 
59
- lhs_f << 'abcdefghijiklmno'
56
+ lhs_f = Tempfile.new('compare_binary-3')
60
57
 
61
- lhs_f.rewind
62
- lhs_f.close
58
+ begin
63
59
 
60
+ lhs_f << 'abcdefghijiklmno'
64
61
 
65
- rhs_eq_f = Tempfile.new('compare_binary-3')
62
+ lhs_f.rewind
63
+ lhs_f.close
66
64
 
67
- begin
68
65
 
69
- rhs_eq_f << 'abcdefghijiklmno'
66
+ rhs_eq_f = Tempfile.new('compare_binary-3')
70
67
 
71
- rhs_eq_f.rewind
72
- rhs_eq_f.close
68
+ begin
73
69
 
70
+ rhs_eq_f << 'abcdefghijiklmno'
74
71
 
75
- assert compare_binary(lhs_f.path, rhs_eq_f.path), 'streams should be the same'
76
- ensure
72
+ rhs_eq_f.rewind
73
+ rhs_eq_f.close
77
74
 
78
- rhs_eq_f.unlink
79
- end
75
+ assert compare_binary(lhs_f.path, rhs_eq_f.path), 'streams should be the same'
76
+ ensure
80
77
 
78
+ rhs_eq_f.unlink
79
+ end
81
80
 
82
- rhs_ne_f = Tempfile.new('compare_binary-3')
83
81
 
84
- begin
82
+ rhs_ne_f = Tempfile.new('compare_binary-3')
85
83
 
86
- rhs_ne_f << 'xyz'
84
+ begin
87
85
 
88
- rhs_ne_f.rewind
89
- rhs_ne_f.close
86
+ rhs_ne_f << 'xyz'
90
87
 
88
+ rhs_ne_f.rewind
89
+ rhs_ne_f.close
91
90
 
92
- assert_false compare_binary(lhs_f.path, rhs_ne_f.path), 'streams should not be the same'
93
- ensure
91
+ assert_false compare_binary(lhs_f.path, rhs_ne_f.path), 'streams should not be the same'
92
+ ensure
94
93
 
95
- rhs_ne_f.unlink
96
- end
94
+ rhs_ne_f.unlink
95
+ end
97
96
 
98
- ensure
97
+ ensure
99
98
 
100
- lhs_f.unlink
101
- end
102
- end
99
+ lhs_f.unlink
100
+ end
101
+ end
103
102
  end
104
103
 
105
- # ############################## end of file ############################# #
106
104
 
105
+ # ############################## end of file ############################# #
107
106
 
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby
1
+ #! /usr/bin/env ruby
2
2
 
3
3
  $:.unshift File.join(File.dirname(__FILE__), '../../lib')
4
4
 
@@ -10,56 +10,110 @@ require 'test/unit'
10
10
  require 'stringio'
11
11
  require 'tempfile'
12
12
 
13
+
13
14
  class Test_CmpFS_compare_text < Test::Unit::TestCase
14
15
 
15
- include ::CmpFS
16
+ include ::CmpFS
17
+
18
+ def test__compare_text__empty
19
+
20
+ lhs = StringIO.new
21
+ rhs_eq = StringIO.new
22
+
23
+ assert compare_text(lhs, rhs_eq), 'streams should be the same'
24
+ end
25
+
26
+ def test__compare_text__blank_lines
27
+
28
+ lhs = StringIO.new <<END_OF_INPUT
29
+
30
+
31
+ END_OF_INPUT
32
+ rhs_eq = StringIO.new <<END_OF_INPUT
33
+
16
34
 
17
- def test_compare_text_identical_1
35
+ END_OF_INPUT
18
36
 
19
- lhs = StringIO.new
20
- rhs_eq = StringIO.new
37
+ assert compare_text(lhs, rhs_eq), 'streams should be the same'
38
+ end
21
39
 
22
- lhs << "line-1\n"
23
- rhs_eq << "line-1\n"
40
+ def test__compare_text__identical_lines_1
24
41
 
25
- lhs << "line-2\n"
26
- rhs_eq << "line-2\n"
42
+ lhs = StringIO.new <<END_OF_INPUT
43
+ line-1
44
+ line-2
27
45
 
28
- assert compare_text(lhs, rhs_eq), 'streams should be the same'
46
+ END_OF_INPUT
47
+ rhs_eq = StringIO.new <<END_OF_INPUT
48
+ line-1
49
+ line-2
29
50
 
30
- rhs_ne = StringIO.new
51
+ END_OF_INPUT
31
52
 
32
- rhs_ne << "line-1\n"
33
- rhs_ne << "line2\n"
53
+ assert compare_text(lhs, rhs_eq), 'streams should be the same'
54
+ end
34
55
 
35
- assert_false compare_text(lhs, rhs_ne), 'streams should not be the same'
36
- end
56
+ def test__compare_text__different_lines_1
37
57
 
38
- def test_compare_text_same_with_blank_lines_1
58
+ lhs = StringIO.new <<END_OF_INPUT
59
+ line-1
60
+ line-2
39
61
 
40
- lhs = StringIO.new
41
- rhs_eq = StringIO.new
62
+ END_OF_INPUT
63
+ rhs_ne = StringIO.new <<END_OF_INPUT
64
+ line-1
65
+ line2
42
66
 
43
- lhs << "line-1\n"
44
- lhs << "\n"
45
- rhs_eq << "line-1\n"
67
+ END_OF_INPUT
46
68
 
47
- lhs << " line-2\n"
48
- rhs_eq << "line-2\n"
69
+ assert_false compare_text(lhs, rhs_ne), 'streams should not be the same'
70
+ end
49
71
 
50
- assert_false compare_text(lhs, rhs_eq), 'streams should not be the same'
51
- assert compare_text(lhs, rhs_eq, trim_lines: true, skip_blank_lines: true), 'streams should be the same'
72
+ def test__compare_text__different_lines_2
52
73
 
53
- rhs_ne = StringIO.new
74
+ lhs = StringIO.new <<END_OF_INPUT
75
+ line-1
54
76
 
55
- rhs_ne << "line-1\n"
56
- rhs_ne << "line2\n"
77
+ line-2
78
+ END_OF_INPUT
79
+ rhs_ne = StringIO.new <<END_OF_INPUT
80
+ line-1
81
+ line-2
57
82
 
58
- assert_false compare_text(lhs, rhs_ne), 'streams should not be the same'
59
- end
83
+ END_OF_INPUT
60
84
 
85
+ assert_false compare_text(lhs, rhs_ne), 'streams should not be the same'
86
+ end
87
+
88
+ def test__compare_text__different_streams_with_permutations_of_trim_and_skip_1
89
+
90
+ lhs = StringIO.new <<END_OF_INPUT
91
+ line-1
92
+
93
+ line-2
94
+ END_OF_INPUT
95
+ rhs_eq = StringIO.new <<END_OF_INPUT
96
+ line-1
97
+ line-2
98
+ END_OF_INPUT
99
+
100
+ assert_false compare_text(lhs, rhs_eq), 'streams should not be the same'
101
+ assert_false compare_text(lhs, rhs_eq, trim_lines: false, skip_blank_lines: true), 'streams should not be the same'
102
+ assert_false compare_text(lhs, rhs_eq, trim_lines: true, skip_blank_lines: false), 'streams should not be the same'
103
+ assert compare_text(lhs, rhs_eq, trim_lines: true, skip_blank_lines: true), 'streams should be the same'
104
+
105
+ rhs_ne = StringIO.new <<END_OF_INPUT
106
+ line-1
107
+ line2
108
+ END_OF_INPUT
109
+
110
+ assert_false compare_text(lhs, rhs_ne), 'streams should not be the same'
111
+ assert_false compare_text(lhs, rhs_ne, trim_lines: false, skip_blank_lines: true), 'streams should not be the same'
112
+ assert_false compare_text(lhs, rhs_ne, trim_lines: true, skip_blank_lines: false), 'streams should not be the same'
113
+ assert_false compare_text(lhs, rhs_ne, trim_lines: true, skip_blank_lines: true), 'streams should not be the same'
114
+ end
61
115
  end
62
116
 
63
- # ############################## end of file ############################# #
64
117
 
118
+ # ############################## end of file ############################# #
65
119