rcodetools 0.8.0.0 → 0.8.1.0

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.
Files changed (112) hide show
  1. data/Rakefile +3 -3
  2. data/bin/rct-complete +1 -1
  3. data/bin/rct-doc +1 -1
  4. data/bin/rct-meth-args +1 -1
  5. data/bin/xmpfilter +1 -1
  6. data/lib/rcodetools/xmpfilter.rb +2 -2
  7. data/rcodetools.elc +0 -0
  8. data/rcodetools.gif +0 -0
  9. data/rcodetools.sxmp +0 -0
  10. data/test/attic/test_run.rb +45 -0
  11. data/test/data/attic/add_markers-input.rb +2 -0
  12. data/test/data/attic/add_markers-output.rb +2 -0
  13. data/test/data/attic/bindings-input.rb +26 -0
  14. data/test/data/attic/bindings-output.rb +31 -0
  15. data/test/data/attic/completion-input.rb +1 -0
  16. data/test/data/attic/completion-output.rb +2 -0
  17. data/test/data/attic/completion_class_info-input.rb +1 -0
  18. data/test/data/attic/completion_class_info-output.rb +10 -0
  19. data/test/data/attic/completion_class_info_no_candidates-input.rb +1 -0
  20. data/test/data/attic/completion_class_info_no_candidates-output.rb +1 -0
  21. data/test/data/attic/completion_detect_rbtest-input.rb +7 -0
  22. data/test/data/attic/completion_detect_rbtest-output.rb +2 -0
  23. data/test/data/attic/completion_detect_rbtest2-input.rb +1 -0
  24. data/test/data/attic/completion_detect_rbtest2-output.rb +2 -0
  25. data/test/data/attic/completion_emacs-input.rb +1 -0
  26. data/test/data/attic/completion_emacs-output.rb +6 -0
  27. data/test/data/attic/completion_emacs_icicles-input.rb +1 -0
  28. data/test/data/attic/completion_emacs_icicles-output.rb +6 -0
  29. data/test/data/attic/completion_in_method-input.rb +3 -0
  30. data/test/data/attic/completion_in_method-output.rb +1 -0
  31. data/test/data/attic/completion_in_method-test.rb +6 -0
  32. data/test/data/attic/completion_rbtest-input.rb +7 -0
  33. data/test/data/attic/completion_rbtest-output.rb +2 -0
  34. data/test/data/attic/doc-input.rb +1 -0
  35. data/test/data/attic/doc-output.rb +1 -0
  36. data/test/data/attic/doc_detect_rbtest-input.rb +1 -0
  37. data/test/data/attic/doc_detect_rbtest-output.rb +1 -0
  38. data/test/data/attic/doc_detect_rbtest2-input.rb +7 -0
  39. data/test/data/attic/doc_detect_rbtest2-output.rb +1 -0
  40. data/test/data/attic/doc_rbtest-input.rb +7 -0
  41. data/test/data/attic/doc_rbtest-output.rb +1 -0
  42. data/test/data/attic/no_warnings-input.rb +3 -0
  43. data/test/data/attic/no_warnings-output.rb +4 -0
  44. data/test/data/attic/refe-input.rb +1 -0
  45. data/test/data/attic/refe-output.rb +1 -0
  46. data/test/data/attic/ri-input.rb +1 -0
  47. data/test/data/attic/ri-output.rb +1 -0
  48. data/test/data/attic/ri_emacs-input.rb +1 -0
  49. data/test/data/attic/ri_emacs-output.rb +1 -0
  50. data/test/data/attic/ri_vim-input.rb +1 -0
  51. data/test/data/attic/ri_vim-output.rb +1 -0
  52. data/test/data/attic/rspec-input.rb +48 -0
  53. data/test/data/attic/rspec-output.rb +52 -0
  54. data/test/data/attic/rspec_poetry-input.rb +48 -0
  55. data/test/data/attic/rspec_poetry-output.rb +52 -0
  56. data/test/data/attic/simple_annotation-input.rb +8 -0
  57. data/test/data/attic/simple_annotation-output.rb +8 -0
  58. data/test/data/attic/unit_test-input.rb +50 -0
  59. data/test/data/attic/unit_test-output.rb +52 -0
  60. data/test/data/attic/unit_test_detect_rbtest-input.rb +50 -0
  61. data/test/data/attic/unit_test_detect_rbtest-output.rb +52 -0
  62. data/test/data/attic/unit_test_detect_rbtest2-input.rb +6 -0
  63. data/test/data/attic/unit_test_detect_rbtest2-output.rb +6 -0
  64. data/test/data/attic/unit_test_poetry-input.rb +50 -0
  65. data/test/data/attic/unit_test_poetry-output.rb +52 -0
  66. data/test/data/attic/unit_test_rbtest-input.rb +6 -0
  67. data/test/data/attic/unit_test_rbtest-output.rb +6 -0
  68. data/test/data/rct-complete-TDC/completion_in_method__testmethod.taf +17 -0
  69. data/test/data/rct-complete-TDC/completion_in_method__testscript.taf +17 -0
  70. data/test/data/rct-complete-TDC/completion_in_method__wrong_testmethod.taf +17 -0
  71. data/test/data/rct-complete/completion.taf +9 -0
  72. data/test/data/rct-complete/completion_class_info.taf +9 -0
  73. data/test/data/rct-complete/completion_class_info_no_candidates.taf +8 -0
  74. data/test/data/rct-complete/completion_detect_rbtest.taf +15 -0
  75. data/test/data/rct-complete/completion_detect_rbtest2.taf +9 -0
  76. data/test/data/rct-complete/completion_emacs.taf +13 -0
  77. data/test/data/rct-complete/completion_emacs_icicles.taf +13 -0
  78. data/test/data/rct-complete/completion_rbtest.taf +15 -0
  79. data/test/data/rct-doc/doc.taf +8 -0
  80. data/test/data/rct-doc/doc_detect_rbtest.taf +8 -0
  81. data/test/data/rct-doc/doc_detect_rbtest2.taf +14 -0
  82. data/test/data/rct-doc/doc_rbtest.taf +14 -0
  83. data/test/data/rct-doc/refe.taf +8 -0
  84. data/test/data/rct-doc/ri.taf +8 -0
  85. data/test/data/rct-doc/ri_emacs.taf +8 -0
  86. data/test/data/rct-doc/ri_vim.taf +8 -0
  87. data/test/data/xmpfilter/add_markers.taf +10 -0
  88. data/test/data/xmpfilter/bindings.taf +63 -0
  89. data/test/data/xmpfilter/comment_out.taf +22 -0
  90. data/test/data/xmpfilter/exception.taf +14 -0
  91. data/test/data/xmpfilter/expectations.taf +54 -0
  92. data/test/data/xmpfilter/last_match.taf +18 -0
  93. data/test/data/xmpfilter/mult.rb +9 -0
  94. data/test/data/xmpfilter/multi_line_annotation_1.taf +22 -0
  95. data/test/data/xmpfilter/multi_line_annotation_2.taf +24 -0
  96. data/test/data/xmpfilter/multi_line_annotation_3.taf +20 -0
  97. data/test/data/xmpfilter/multi_line_annotation_4.taf +22 -0
  98. data/test/data/xmpfilter/multi_line_annotation_5.taf +34 -0
  99. data/test/data/xmpfilter/no_warnings.taf +13 -0
  100. data/test/data/xmpfilter/nospace.taf +16 -0
  101. data/test/data/xmpfilter/rspec.taf +106 -0
  102. data/test/data/xmpfilter/rspec_poetry.taf +106 -0
  103. data/test/data/xmpfilter/simple_annotation.taf +22 -0
  104. data/test/data/xmpfilter/unit_test.taf +108 -0
  105. data/test/data/xmpfilter/unit_test_detect_rbtest.taf +108 -0
  106. data/test/data/xmpfilter/unit_test_detect_rbtest2.taf +18 -0
  107. data/test/data/xmpfilter/unit_test_poetry.taf +108 -0
  108. data/test/data/xmpfilter/unit_test_rbtest.taf +18 -0
  109. data/test/data/xmpfilter/width.taf +16 -0
  110. data/test/tmp_functional.rb +162 -0
  111. data/test/tmp_run.rb +66 -0
  112. metadata +127 -22
@@ -0,0 +1,6 @@
1
+ =begin test_bar
2
+ bar("bar") # =>
3
+ =end
4
+ def bar(s)
5
+ s.upcase
6
+ end
@@ -0,0 +1,6 @@
1
+ =begin test_bar
2
+ assert_equal("BAR", bar("bar"))
3
+ =end
4
+ def bar(s)
5
+ s.upcase
6
+ end
@@ -0,0 +1,17 @@
1
+ ==========
2
+ completion_in_method__testmethod
3
+ ==========
4
+ rct-complete --filename %s --line 2 -t %s@test_fooz
5
+ ==========
6
+ def fooz
7
+ [].lengt
8
+ end
9
+ ==========
10
+ length
11
+ ==========
12
+ require 'test/unit'
13
+ class TestFooz < Test::Unit::TestCase
14
+ def test_fooz
15
+ assert_equal(0, fooz)
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ ==========
2
+ completion_in_method__testscript
3
+ ==========
4
+ rct-complete --filename %s --line 2 -t %s
5
+ ==========
6
+ def fooz
7
+ [].lengt
8
+ end
9
+ ==========
10
+ length
11
+ ==========
12
+ require 'test/unit'
13
+ class TestFooz < Test::Unit::TestCase
14
+ def test_fooz
15
+ assert_equal(0, fooz)
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ ==========
2
+ completion_in_method__wrong_testmethod
3
+ ==========
4
+ rct-complete --filename %s --line 2 -t %s@test_NOT_FOUND
5
+ ==========
6
+ def fooz
7
+ [].lengt
8
+ end
9
+ ==========
10
+
11
+ ==========
12
+ require 'test/unit'
13
+ class TestFooz < Test::Unit::TestCase
14
+ def test_fooz
15
+ assert_equal(0, fooz)
16
+ end
17
+ end
@@ -0,0 +1,9 @@
1
+ ==========
2
+ completion
3
+ ==========
4
+ rct-complete -C --line=1
5
+ ==========
6
+ Array.new(3).uni
7
+ ==========
8
+ uniq
9
+ uniq!
@@ -0,0 +1,9 @@
1
+ ==========
2
+ completion_class_info
3
+ ==========
4
+ rct-complete --completion-class-info --line=1
5
+ ==========
6
+ Array.new(3).sl
7
+ ==========
8
+ slice Array#slice
9
+ slice! Array#slice!
@@ -0,0 +1,8 @@
1
+ ==========
2
+ completion_class_info_no_candidates
3
+ ==========
4
+ rct-complete --completion-class-info --line=1
5
+ ==========
6
+ Array.new(3).nonexisten
7
+ ==========
8
+
@@ -0,0 +1,15 @@
1
+ ==========
2
+ completion_detect_rbtest
3
+ ==========
4
+ rct-complete --detect-rbtest --line=6
5
+ ==========
6
+ #!/usr/bin/env ruby
7
+ =begin test_bar
8
+ assert_equal "BAR", bar("bar")
9
+ =end
10
+ def bar(s)
11
+ s.upca
12
+ end
13
+ ==========
14
+ upcase
15
+ upcase!
@@ -0,0 +1,9 @@
1
+ ==========
2
+ completion_detect_rbtest2
3
+ ==========
4
+ rct-complete --detect-rbtest --line=1
5
+ ==========
6
+ Array.new(3).uni
7
+ ==========
8
+ uniq
9
+ uniq!
@@ -0,0 +1,13 @@
1
+ ==========
2
+ completion_emacs
3
+ ==========
4
+ rct-complete --completion-emacs --line=1
5
+ ==========
6
+ Array.new(3).uni
7
+ ==========
8
+ (progn
9
+ (setq rct-method-completion-table '(("uniq") ("uniq!") ))
10
+ (setq alist '(("uniq\t[Array#uniq]") ("uniq!\t[Array#uniq!]") ))
11
+ (setq pattern "uni")
12
+ (try-completion pattern rct-method-completion-table nil)
13
+ )
@@ -0,0 +1,13 @@
1
+ ==========
2
+ completion_emacs_icicles
3
+ ==========
4
+ rct-complete --completion-emacs-icicles --line=1
5
+ ==========
6
+ 1.div
7
+ ==========
8
+ (progn
9
+ (setq rct-method-completion-table '(("div\t[Fixnum#div]") ("divmod\t[Fixnum#divmod]") ))
10
+ (setq alist '(("div" . "Fixnum#div")("divmod" . "Fixnum#divmod")))
11
+ (setq pattern "div")
12
+ (setq klass "Fixnum")
13
+ )
@@ -0,0 +1,15 @@
1
+ ==========
2
+ completion_rbtest
3
+ ==========
4
+ rct-complete --rbtest --line=6
5
+ ==========
6
+ #!/usr/bin/env ruby
7
+ =begin test_bar
8
+ assert_equal "BAR", bar("bar")
9
+ =end
10
+ def bar(s)
11
+ s.upca
12
+ end
13
+ ==========
14
+ upcase
15
+ upcase!
@@ -0,0 +1,8 @@
1
+ ==========
2
+ doc
3
+ ==========
4
+ rct-doc -D --line=1
5
+ ==========
6
+ [].length
7
+ ==========
8
+ Array#length
@@ -0,0 +1,8 @@
1
+ ==========
2
+ doc_detect_rbtest
3
+ ==========
4
+ rct-doc --detect-rbtest --line=1
5
+ ==========
6
+ [].length
7
+ ==========
8
+ Array#length
@@ -0,0 +1,14 @@
1
+ ==========
2
+ doc_detect_rbtest2
3
+ ==========
4
+ rct-doc --detect-rbtest --line=6
5
+ ==========
6
+ #!/usr/bin/env ruby
7
+ =begin test_bar
8
+ assert_equal "BAR", bar("bar")
9
+ =end
10
+ def bar(s)
11
+ s.upcase
12
+ end
13
+ ==========
14
+ String#upcase
@@ -0,0 +1,14 @@
1
+ ==========
2
+ doc_rbtest
3
+ ==========
4
+ rct-doc --rbtest --line=6
5
+ ==========
6
+ #!/usr/bin/env ruby
7
+ =begin test_bar
8
+ assert_equal "BAR", bar("bar")
9
+ =end
10
+ def bar(s)
11
+ s.upcase
12
+ end
13
+ ==========
14
+ String#upcase
@@ -0,0 +1,8 @@
1
+ ==========
2
+ refe
3
+ ==========
4
+ rct-doc --refe --line=1
5
+ ==========
6
+ [].length
7
+ ==========
8
+ refe 'Array#length'
@@ -0,0 +1,8 @@
1
+ ==========
2
+ ri
3
+ ==========
4
+ rct-doc --ri --line=1
5
+ ==========
6
+ [].length
7
+ ==========
8
+ ri 'Array#length'
@@ -0,0 +1,8 @@
1
+ ==========
2
+ ri_emacs
3
+ ==========
4
+ rct-doc --ri-emacs --line=1
5
+ ==========
6
+ [].length
7
+ ==========
8
+ (rct-find-tag-or-ri "Array#length")
@@ -0,0 +1,8 @@
1
+ ==========
2
+ ri_vim
3
+ ==========
4
+ rct-doc --ri-vim --line=1
5
+ ==========
6
+ [].length
7
+ ==========
8
+ call RCT_find_tag_or_ri("Array#length")
@@ -0,0 +1,10 @@
1
+ ==========
2
+ add_markers
3
+ ==========
4
+ xmpfilter -m
5
+ ==========
6
+ 1+1
7
+ 2+3
8
+ ==========
9
+ 1+1 # =>
10
+ 2+3 # =>
@@ -0,0 +1,63 @@
1
+ ==========
2
+ bindings
3
+ ==========
4
+ xmpfilter --poetry -u
5
+ ==========
6
+
7
+ require 'test/unit'
8
+
9
+ class TestFoo < Test::Unit::TestCase
10
+ def setup
11
+ @o = []
12
+ end
13
+
14
+ def test_foo
15
+ a = 1
16
+ b = a
17
+ b # =>
18
+ end
19
+
20
+ def test_arr
21
+ last = 1
22
+ @o << last
23
+ @o.last # =>
24
+ end
25
+
26
+ def test_bar
27
+ a = b = c = 1
28
+ d = a
29
+ d # =>
30
+ end
31
+ end
32
+ ==========
33
+
34
+ require 'test/unit'
35
+
36
+ class TestFoo < Test::Unit::TestCase
37
+ def setup
38
+ @o = []
39
+ end
40
+
41
+ def test_foo
42
+ a = 1
43
+ b = a
44
+ assert_equal a, b
45
+ assert_equal 1, b
46
+ end
47
+
48
+ def test_arr
49
+ last = 1
50
+ @o << last
51
+ assert_equal last, @o.last
52
+ assert_equal 1, @o.last
53
+ end
54
+
55
+ def test_bar
56
+ a = b = c = 1
57
+ d = a
58
+ assert_equal a, d
59
+ assert_equal b, d
60
+ assert_equal c, d
61
+ assert_equal 1, d
62
+ end
63
+ end
@@ -0,0 +1,22 @@
1
+ ==========
2
+ comment_out
3
+ ==========
4
+ xmpfilter
5
+ ==========
6
+
7
+ # 1 # =>
8
+ # 1 # => 2
9
+ 1 # => 12
10
+ 1
11
+ # # =>
12
+ # 1
13
+ # # =>
14
+ ==========
15
+
16
+ # 1 # =>
17
+ # 1 # => 2
18
+ 1 # => 1
19
+ 1
20
+ # # =>
21
+ # 1
22
+ # # =>
@@ -0,0 +1,14 @@
1
+ ==========
2
+ exception
3
+ ==========
4
+ xmpfilter
5
+ ==========
6
+ def foo
7
+ raise NameError, "ERR!!" rescue $@ # =>
8
+ end
9
+ foo
10
+ ==========
11
+ def foo
12
+ raise NameError, "ERR!!" rescue $@ # => ["-:2:in `foo'", "-:4"]
13
+ end
14
+ foo
@@ -0,0 +1,54 @@
1
+ ==========
2
+ expectations
3
+ ==========
4
+ xmpfilter --expectations
5
+ ==========
6
+
7
+ require 'rubygems'
8
+ require 'expectations'
9
+
10
+ S = Struct.new :a
11
+ Expectations do
12
+ 1 + 1 # =>
13
+ "a".length # =>
14
+ [][1] # =>
15
+ 1.hoge # =>
16
+ 1.1 + 1.0 # =>
17
+ S.new(1) # =>
18
+ end
19
+ ==========
20
+
21
+ require 'rubygems'
22
+ require 'expectations'
23
+
24
+ S = Struct.new :a
25
+ Expectations do
26
+ expect 2 do
27
+ 1 + 1
28
+ end
29
+
30
+ expect 1 do
31
+ "a".length
32
+ end
33
+
34
+ expect nil do
35
+ [][1]
36
+ end
37
+
38
+ expect NoMethodError do
39
+ 1.hoge
40
+ end
41
+
42
+ expect 2.0999..2.1001 do
43
+ 1.1 + 1.0
44
+ end
45
+
46
+ expect S do
47
+ S.new(1)
48
+ end
49
+
50
+ expect "#<struct S a=1>" do
51
+ S.new(1).inspect
52
+ end
53
+
54
+ end
@@ -0,0 +1,18 @@
1
+ ==========
2
+ last_match
3
+ ==========
4
+ xmpfilter
5
+ ==========
6
+
7
+ md = "abc".match(/(.)(.)./)
8
+ 1
9
+ # =>
10
+ [$1, $2] # =>
11
+ $1 # =>
12
+ ==========
13
+
14
+ md = "abc".match(/(.)(.)./)
15
+ 1
16
+ # => 1
17
+ [$1, $2] # => ["a", "b"]
18
+ $1 # => "a"