sexp_processor 4.2.1 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- (:�y�Wc�(�&��d�Z^�gC��x�QQ>=�;�d��h �j^��� 3�BM�����f{��M��hP���[qUw�<ղ�}Q� ����i�!Nj��R���N��3t`X7G<uZ�S��P��}�X�C~�Gv�-L���
2
- jK�TͲNIs��ChD��z.0��OB�@�����˙�7�-(�h@7�v۽���M����:A_��r�sAwW��<j7HΈ]�-��׳�Q���F�Y�5��k�Z
1
+ 9.���\���@'�.��H[��LB>�baݙF�ŧ�BEg����U�����y�-�!��
2
+ �/�9�!�
3
+ �%�a8��2ˎL.�F�Bm��U,,3P�
@@ -1,3 +1,9 @@
1
+ === 4.3.0 / 2013-08-19
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Switched ParseTreeTestCase to minitest 5.
6
+
1
7
  === 4.2.1 / 2013-04-09
2
8
 
3
9
  * 1 bug fix:
@@ -32,7 +32,7 @@ class Examples
32
32
  RUBY_VERSION < "1.9"
33
33
  end
34
34
 
35
- class ParseTreeTestCase < MiniTest::Unit::TestCase
35
+ class ParseTreeTestCase < Minitest::Test
36
36
  attr_accessor :processor # to be defined by subclass
37
37
 
38
38
  def setup
@@ -2684,6 +2684,11 @@ class ParseTreeTestCase < MiniTest::Unit::TestCase
2684
2684
  "Ruby" => "class << self\n 42\nend",
2685
2685
  "ParseTree" => s(:sclass, s(:self), s(:lit, 42)))
2686
2686
 
2687
+ add_tests("sclass_multiple",
2688
+ "Ruby" => "class << self\n x\n y\nend",
2689
+ "ParseTree" => s(:sclass, s(:self),
2690
+ s(:call, nil, :x), s(:call, nil, :y)))
2691
+
2687
2692
  add_tests("sclass_trailing_class",
2688
2693
  "Ruby" => "class A\n class << self\n a\n end\n \n class B\n end\nend",
2689
2694
  "ParseTree" => s(:class, :A, nil,
@@ -33,7 +33,7 @@ require 'sexp'
33
33
 
34
34
  class SexpProcessor
35
35
 
36
- VERSION = "4.2.1"
36
+ VERSION = "4.3.0"
37
37
 
38
38
  ##
39
39
  # Automatically shifts off the Sexp type before handing the
@@ -24,7 +24,7 @@ class FakeProcessor1 < SexpProcessor # ZenTest SKIP
24
24
  end
25
25
  end
26
26
 
27
- class TestCompositeSexpProcessor < MiniTest::Unit::TestCase
27
+ class TestCompositeSexpProcessor < Minitest::Test
28
28
 
29
29
  def setup
30
30
  @p = CompositeSexpProcessor.new
@@ -53,6 +53,7 @@ class TestCompositeSexpProcessor < MiniTest::Unit::TestCase
53
53
 
54
54
  def test_processors
55
55
  # everything is tested by test_append
56
+ skip
56
57
  end
57
58
 
58
59
  def test_append
@@ -5,7 +5,7 @@ $TESTING = true
5
5
  require 'minitest/autorun'
6
6
  require 'sexp_processor'
7
7
 
8
- class TestEnvironment < MiniTest::Unit::TestCase
8
+ class TestEnvironment < Minitest::Test
9
9
 
10
10
  def setup
11
11
  @env = SexpProcessor::Environment.new
@@ -7,7 +7,7 @@ require 'sexp_processor'
7
7
  require 'stringio'
8
8
  require 'pp'
9
9
 
10
- class SexpTestCase < MiniTest::Unit::TestCase
10
+ class SexpTestCase < Minitest::Test
11
11
  # KEY for regex tests
12
12
  # :a == no change
13
13
  # :b == will change (but sometimes ONLY once)
@@ -28,10 +28,6 @@ class SexpTestCase < MiniTest::Unit::TestCase
28
28
  def setup
29
29
  @any = ANY()
30
30
  end
31
-
32
- def test_stupid
33
- # shuts up test/unit
34
- end
35
31
  end
36
32
 
37
33
  class TestSexp < SexpTestCase # ZenTest FULL
@@ -61,11 +57,11 @@ class TestSexp < SexpTestCase # ZenTest FULL
61
57
  end
62
58
 
63
59
  def test_class_from_array
64
- # raise NotImplementedError, 'Need to write test_class_from_array'
60
+ skip 'Need to write test_class_from_array'
65
61
  end
66
62
 
67
63
  def test_class_index
68
- # raise NotImplementedError, 'Need to write test_class_index'
64
+ skip 'Need to write test_class_index'
69
65
  end
70
66
 
71
67
  def test_array_type_eh
@@ -101,7 +97,9 @@ class TestSexp < SexpTestCase # ZenTest FULL
101
97
 
102
98
  def test_equals2_sexp
103
99
  sexp2 = s(1, 2, 3)
104
- unless @sexp.class == Sexp then
100
+ if @sexp.class == Sexp then
101
+ skip "Not applicable to this target."
102
+ else
105
103
  refute_equal(@sexp, sexp2)
106
104
  end
107
105
  end
@@ -167,15 +165,20 @@ class TestSexp < SexpTestCase # ZenTest FULL
167
165
  end
168
166
 
169
167
  def test_gsub
170
- assert_equal s(:c), s().gsub(s(), s(:c))
171
- assert_equal s(:c), s(:b).gsub(s(:b), s(:c))
172
- assert_equal s(:a), s(:a).gsub(s(:b), s(:c))
168
+ assert_equal s(:c), s(:b). gsub(s(:b), s(:c))
169
+ assert_equal s(:a), s(:a). gsub(s(:b), s(:c))
173
170
  assert_equal s(:a, s(:c)), s(:a, s(:b)).gsub(s(:b), s(:c))
171
+ end
172
+
173
+ def test_gsub_empty
174
+ assert_equal s(:c), s().gsub(s(), s(:c))
175
+ end
174
176
 
177
+ def test_gsub_multiple
175
178
  assert_equal(s(:a, s(:c), s(:c)),
176
- s(:a, s(:b), s(:b)).gsub(s(:b), s(:c)))
179
+ s(:a, s(:b), s(:b)). gsub(s(:b), s(:c)))
177
180
  assert_equal(s(:a, s(:c), s(:a, s(:c))),
178
- s(:a, s(:b), s(:a, s(:b))).gsub(s(:b), s(:c)))
181
+ s(:a, s(:b), s(:a, s(:b))). gsub(s(:b), s(:c)))
179
182
  end
180
183
 
181
184
  def test_inspect
@@ -284,21 +287,22 @@ class TestSexp < SexpTestCase # ZenTest FULL
284
287
  end
285
288
 
286
289
  def test_sub
287
- assert_equal s(:c), s().sub(s(), s(:c))
288
- assert_equal s(:c), s(:b).sub(s(:b), s(:c))
289
- assert_equal s(:a), s(:a).sub(s(:b), s(:c))
290
- assert_equal s(:a, s(:c)), s(:a, s(:c)).sub(s(:b), s(:c))
291
-
292
- assert_equal s(:a, s(:c), s(:b)), s(:a, s(:b), s(:b)).sub(s(:b), s(:c))
293
-
294
- assert_equal(s(:a, s(:c), s(:a)),
295
- s(:a, s(:b), s(:a)).sub(s(:b), s(:c)))
296
- assert_equal(s(:a, s(:c), s(:a, s(:a))),
297
- s(:a, s(:b), s(:a, s(:a))).sub(s(:b), s(:c)))
298
- assert_equal(s(:a, s(:a), s(:a, s(:c), s(:b))),
299
- s(:a, s(:a), s(:a, s(:b), s(:b))).sub(s(:b), s(:c)))
300
- assert_equal(s(:a, s(:c, s(:b))),
301
- s(:a, s(:b)).sub(s(:b), s(:c, s(:b))))
290
+ assert_equal s(:c), s(:b). sub(s(:b), s(:c))
291
+ assert_equal s(:a, s(:c), s(:b)), s(:a, s(:b), s(:b)). sub(s(:b), s(:c))
292
+ assert_equal s(:a, s(:c), s(:a)), s(:a, s(:b), s(:a)). sub(s(:b), s(:c))
293
+ end
294
+
295
+ def test_sub_miss
296
+ assert_equal s(:a), s(:a). sub(s(:b), s(:c))
297
+ assert_equal s(:a, s(:c)), s(:a, s(:c)). sub(s(:b), s(:c))
298
+ end
299
+
300
+ def test_sub_empty
301
+ assert_equal s(:c), s(). sub(s(), s(:c))
302
+ end
303
+
304
+ def test_sub_structure
305
+ assert_equal(s(:a, s(:c, s(:b))), s(:a, s(:b)). sub(s(:b), s(:c, s(:b))))
302
306
  end
303
307
 
304
308
  def test_to_a
@@ -93,7 +93,7 @@ end
93
93
 
94
94
  # Real test classes:
95
95
 
96
- class TestSexpProcessor < MiniTest::Unit::TestCase
96
+ class TestSexpProcessor < Minitest::Test
97
97
 
98
98
  def setup
99
99
  @processor = TestProcessor.new
@@ -151,12 +151,12 @@ class TestSexpProcessor < MiniTest::Unit::TestCase
151
151
  @processor.process([:blah, 1, 2, 3])
152
152
  end
153
153
  end
154
- def test_strict=; end #Handled
154
+ def test_strict=; skip; end #Handled
155
155
 
156
156
  def test_require_empty_false
157
157
  @processor.require_empty = false
158
158
 
159
- @processor.process([:nonempty, 1, 2, 3])
159
+ assert_equal s(:nonempty, 1, 2, 3), @processor.process([:nonempty, 1, 2, 3])
160
160
  end
161
161
 
162
162
  def test_require_empty_true
@@ -164,7 +164,7 @@ class TestSexpProcessor < MiniTest::Unit::TestCase
164
164
  @processor.process([:nonempty, 1, 2, 3])
165
165
  end
166
166
  end
167
- def test_require_empty=; end # handled
167
+ def test_require_empty=; skip; end # handled
168
168
 
169
169
  def test_process_strip
170
170
  @processor.auto_shift_type = true
@@ -239,7 +239,7 @@ class TestSexpProcessor < MiniTest::Unit::TestCase
239
239
  end
240
240
 
241
241
  def test_assert_type_hit
242
- @processor.assert_type([:blah, 1, 2, 3], :blah)
242
+ assert_nil @processor.assert_type([:blah, 1, 2, 3], :blah)
243
243
  end
244
244
 
245
245
  def test_assert_type_miss
@@ -249,7 +249,7 @@ class TestSexpProcessor < MiniTest::Unit::TestCase
249
249
  end
250
250
 
251
251
  def test_generate
252
- # nothing to test at this time... soon.
252
+ skip "nothing to test at this time... soon."
253
253
  end
254
254
 
255
255
  def test_auto_shift_type
@@ -258,7 +258,7 @@ class TestSexpProcessor < MiniTest::Unit::TestCase
258
258
  @processor.auto_shift_type = true
259
259
  assert_equal(true, @processor.auto_shift_type)
260
260
  end
261
- def test_auto_shift_type_equal; end # handled
261
+ def test_auto_shift_type_equal; skip; end # handled
262
262
 
263
263
  def test_default_method
264
264
  # default functionality tested in process_default
@@ -266,7 +266,7 @@ class TestSexpProcessor < MiniTest::Unit::TestCase
266
266
  @processor.default_method = :something
267
267
  assert_equal :something, @processor.default_method
268
268
  end
269
- def test_default_method=; end # handled
269
+ def test_default_method=; skip; end # handled
270
270
 
271
271
  def test_expected
272
272
  assert_equal Sexp, @processor.expected
@@ -286,12 +286,12 @@ class TestSexpProcessor < MiniTest::Unit::TestCase
286
286
 
287
287
  @processor.process([:expected]) # shouldn't raise
288
288
  end
289
- def test_expected=; end # handled
289
+ def test_expected=; skip; end # handled
290
290
 
291
291
  # Not Testing:
292
- def test_debug; end
293
- def test_debug=; end
294
- def test_warn_on_default; end
295
- def test_warn_on_default=; end
292
+ def test_debug; skip; end
293
+ def test_debug=; skip; end
294
+ def test_warn_on_default; skip; end
295
+ def test_warn_on_default=; skip; end
296
296
 
297
297
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sexp_processor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 51
5
5
  prerelease:
6
6
  segments:
7
7
  - 4
8
- - 2
9
- - 1
10
- version: 4.2.1
8
+ - 3
9
+ - 0
10
+ version: 4.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Davis
@@ -36,7 +36,7 @@ cert_chain:
36
36
  FBHgymkyj/AOSqKRIpXPhjC6
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2013-04-10 00:00:00 Z
39
+ date: 2013-08-19 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
@@ -46,11 +46,11 @@ dependencies:
46
46
  requirements:
47
47
  - - ~>
48
48
  - !ruby/object:Gem::Version
49
- hash: 21
49
+ hash: 31
50
50
  segments:
51
- - 4
52
- - 7
53
- version: "4.7"
51
+ - 5
52
+ - 0
53
+ version: "5.0"
54
54
  type: :development
55
55
  version_requirements: *id001
56
56
  - !ruby/object:Gem::Dependency
@@ -76,11 +76,11 @@ dependencies:
76
76
  requirements:
77
77
  - - ~>
78
78
  - !ruby/object:Gem::Version
79
- hash: 13
79
+ hash: 9
80
80
  segments:
81
81
  - 3
82
- - 5
83
- version: "3.5"
82
+ - 7
83
+ version: "3.7"
84
84
  type: :development
85
85
  version_requirements: *id003
86
86
  description: |-
@@ -113,8 +113,8 @@ files:
113
113
  - test/test_sexp_processor.rb
114
114
  - .gemtest
115
115
  homepage: https://github.com/seattlerb/sexp_processor
116
- licenses: []
117
-
116
+ licenses:
117
+ - MIT
118
118
  post_install_message:
119
119
  rdoc_options:
120
120
  - --main
metadata.gz.sig CHANGED
Binary file