rcov 0.9.11 → 1.0.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 (46) hide show
  1. data/bin/rcov +26 -3
  2. data/ext/rcovrt/1.8/callsite.c +38 -53
  3. data/ext/rcovrt/1.8/rcovrt.c +84 -100
  4. data/ext/rcovrt/extconf.rb +7 -12
  5. data/lib/rcov/formatters/html_erb_template.rb +7 -7
  6. data/lib/rcov/formatters/html_profiling.rb +51 -0
  7. data/lib/rcov/formatters/ruby_annotation.rb +110 -0
  8. data/lib/rcov/templates/index.html.erb +18 -14
  9. data/lib/rcov/version.rb +2 -6
  10. metadata +35 -75
  11. data/BLURB +0 -111
  12. data/LICENSE +0 -53
  13. data/Rakefile +0 -103
  14. data/THANKS +0 -110
  15. data/doc/readme_for_api.markdown +0 -22
  16. data/doc/readme_for_emacs.markdown +0 -52
  17. data/doc/readme_for_rake.markdown +0 -51
  18. data/doc/readme_for_vim.markdown +0 -34
  19. data/editor-extensions/rcov.el +0 -131
  20. data/editor-extensions/rcov.vim +0 -38
  21. data/ext/rcovrt/1.9/callsite.c +0 -234
  22. data/ext/rcovrt/1.9/rcovrt.c +0 -264
  23. data/setup.rb +0 -1588
  24. data/test/assets/sample_01.rb +0 -7
  25. data/test/assets/sample_02.rb +0 -5
  26. data/test/assets/sample_03.rb +0 -20
  27. data/test/assets/sample_04.rb +0 -10
  28. data/test/assets/sample_05-new.rb +0 -17
  29. data/test/assets/sample_05-old.rb +0 -13
  30. data/test/assets/sample_05.rb +0 -17
  31. data/test/assets/sample_06.rb +0 -8
  32. data/test/call_site_analyzer_test.rb +0 -171
  33. data/test/code_coverage_analyzer_test.rb +0 -220
  34. data/test/expected_coverage/diff-gcc-all.out +0 -7
  35. data/test/expected_coverage/diff-gcc-diff.out +0 -11
  36. data/test/expected_coverage/diff-gcc-original.out +0 -5
  37. data/test/expected_coverage/diff-no-color.out +0 -12
  38. data/test/expected_coverage/diff.out +0 -12
  39. data/test/expected_coverage/gcc-text.out +0 -10
  40. data/test/expected_coverage/sample_03_rb.html +0 -651
  41. data/test/expected_coverage/sample_03_rb.rb +0 -28
  42. data/test/expected_coverage/sample_04_rb.html +0 -641
  43. data/test/file_statistics_test.rb +0 -471
  44. data/test/functional_test.rb +0 -91
  45. data/test/test_helper.rb +0 -4
  46. data/test/turn_off_rcovrt.rb +0 -4
@@ -1,91 +0,0 @@
1
- require File.dirname(__FILE__) + '/test_helper'
2
-
3
- =begin
4
- Updating functional testdata automatically is DANGEROUS, so I do manually.
5
-
6
- == update functional test
7
- cd ~/src/rcov/test
8
- rcov="ruby ../bin/rcov -I../lib:../ext/rcovrt -o expected_coverage"
9
-
10
- $rcov -a sample_04.rb
11
- $rcov sample_04.rb
12
- $rcov --gcc --include-file=sample --exclude=rcov sample_04.rb > expected_coverage/gcc-text.out
13
-
14
- cp sample_05-old.rb sample_05.rb
15
- $rcov --no-html --gcc --include-file=sample --exclude=rcov --save=coverage.info sample_05.rb > expected_coverage/diff-gcc-original.out
16
- cp sample_05-new.rb sample_05.rb
17
- $rcov --no-html --gcc -D --include-file=sample --exclude=rcov sample_05.rb > expected_coverage/diff-gcc-diff.out
18
- $rcov --no-html -D --include-file=sample --exclude=rcov sample_05.rb > expected_coverage/diff.out
19
- $rcov --no-html --no-color -D --include-file=sample --exclude=rcov sample_05.rb > expected_coverage/diff-no-color.out
20
- $rcov --no-html --gcc --include-file=sample --exclude=rcov sample_05.rb > expected_coverage/diff-gcc-all.out
21
-
22
- =end
23
-
24
- class TestFunctional < Test::Unit::TestCase
25
- @@dir = Pathname(__FILE__).expand_path.dirname
26
-
27
- def strip_variable_sections(str)
28
- str.sub(/Generated on.+$/, '').sub(/Generated using the.+$/, '').squeeze("\n")
29
- end
30
-
31
- def cmp(file)
32
- content = lambda{|dir| strip_variable_sections(File.read(@@dir+dir+file))}
33
-
34
- assert_equal(content["expected_coverage"], content["actual_coverage"])
35
- end
36
-
37
- def with_testdir(&block)
38
- Dir.chdir(@@dir, &block)
39
- end
40
-
41
- def run_rcov(opts, script="assets/sample_04.rb", opts_tail="")
42
- rcov = @@dir+"../bin/rcov"
43
- ruby_opts = "-I../lib:../ext/rcovrt"
44
- ruby = "ruby"
45
- ruby = "jruby" if RUBY_PLATFORM =~ /java/
46
- with_testdir do
47
- `cd #{@@dir}; #{ruby} #{ruby_opts} #{rcov} #{opts} -o actual_coverage #{script} #{opts_tail}`
48
- yield if block_given?
49
- end
50
- end
51
-
52
- def test_annotation
53
- run_rcov("-a") do
54
- cmp "../assets/sample_04.rb"
55
- cmp "../assets/sample_03.rb"
56
- end
57
- end
58
-
59
- @@selection = "--include-file=sample --exclude=rcov"
60
- def test_text_gcc
61
- run_rcov("--gcc #{@@selection}", "assets/sample_04.rb", "> actual_coverage/gcc-text.out") do
62
- cmp "gcc-text.out"
63
- end
64
- end
65
-
66
- def test_diff
67
- with_testdir { FileUtils.cp "assets/sample_05-old.rb", "assets/sample_05.rb" }
68
-
69
- run_rcov("--no-html --gcc #{@@selection} --save=coverage.info", "assets/sample_05.rb", "> actual_coverage/diff-gcc-original.out") do
70
- cmp "diff-gcc-original.out"
71
- end
72
-
73
- with_testdir { FileUtils.cp "assets/sample_05-new.rb", "assets/sample_05.rb" }
74
- run_rcov("--no-html -D --gcc #{@@selection}", "assets/sample_05.rb", "> actual_coverage/diff-gcc-diff.out") do
75
- cmp "diff-gcc-diff.out"
76
- end
77
-
78
- run_rcov("--no-html -D #{@@selection}", "assets/sample_05.rb", "> actual_coverage/diff.out") do
79
- cmp "diff.out"
80
- end
81
-
82
- run_rcov("--no-html --no-color -D #{@@selection}", "assets/sample_05.rb", "> actual_coverage/diff-no-color.out") do
83
- cmp "diff-no-color.out"
84
- end
85
-
86
- run_rcov("--no-html --gcc #{@@selection}", "assets/sample_05.rb", "> actual_coverage/diff-gcc-all.out") do
87
- cmp "diff-gcc-all.out"
88
- end
89
- end
90
-
91
- end
@@ -1,4 +0,0 @@
1
- require 'test/unit'
2
- require 'rcov'
3
- require 'pathname'
4
- require 'fileutils'
@@ -1,4 +0,0 @@
1
- # When loaded, this file forces rcov to run in pure-Ruby mode even if
2
- # rcovrt.so exists and can be loaded.
3
-
4
- $rcov_do_not_use_rcovrt = true