relisp 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,12 +4,27 @@ require 'test/unit' unless defined? $ZENTEST and $ZENTEST
4
4
 
5
5
  $:.unshift File.dirname(__FILE__) + "/../lib"
6
6
  require 'relisp'
7
+ require 'tempfile'
7
8
 
9
+ class Tempfile
10
+ @@counter = 0
11
+
12
+ def self.new_path(name = 'tempfile')
13
+ file = Tempfile.new(name)
14
+ file.close
15
+ @@counter += 1
16
+ # The extra counter is to prevent two instances of emacs both
17
+ # working with the same file.
18
+ return file.path + @@counter.to_s
19
+ end
20
+ end
21
+
22
+ EMACS = Relisp::ElispSlave.new unless defined? EMACS
8
23
 
9
24
  module TestRelisp
10
25
  class TestProxy < Test::Unit::TestCase
11
26
  def setup
12
- @emacs = Relisp::ElispSlave.new
27
+ @emacs = EMACS
13
28
  end
14
29
 
15
30
  def test_class_from_elisp
@@ -36,10 +51,12 @@ module TestRelisp
36
51
 
37
52
 
38
53
  class TestBuffer < Test::Unit::TestCase
54
+
39
55
  def setup
40
56
  @emacs = Relisp::ElispSlave.new
57
+ @buffer = Relisp::Buffer.new "*relisp-setup-test-buffer*"
41
58
  end
42
-
59
+
43
60
  def test_class_from_elisp
44
61
  test_buffer_name = "*relisp-test-buffer*"
45
62
  buffer = @emacs.elisp_eval( "(create-file-buffer \"#{test_buffer_name}\") " )
@@ -62,16 +79,222 @@ module TestRelisp
62
79
  assert_equal :buffer, @emacs.elisp_eval("(type-of #{buffer.to_elisp})")
63
80
  end
64
81
 
82
+ def test_set
83
+ b1_name = "*relisp-test-buffer1*"
84
+ b2_name = "*relisp-test-buffer2*"
85
+ b1 = Relisp::Buffer.new b1_name
86
+ b2 = Relisp::Buffer.new b2_name
87
+
88
+ b1.set
89
+ assert_equal b1_name, @emacs.buffer_name
90
+ b2.set
91
+ assert_equal b2_name, @emacs.buffer_name
92
+ end
93
+
65
94
  def test_name
66
95
  test_buffer_name = "*relisp-test-buffer*"
67
96
  buffer = @emacs.elisp_eval( "(create-file-buffer \"#{test_buffer_name}\") " )
68
97
  assert_equal test_buffer_name, buffer.name
69
98
  end
99
+
100
+ def test_rename
101
+ b = Relisp::Buffer.new "*relisp-test-buffer*"
102
+ assert_equal b.name, "*relisp-test-buffer*"
103
+ b.insert "this text should stay here"
104
+ text = b.to_s
105
+ b.rename "*same-relisp-buffer*"
106
+ assert_equal b.name, "*same-relisp-buffer*"
107
+ assert_equal text, b.to_s
108
+ end
109
+
110
+ def test_filename
111
+ file = Tempfile.new_path
112
+ assert_nil @buffer.filename
113
+ @buffer.filename = file
114
+ assert_equal file, @buffer.filename
115
+ end
116
+
117
+ def test_filename_equals
118
+ # test_filename
119
+ end
120
+
121
+ def test_modified_eh
122
+ file = Tempfile.new_path
123
+ assert ! @buffer.modified?
124
+ @buffer.insert "some text"
125
+ assert @buffer.modified?
126
+ @buffer.filename = file
127
+ @buffer.save
128
+ assert ! @buffer.modified?
129
+ end
130
+
131
+ def test_set_modified
132
+ file = Tempfile.new_path
133
+ assert ! @buffer.modified?
134
+ @buffer.set_modified
135
+ assert @buffer.modified?
136
+ @buffer.filename = file
137
+ @buffer.save
138
+ assert ! @buffer.modified?
139
+ @buffer.insert "some text"
140
+ @buffer.set_modified(false)
141
+ assert ! @buffer.modified?
142
+ end
143
+
144
+ def test_modified_equals
145
+ file = Tempfile.new_path
146
+ assert ! @buffer.modified?
147
+ @buffer.modified = true
148
+ assert @buffer.modified?
149
+ @buffer.filename = file
150
+ @buffer.save
151
+ assert ! @buffer.modified?
152
+ @buffer.insert "some text"
153
+ @buffer.modified = false
154
+ assert ! @buffer.modified?
155
+ end
156
+
157
+ def test_buffer_modified_tick
158
+ @buffer.insert "arokfv "
159
+ assert_equal 2, @buffer.modified_tick
160
+ end
161
+
162
+ def test_chars_modified_tick
163
+ @buffer.insert "arokfv "
164
+ assert_equal 2, @buffer.chars_modified_tick
165
+ end
166
+
167
+ def test_read_only_eh
168
+ assert ! @buffer.read_only?
169
+ @buffer.read_only=true
170
+ assert @buffer.read_only?
171
+ end
172
+
173
+ def test_read_only_equals
174
+ assert ! @buffer.read_only?
175
+ @buffer.read_only=true
176
+ assert @buffer.read_only?
177
+ assert_raise Relisp::ElispError do
178
+ @buffer.insert "A"
179
+ end
180
+ @buffer.read_only=false
181
+ assert ! @buffer.read_only?
182
+ end
183
+
184
+ def bury
185
+ buffer = Relisp::Buffer.new('a')
186
+ assert_kind_of Relisp::Window, buffer.window
187
+ buffer.bury
188
+ assert_nil buffer.window
189
+ end
190
+
191
+ def test_kill
192
+ assert @emacs.buffer_list.to_list.map {|b| b.name}.include?(@buffer.name)
193
+ @buffer.insert "a"
194
+ assert_raise RuntimeError do
195
+ @buffer.kill
196
+ end
197
+ @buffer.modified=false
198
+ @buffer.kill
199
+ assert ! @emacs.buffer_list.to_list.map {|b| b.name}.include?(@buffer.name)
200
+ end
201
+
202
+ def test_kill_bang
203
+ assert @emacs.buffer_list.to_list.map {|b| b.name}.include?(@buffer.name)
204
+ @buffer.insert "a"
205
+ assert @buffer.modified?
206
+ assert_nothing_raised do
207
+ @buffer.kill!
208
+ end
209
+ end
210
+
211
+ def test_alive_eh?
212
+ assert @buffer.alive?
213
+ @buffer.kill!
214
+ assert ! @buffer.alive?
215
+ end
216
+
217
+ def test_save
218
+ string = "text to write to file"
219
+ @buffer << string
220
+ assert_raises RuntimeError do
221
+ @buffer.save
222
+ end
223
+ file = Tempfile.new_path
224
+ @buffer.filename = file
225
+ @buffer.save
226
+ end
227
+
228
+ def test_write
229
+ file = Tempfile.new_path
230
+ string = "text to write to file"
231
+ @buffer.insert string
232
+ @buffer.write(file)
233
+ assert ! @buffer.modified?
234
+ assert_equal file, @buffer.filename
235
+ end
236
+
237
+ def test_size
238
+ assert_equal 0, @buffer.size
239
+ @buffer.insert "12345"
240
+ assert_equal 5, @buffer.size
241
+ end
242
+
243
+ def test_substring
244
+ @buffer.insert "abcde"
245
+ assert_equal "bc", @buffer.substring(2,4)
246
+ end
247
+
248
+ def test_substring_no_properties
249
+ # TODO: not really testing the "no properties" bit
250
+ @buffer.insert "abcde"
251
+ assert_equal "bc", @buffer.substring_no_properties(2,4)
252
+ end
253
+
254
+ def test_to_s
255
+ assert_equal "", @buffer.to_s
256
+ @buffer.insert "Some text"
257
+ @buffer.insert "another line"
258
+ assert_equal @buffer.to_s, "Some textanother line"
259
+ end
260
+
261
+ def test_erase
262
+ @buffer.insert "Some text"
263
+ assert_equal @buffer.to_s, "Some text"
264
+ @buffer.erase
265
+ assert_equal @buffer.to_s, ""
266
+ end
267
+
268
+ def test_window
269
+ @emacs.switch_to_buffer(@buffer)
270
+ assert_kind_of Relisp::Window, @buffer.window
271
+ end
272
+
273
+ def test_insert
274
+ # TODO: test that objects besides Strings are inserted correctly
275
+ end
276
+
277
+ def test_puts
278
+ @buffer.puts "abc"
279
+ @buffer.insert "def"
280
+ assert_equal "abc\ndef", @buffer.to_s
281
+ end
282
+
283
+ def test_append
284
+ @buffer.insert "abc"
285
+ @buffer.set
286
+ @emacs.goto_char(@emacs.point_min)
287
+ assert_equal 1, @emacs.point
288
+ @buffer << "def"
289
+ assert_equal "abcdef", @buffer.to_s
290
+ end
291
+
70
292
  end
71
293
 
72
294
  class TestMarker < Test::Unit::TestCase
73
295
  def setup
74
- @emacs = Relisp::ElispSlave.new
296
+ @emacs = EMACS
297
+ # @emacs = Relisp::ElispSlave.new
75
298
  end
76
299
 
77
300
  def test_class_from_elisp
@@ -80,23 +303,185 @@ module TestRelisp
80
303
  assert_kind_of Relisp::Marker, Relisp::Marker.new
81
304
  end
82
305
 
83
- def test_class_make
84
- assert_kind_of Relisp::Marker, Relisp::Marker.make
85
- end
86
-
87
306
  def test_to_elisp
88
307
  assert_equal :marker, @emacs.elisp_eval( "(type-of #{@emacs.point_marker.to_elisp})" )
89
308
  end
309
+
310
+ def test_position
311
+ marker = Relisp::Marker.new
312
+ assert_nil marker.position
313
+ # see test_set
314
+ end
315
+
316
+ def test_buffer
317
+ marker = Relisp::Marker.new
318
+ assert_nil marker.buffer
319
+ # see test_set
320
+ end
321
+
322
+ def test_insertion_type
323
+ marker = Relisp::Marker.new
324
+ assert_nil marker.insertion_type
325
+ marker.insertion_type=true
326
+ assert marker.insertion_type
327
+ end
328
+
329
+ def test_set
330
+ marker = Relisp::Marker.new(@emacs)
331
+ buffer = Relisp::Buffer.new(@emacs)
332
+ marker.set(1, buffer.to_elisp)
333
+ assert_equal buffer, marker.buffer
334
+ assert_equal 1, marker.position
335
+ end
336
+
90
337
  end
91
338
 
92
339
  class TestWindow < Test::Unit::TestCase
340
+ @@emacs = EMACS
341
+
93
342
  def setup
94
- @emacs = Relisp::ElispSlave.new
343
+ @emacs = @@emacs
344
+ # @emacs = Relisp::ElispSlave.new
95
345
  end
96
346
 
97
347
  def test_class_from_elisp
98
348
  assert_kind_of Relisp::Window, @emacs.selected_window
99
349
  end
350
+
351
+ def test_split
352
+ window = @emacs.selected_window
353
+ window.delete_others
354
+ window.split
355
+ assert_equal 2, @emacs.window_list.to_list.size
356
+ end
357
+
358
+ def test_horizontally
359
+ window = @emacs.selected_window
360
+ window.delete_others
361
+ old_width = window.width
362
+ begin
363
+ window.split_horizontally
364
+ assert old_width > window.width
365
+ rescue Relisp::ElispError => dag_yo
366
+ assert dag_yo.to_s =~ /width/
367
+ end
368
+ end
369
+
370
+ def test_vertically
371
+ window = @emacs.selected_window
372
+ window.delete_others
373
+ old_height = window.height
374
+ window.split_vertically
375
+ assert old_height > window.height
376
+ end
377
+
378
+ def test_alive_eh
379
+ window = @emacs.selected_window.split
380
+ window.delete
381
+ assert ! window.alive?
382
+ end
383
+
384
+ def test_delete_others
385
+ window = @emacs.selected_window
386
+ window.delete_others
387
+ window.split
388
+ assert @emacs.window_list.to_list.size > 1
389
+ window.delete_others
390
+ assert_equal 1, @emacs.window_list.to_list.size
391
+ end
392
+
393
+ def test_select
394
+ w1 = @emacs.selected_window
395
+ w1.delete_others
396
+ w2 = w1.split
397
+ w1.select
398
+ assert_equal @emacs.selected_window, w1
399
+ w2.select
400
+ assert_equal @emacs.selected_window, w2
401
+ end
402
+
403
+ def test_buffer
404
+ window = @emacs.selected_window
405
+ buffer1 = Relisp::Buffer.new(@emacs)
406
+ buffer2 = Relisp::Buffer.new(@emacs)
407
+ window.buffer=buffer1
408
+ assert_equal buffer1, window.buffer
409
+ window.buffer=buffer2
410
+ assert_equal buffer2, window.buffer
411
+ end
412
+
413
+ def test_dedicated
414
+ window = @emacs.selected_window
415
+ assert ! window.dedicated
416
+ window.dedicated = true
417
+ assert window.dedicated
418
+ window.dedicated = nil
419
+ end
420
+
421
+ def test_point
422
+ w1 = @emacs.selected_window
423
+ w1.delete_others
424
+ b = Relisp::Buffer.new(@emacs)
425
+ w1.buffer=b
426
+ b.insert "12345"
427
+ w2 = w1.split
428
+ w2.select
429
+ @emacs.goto_char(@emacs.point_max)
430
+ assert_equal 6, @emacs.point
431
+ assert_equal 1, w1.point
432
+ w1.point = 3
433
+ assert_equal 3, w1.point
434
+ assert_equal 6, w2.point
435
+ end
436
+
437
+ def test_start
438
+ # TODO: something is weird here. maybe the visible? function
439
+ # doesn't work in batch mode
440
+
441
+ window = @emacs.selected_window
442
+ window.delete_others
443
+ window.buffer = Relisp::Buffer.new(@emacs)
444
+ assert_equal 1, window.start
445
+ window.buffer.insert "a\n" * window.height * 3
446
+ window.point = @emacs.point_max
447
+ @emacs.elisp_eval("(redisplay)") # Need to refresh the display in
448
+ # order to update 'buffer-start'
449
+ # and 'buffer-end'--I don't know
450
+ # why 'redisplay' doesn't work
451
+ # here
452
+ # assert window.start > 1
453
+ assert ! window.visible?(1)
454
+ # @emacs.elisp_eval "(set-window-start (selected-window) 1)"
455
+ window.start = 1
456
+
457
+ # @emacs.elisp_eval("(redisplay)")
458
+ # puts window.start
459
+ # puts window.end
460
+ # puts window.buffer.point_max
461
+ # assert window.visible?(181)
462
+ end
463
+
464
+ def test_scroll_up
465
+ window = @emacs.selected_window
466
+ window.delete_others
467
+ window.buffer.insert "a\n" * window.height * 3
468
+ window.scroll_up
469
+ assert window.start > 1
470
+ window.scroll_down
471
+ assert window.start == 1
472
+ end
473
+
474
+ def test_edges
475
+ window = @emacs.selected_window
476
+ assert_equal 4, window.edges.size
477
+ assert_equal 4, window.inside_edges.size
478
+ assert_equal 4, window.pixel_edges.size
479
+ assert_equal 4, window.inside_pixel_edges.size
480
+ end
481
+
482
+ def test_frame
483
+ assert_kind_of Relisp::Frame, @emacs.selected_window.frame
484
+ end
100
485
  end
101
486
 
102
487
  class TestFrame < Test::Unit::TestCase
@@ -116,11 +501,18 @@ module TestRelisp
116
501
  assert_kind_of Relisp::Frame, new_frame
117
502
  assert_equal :frame, @emacs.elisp_eval( "(type-of #{new_frame.to_elisp})")
118
503
  end
504
+
505
+ def test_alive_eh
506
+ f = Relisp::Frame.new
507
+ assert f.alive?
508
+ f.delete
509
+ assert ! f.alive?
510
+ end
119
511
  end
120
512
 
121
513
  class TestWindowConfiguration < Test::Unit::TestCase
122
514
  def setup
123
- @emacs = Relisp::ElispSlave.new
515
+ @emacs = EMACS
124
516
  end
125
517
 
126
518
  def test_class_from_elisp
@@ -128,16 +520,65 @@ module TestRelisp
128
520
  end
129
521
  end
130
522
 
131
- class TestFrameConfiguration < Test::Unit::TestCase
523
+ class TestProcess < Test::Unit::TestCase
132
524
  def setup
133
- @emacs = Relisp::ElispSlave.new
525
+ @emacs = EMACS
526
+ end
527
+
528
+ def test_class_from_elisp
529
+ assert_kind_of Relisp::Process, @emacs.start_process("test", "test", "ls")
134
530
  end
135
531
 
532
+ def test_name
533
+ p = @emacs.start_process("process", "pbuffer", "ls")
534
+ assert_equal 'process', p.name
535
+ sleep 0.5
536
+ assert_equal :exit, p.status
537
+ assert_equal 0, p.exit_status
538
+ end
539
+ end
540
+
541
+ class TestOverlay < Test::Unit::TestCase
542
+ def setup
543
+ @emacs = Relisp::ElispSlave.new
544
+ end
545
+
136
546
  def test_class_from_elisp
137
- # assert_kind_of Relisp::WindowConfiguration, @emacs.current_frame_configuration
138
- assert_kind_of Relisp::Cons, @emacs.current_frame_configuration
139
- assert_equal :"frame-configuration", @emacs.current_frame_configuration.car
547
+ @emacs.insert("sometext")
548
+ assert_kind_of Relisp::Overlay, @emacs.elisp_eval( "(make-overlay 1 3)")
140
549
  end
550
+
551
+ def test_initialize
552
+ @emacs.insert("sometext")
553
+ new_overlay = Relisp::Overlay.new(1, 3)
554
+ assert_kind_of Relisp::Overlay, new_overlay
555
+ assert_equal :overlay, @emacs.elisp_eval( "(type-of #{new_overlay.to_elisp})")
556
+ end
557
+
558
+ def test_start
559
+ @emacs.insert("sometext")
560
+ o = Relisp::Overlay.new(1, 3)
561
+ assert_equal 1, o.start
562
+ assert_equal 3, o.end
563
+ assert_equal @emacs.current_buffer, o.buffer
564
+ o.move(2,4)
565
+ assert_equal 2, o.start
566
+ assert_equal 4, o.end
567
+ o.start = 1
568
+ o.end = 3
569
+ assert_equal 1, o.start
570
+ assert_equal 3, o.end
571
+ o.delete
572
+ assert_nil o.start
573
+ end
574
+
575
+ def test_property
576
+ @emacs.insert("sometext")
577
+ o = Relisp::Overlay.new(1, 3)
578
+ o.priority = 2
579
+ assert_equal 2, o.priority
580
+ end
581
+
141
582
  end
142
583
 
143
584
  end
@@ -5,6 +5,8 @@ require 'test/unit' unless defined? $ZENTEST and $ZENTEST
5
5
  $:.unshift File.dirname(__FILE__) + "/../lib"
6
6
  require 'relisp'
7
7
 
8
+ EMACS = Relisp::ElispSlave.new unless defined? EMACS
9
+
8
10
  module TestRelisp
9
11
  class TestSlave < Test::Unit::TestCase
10
12
  # setup done in test_slaves.rb
@@ -15,10 +15,12 @@ require 'relisp'
15
15
  ### @emacs.elisp_eval( '(type-of (ruby-eval "hash"))' )
16
16
  # So the second way needs to be included in testing.
17
17
 
18
+ EMACS = Relisp::ElispSlave.new unless defined? EMACS
18
19
 
19
20
  class TestArray < Test::Unit::TestCase
20
21
  def setup
21
- @emacs = Relisp::ElispSlave.new
22
+ @emacs = EMACS
23
+ # @emacs = Relisp::ElispSlave.new
22
24
  end
23
25
 
24
26
  def test_class_from_elisp
@@ -63,7 +65,7 @@ end
63
65
 
64
66
  class TestClass < Test::Unit::TestCase
65
67
  def test_to_elisp
66
- @emacs = Relisp::ElispSlave.new
68
+ @emacs = EMACS
67
69
  assert_equal :Array, @emacs.elisp_eval('(ruby-eval "[1, 2].class")')
68
70
  end
69
71
  end
@@ -81,7 +83,7 @@ end
81
83
 
82
84
  class TestNilClass < Test::Unit::TestCase
83
85
  def setup
84
- @emacs = Relisp::ElispSlave.new
86
+ @emacs = EMACS
85
87
  end
86
88
 
87
89
  def test_class_from_elisp
@@ -96,7 +98,7 @@ end
96
98
 
97
99
  class TestObject < Test::Unit::TestCase
98
100
  def setup
99
- @emacs = Relisp::ElispSlave.new
101
+ @emacs = EMACS
100
102
  end
101
103
 
102
104
  def test_class_from_elisp
@@ -110,7 +112,7 @@ end
110
112
 
111
113
  class TestTrueClass < Test::Unit::TestCase
112
114
  def setup
113
- @emacs = Relisp::ElispSlave.new
115
+ @emacs = EMACS
114
116
  end
115
117
 
116
118
  def test_to_elisp
@@ -121,19 +123,39 @@ end
121
123
  module TestRelisp
122
124
  class TestCons < Test::Unit::TestCase
123
125
  def setup
124
- @emacs = Relisp::ElispSlave.new
126
+ @emacs = EMACS
127
+ # @emacs = Relisp::ElispSlave.new
125
128
  end
126
129
 
130
+ def test_initialize
131
+ new_cons = Relisp::Cons.new(1, 2)
132
+ assert_equal :cons, @emacs.type_of(new_cons)
133
+ end
134
+
127
135
  def test_car
128
136
  result = @emacs.elisp_eval( "'(1 2 3)" )
129
137
  assert_equal 1, result.car
130
138
  end
131
139
 
140
+ def test_car_equals
141
+ result = @emacs.elisp_eval( "'(1 2 3)" )
142
+ result.car = 2
143
+ assert_equal 2, result.car
144
+ end
145
+
132
146
  def test_cdr
133
147
  result = @emacs.elisp_eval( "'(1 2 3)" )
134
148
  assert_equal @emacs.elisp_eval( "'(2 3)" ).to_list, result.cdr.to_list
135
149
  end
136
150
 
151
+ def test_cdr_equals
152
+ result = @emacs.elisp_eval( "'(1 2 3)" )
153
+ list = @emacs.elisp_eval( "'(2 3 4 5)" )
154
+ result.cdr=list
155
+ new_result = @emacs.elisp_eval( "'(1 2 3 4 5)" )
156
+ assert_equal new_result.to_list, result.to_list
157
+ end
158
+
137
159
  def test_list_eh
138
160
  result = @emacs.elisp_eval( "'(1 2 3)" )
139
161
  assert result.list?
@@ -152,7 +174,7 @@ module TestRelisp
152
174
 
153
175
  class TestList < Test::Unit::TestCase
154
176
  def setup
155
- @emacs = Relisp::ElispSlave.new
177
+ @emacs = EMACS
156
178
  end
157
179
 
158
180
  def test_class_from_elisp
@@ -175,7 +197,7 @@ module TestRelisp
175
197
 
176
198
  class TestFloat < Test::Unit::TestCase
177
199
  def setup
178
- @emacs = Relisp::ElispSlave.new
200
+ @emacs = EMACS
179
201
  end
180
202
 
181
203
  def test_class_from_elisp
@@ -190,14 +212,14 @@ module TestRelisp
190
212
 
191
213
  class TestHashTable < Test::Unit::TestCase
192
214
  def setup
193
- @emacs = Relisp::ElispSlave.new
194
- @emacs.elisp_execute( '(setq ht (make-hash-table))' )
195
- @emacs.elisp_execute( '(puthash "first" "john" ht)' )
196
- @emacs.elisp_execute( '(puthash \'last "doe" ht)' )
197
- @emacs.elisp_execute( '(setq subht (make-hash-table))' )
198
- @emacs.elisp_execute( '(puthash "first" "john" subht)' )
199
- @emacs.elisp_execute( '(puthash \'last "doe" subht)' )
200
- @emacs.elisp_execute( '(puthash \'sub subht ht)' )
215
+ @emacs = EMACS
216
+ @emacs.elisp_exec( '(setq ht (make-hash-table))' )
217
+ @emacs.elisp_exec( '(puthash "first" "john" ht)' )
218
+ @emacs.elisp_exec( '(puthash \'last "doe" ht)' )
219
+ @emacs.elisp_exec( '(setq subht (make-hash-table))' )
220
+ @emacs.elisp_exec( '(puthash "first" "john" subht)' )
221
+ @emacs.elisp_exec( '(puthash \'last "doe" subht)' )
222
+ @emacs.elisp_exec( '(puthash \'sub subht ht)' )
201
223
  end
202
224
 
203
225
  def test_class_from_elisp
@@ -225,7 +247,7 @@ module TestRelisp
225
247
 
226
248
  class TestInteger < Test::Unit::TestCase
227
249
  def setup
228
- @emacs = Relisp::ElispSlave.new
250
+ @emacs = EMACS
229
251
  end
230
252
 
231
253
  def test_class_from_elisp
@@ -240,7 +262,7 @@ module TestRelisp
240
262
 
241
263
  class TestString < Test::Unit::TestCase
242
264
  def setup
243
- @emacs = Relisp::ElispSlave.new
265
+ @emacs = EMACS
244
266
  end
245
267
 
246
268
  def test_class_from_elisp
@@ -257,7 +279,7 @@ module TestRelisp
257
279
 
258
280
  class TestSymbol < Test::Unit::TestCase
259
281
  def setup
260
- @emacs = Relisp::ElispSlave.new
282
+ @emacs = EMACS
261
283
  end
262
284
 
263
285
  def test_class_from_elisp
@@ -280,7 +302,7 @@ module TestRelisp
280
302
 
281
303
  class TestVector < Test::Unit::TestCase
282
304
  def setup
283
- @emacs = Relisp::ElispSlave.new
305
+ @emacs = EMACS
284
306
  end
285
307
 
286
308
  def test_class_from_elisp