rbx-linecache 1.3-universal-rubinius-2.0 → 1.4-universal-rubinius-2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,30 +9,30 @@ class TestLineCache < Test::Unit::TestCase
9
9
  @@TEST_DIR = File.expand_path(File.dirname(__FILE__))
10
10
  @@TOP_SRC_DIR = File.join(@@TEST_DIR, '..', 'lib')
11
11
  require File.join(@@TOP_SRC_DIR, 'linecache.rb')
12
-
12
+
13
13
  def setup
14
14
  LineCache::clear_file_cache
15
15
  end
16
-
16
+
17
17
  def test_basic
18
18
  fp = File.open(__FILE__, 'r')
19
19
  compare_lines = fp.readlines()
20
20
  fp.close
21
-
21
+
22
22
  # Test getlines to read this file.
23
23
  lines = LineCache::getlines(__FILE__)
24
24
  assert_equal(compare_lines, lines,
25
25
  'We should get exactly the same lines as reading this file.')
26
-
26
+
27
27
  # Test getline to read this file. The file should now be cached,
28
28
  # so internally a different set of routines are used.
29
29
  test_line = 1
30
30
  line = LineCache::getline(__FILE__, test_line)
31
31
  assert_equal(compare_lines[test_line-1], line,
32
32
  'We should get exactly the same line as reading this file.')
33
-
33
+
34
34
  # Test getting the line via a relative file name
35
- Dir.chdir(File.dirname(__FILE__)) do
35
+ Dir.chdir(File.dirname(__FILE__)) do
36
36
  short_file = File.basename(__FILE__)
37
37
  test_line = 10
38
38
  line = LineCache::getline(short_file, test_line)
@@ -73,7 +73,7 @@ class TestLineCache < Test::Unit::TestCase
73
73
  assert_equal(false, LineCache::cached_script?('./short-file'),
74
74
  "Should not find './short-file' in SCRIPT_LINES__")
75
75
  assert_equal(true, 78 < LineCache.size(__FILE__))
76
- # Dir.chdir(File.dirname(__FILE__)) do
76
+ # Dir.chdir(File.dirname(__FILE__)) do
77
77
  # load('./short-file', 0)
78
78
  # assert_equal(true, LineCache::cached_script?('./short-file'),
79
79
  # "Should be able to find './short-file' in SCRIPT_LINES__")
@@ -93,23 +93,23 @@ class TestLineCache < Test::Unit::TestCase
93
93
  line5 = LineCache::getline(__FILE__, 5)
94
94
  LineCache::remap_file_lines(__FILE__, 'test2', 9, 5)
95
95
  rline9 = LineCache::getline('test2', 9)
96
- assert_equal(line5, rline9,
96
+ assert_equal(line5, rline9,
97
97
  'lines should be the same via remap_file_line - remap integer')
98
98
 
99
99
  line6 = LineCache::getline(__FILE__, 6)
100
100
  rline10 = LineCache::getline('test2', 10)
101
- assert_equal(line6, rline10,
101
+ assert_equal(line6, rline10,
102
102
  'lines should be the same via remap_file_line - range')
103
103
 
104
104
  line7 = LineCache::getline(__FILE__, 7)
105
105
  rline11 = LineCache::getline('test2', 11)
106
- assert_equal(line7, rline11,
106
+ assert_equal(line7, rline11,
107
107
  'lines should be the same via remap_file_line - range')
108
108
 
109
109
  line8 = LineCache::getline(__FILE__, 8)
110
110
  LineCache::remap_file_lines(__FILE__, nil, 20, 8)
111
111
  rline20 = LineCache::getline(__FILE__, 20)
112
- assert_equal(line8, rline20,
112
+ assert_equal(line8, rline20,
113
113
  'lines should be the same via remap_file_line - nil file')
114
114
  end
115
115
 
@@ -142,7 +142,7 @@ class TestLineCache < Test::Unit::TestCase
142
142
  end
143
143
 
144
144
  def test_sha1
145
- test_file = File.join(@@TEST_DIR, 'short-file')
145
+ test_file = File.join(@@TEST_DIR, 'short-file')
146
146
  LineCache::cache(test_file)
147
147
  assert_equal('3e1d87f3399fc73ae5683e106bce1b5ba823fc50',
148
148
  LineCache::sha1(test_file))
@@ -152,12 +152,12 @@ class TestLineCache < Test::Unit::TestCase
152
152
  x = nil
153
153
  line1 = "loc = Rubinius::VM::backtrace(0)[0]"
154
154
  eval(line1 + "
155
- x = LineCache::getline(loc.static_scope.script, 1)")
155
+ x = LineCache::getline(loc.constant_scope.script, 1)")
156
156
  assert_equal(line1, x)
157
157
  eval("loc = Rubinius::VM::backtrace(0)[0]
158
- assert_equal(2, LineCache::size(loc.static_scope.script))")
158
+ assert_equal(2, LineCache::size(loc.constant_scope.script))")
159
159
  string = "loc = Rubinius::VM::backtrace(0)[0]
160
- LineCache::map_script(loc.static_scope.script)"
160
+ LineCache::map_script(loc.constant_scope.script)"
161
161
  temp_filename = eval(string)
162
162
  got_lines = File.open(temp_filename).readlines.join('')
163
163
  assert_equal(string, got_lines.chomp)
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # $Id: test-tracelines.rb 235 2010-12-25 14:22:47Z rockyb $
2
+ # $Id$
3
3
  require 'test/unit'
4
4
  require 'fileutils'
5
5
  require 'tempfile'
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbx-linecache
3
3
  version: !ruby/object:Gem::Version
4
- hash: 756206160
4
+ hash: 728101489
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 3
9
- version: "1.3"
8
+ - 4
9
+ version: "1.4"
10
10
  platform: universal-rubinius-2.0
11
11
  authors:
12
12
  - R. Bernstein
@@ -14,8 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-16 00:00:00 -04:00
18
- default_executable:
17
+ date: 2013-07-11 00:00:00 Z
19
18
  dependencies:
20
19
  - !ruby/object:Gem::Dependency
21
20
  name: rbx-require-relative
@@ -55,51 +54,50 @@ files:
55
54
  - NEWS
56
55
  - README
57
56
  - Rakefile
58
- - lib/tracelines.rb
59
57
  - lib/linecache.rb
60
- - test/parse-show.rb
58
+ - lib/tracelines.rb
61
59
  - test/lnum-diag.rb
60
+ - test/parse-show.rb
62
61
  - test/rcov-bug.rb
63
- - test/test-lnum.rb
64
62
  - test/test-linecache.rb
63
+ - test/test-lnum.rb
65
64
  - test/test-tracelines.rb
66
- - test/data/if1.rb
67
- - test/data/comments1.rb
68
- - test/data/not-lit.rb
65
+ - test/data/begin1.rb
69
66
  - test/data/begin2.rb
67
+ - test/data/begin3.rb
68
+ - test/data/block1.rb
70
69
  - test/data/block2.rb
71
- - test/data/if6.rb
72
- - test/data/end.rb
70
+ - test/data/case1.rb
71
+ - test/data/case2.rb
72
+ - test/data/case3.rb
73
73
  - test/data/case4.rb
74
- - test/data/begin1.rb
75
- - test/data/for1.rb
76
- - test/data/match.rb
77
- - test/data/match3a.rb
74
+ - test/data/case5.rb
78
75
  - test/data/class1.rb
79
- - test/data/if3.rb
80
- - test/data/if5.rb
81
- - test/data/case1.rb
76
+ - test/data/comments1.rb
82
77
  - test/data/def1.rb
83
- - test/data/if7.rb
84
- - test/data/block1.rb
85
- - test/data/begin3.rb
86
- - test/data/case3.rb
87
- - test/data/case2.rb
88
78
  - test/data/each1.rb
79
+ - test/data/end.rb
80
+ - test/data/for1.rb
81
+ - test/data/if1.rb
89
82
  - test/data/if2.rb
90
- - test/data/match3.rb
83
+ - test/data/if3.rb
91
84
  - test/data/if4.rb
92
- - test/data/case5.rb
85
+ - test/data/if5.rb
86
+ - test/data/if6.rb
87
+ - test/data/if7.rb
88
+ - test/data/match.rb
89
+ - test/data/match3.rb
90
+ - test/data/match3a.rb
91
+ - test/data/not-lit.rb
93
92
  - test/short-file
94
93
  - test/short-file2
95
- has_rdoc: true
96
94
  homepage: http://rubyforge.org/projects/rocky-hacks/linecache
97
95
  licenses:
98
96
  - MIT
99
97
  post_install_message:
100
98
  rdoc_options:
101
99
  - --title
102
- - LineCache 1.3 Documentation
100
+ - LineCache 1.4 Documentation
103
101
  require_paths:
104
102
  - lib
105
103
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -123,14 +121,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
121
  requirements: []
124
122
 
125
123
  rubyforge_project: rocky-hacks
126
- rubygems_version: 1.5.2
124
+ rubygems_version: 1.8.25
127
125
  signing_key:
128
126
  specification_version: 3
129
127
  summary: Module to read and cache Ruby program files and file information
130
128
  test_files:
131
- - test/parse-show.rb
132
129
  - test/lnum-diag.rb
130
+ - test/parse-show.rb
133
131
  - test/rcov-bug.rb
134
- - test/test-lnum.rb
135
132
  - test/test-linecache.rb
133
+ - test/test-lnum.rb
136
134
  - test/test-tracelines.rb