piko-max-mod 0.0.1

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 (78) hide show
  1. checksums.yaml +7 -0
  2. data/piko-max-mod.gemspec +12 -0
  3. data/test-unit-3.7.8/BSDL +24 -0
  4. data/test-unit-3.7.8/COPYING +64 -0
  5. data/test-unit-3.7.8/PSFL +271 -0
  6. data/test-unit-3.7.8/README.md +108 -0
  7. data/test-unit-3.7.8/Rakefile +74 -0
  8. data/test-unit-3.7.8/bin/test-unit +5 -0
  9. data/test-unit-3.7.8/doc/text/getting-started.md +120 -0
  10. data/test-unit-3.7.8/doc/text/how-to.md +90 -0
  11. data/test-unit-3.7.8/doc/text/news.md +2070 -0
  12. data/test-unit-3.7.8/lib/test/unit/assertion-failed-error.rb +60 -0
  13. data/test-unit-3.7.8/lib/test/unit/assertions.rb +2536 -0
  14. data/test-unit-3.7.8/lib/test/unit/attribute-matcher.rb +26 -0
  15. data/test-unit-3.7.8/lib/test/unit/attribute.rb +228 -0
  16. data/test-unit-3.7.8/lib/test/unit/auto-runner-loader.rb +17 -0
  17. data/test-unit-3.7.8/lib/test/unit/autorunner.rb +654 -0
  18. data/test-unit-3.7.8/lib/test/unit/code-snippet-fetcher.rb +58 -0
  19. data/test-unit-3.7.8/lib/test/unit/collector/descendant.rb +20 -0
  20. data/test-unit-3.7.8/lib/test/unit/collector/dir.rb +110 -0
  21. data/test-unit-3.7.8/lib/test/unit/collector/load.rb +201 -0
  22. data/test-unit-3.7.8/lib/test/unit/collector/objectspace.rb +35 -0
  23. data/test-unit-3.7.8/lib/test/unit/collector/xml.rb +249 -0
  24. data/test-unit-3.7.8/lib/test/unit/collector.rb +104 -0
  25. data/test-unit-3.7.8/lib/test/unit/color-scheme.rb +225 -0
  26. data/test-unit-3.7.8/lib/test/unit/color.rb +134 -0
  27. data/test-unit-3.7.8/lib/test/unit/data-sets.rb +127 -0
  28. data/test-unit-3.7.8/lib/test/unit/data.rb +371 -0
  29. data/test-unit-3.7.8/lib/test/unit/diff.rb +745 -0
  30. data/test-unit-3.7.8/lib/test/unit/error.rb +158 -0
  31. data/test-unit-3.7.8/lib/test/unit/exception-handler.rb +82 -0
  32. data/test-unit-3.7.8/lib/test/unit/failure.rb +169 -0
  33. data/test-unit-3.7.8/lib/test/unit/fault-location-detector.rb +104 -0
  34. data/test-unit-3.7.8/lib/test/unit/fixture.rb +304 -0
  35. data/test-unit-3.7.8/lib/test/unit/notification.rb +138 -0
  36. data/test-unit-3.7.8/lib/test/unit/omission.rb +198 -0
  37. data/test-unit-3.7.8/lib/test/unit/pending.rb +155 -0
  38. data/test-unit-3.7.8/lib/test/unit/priority.rb +194 -0
  39. data/test-unit-3.7.8/lib/test/unit/process-test-result.rb +55 -0
  40. data/test-unit-3.7.8/lib/test/unit/process-worker.rb +87 -0
  41. data/test-unit-3.7.8/lib/test/unit/runner/console.rb +86 -0
  42. data/test-unit-3.7.8/lib/test/unit/runner/emacs.rb +8 -0
  43. data/test-unit-3.7.8/lib/test/unit/runner/xml.rb +15 -0
  44. data/test-unit-3.7.8/lib/test/unit/sub-test-result.rb +59 -0
  45. data/test-unit-3.7.8/lib/test/unit/test-process-run-context.rb +21 -0
  46. data/test-unit-3.7.8/lib/test/unit/test-run-context.rb +16 -0
  47. data/test-unit-3.7.8/lib/test/unit/test-suite-creator.rb +103 -0
  48. data/test-unit-3.7.8/lib/test/unit/test-suite-process-runner.rb +205 -0
  49. data/test-unit-3.7.8/lib/test/unit/test-suite-runner.rb +132 -0
  50. data/test-unit-3.7.8/lib/test/unit/test-suite-thread-runner.rb +96 -0
  51. data/test-unit-3.7.8/lib/test/unit/test-thread-run-context.rb +23 -0
  52. data/test-unit-3.7.8/lib/test/unit/testcase.rb +1058 -0
  53. data/test-unit-3.7.8/lib/test/unit/testresult.rb +132 -0
  54. data/test-unit-3.7.8/lib/test/unit/testsuite.rb +133 -0
  55. data/test-unit-3.7.8/lib/test/unit/ui/console/outputlevel.rb +15 -0
  56. data/test-unit-3.7.8/lib/test/unit/ui/console/testrunner.rb +891 -0
  57. data/test-unit-3.7.8/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  58. data/test-unit-3.7.8/lib/test/unit/ui/testrunner.rb +53 -0
  59. data/test-unit-3.7.8/lib/test/unit/ui/testrunnermediator.rb +131 -0
  60. data/test-unit-3.7.8/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  61. data/test-unit-3.7.8/lib/test/unit/ui/xml/testrunner.rb +225 -0
  62. data/test-unit-3.7.8/lib/test/unit/util/backtracefilter.rb +65 -0
  63. data/test-unit-3.7.8/lib/test/unit/util/memory-usage.rb +47 -0
  64. data/test-unit-3.7.8/lib/test/unit/util/method-owner-finder.rb +28 -0
  65. data/test-unit-3.7.8/lib/test/unit/util/observable.rb +86 -0
  66. data/test-unit-3.7.8/lib/test/unit/util/output.rb +32 -0
  67. data/test-unit-3.7.8/lib/test/unit/util/procwrapper.rb +48 -0
  68. data/test-unit-3.7.8/lib/test/unit/version.rb +5 -0
  69. data/test-unit-3.7.8/lib/test/unit/warning.rb +3 -0
  70. data/test-unit-3.7.8/lib/test/unit/worker-context.rb +20 -0
  71. data/test-unit-3.7.8/lib/test/unit.rb +521 -0
  72. data/test-unit-3.7.8/lib/test-unit.rb +19 -0
  73. data/test-unit-3.7.8/sample/adder.rb +13 -0
  74. data/test-unit-3.7.8/sample/subtracter.rb +12 -0
  75. data/test-unit-3.7.8/sample/test_adder.rb +20 -0
  76. data/test-unit-3.7.8/sample/test_subtracter.rb +20 -0
  77. data/test-unit-3.7.8/sample/test_user.rb +23 -0
  78. metadata +117 -0
@@ -0,0 +1,120 @@
1
+ ## 1. First step of the `test-unit`
2
+
3
+ Let's getting start `test-unit`.
4
+
5
+ This document creates an example gem package called `sample` with the `test-unit` testing framework.
6
+
7
+ ## 2. Install bundler and test-unit.
8
+
9
+ * First, install the `bundler` gem for generating gem template.
10
+ * Second, install the `test-unit` itself.
11
+
12
+ ~~~
13
+ !!!plain
14
+ gem install bundler
15
+ gem install test-unit
16
+ ~~~
17
+
18
+ The `gem list` command output installed packages.
19
+ You will find the following lines.
20
+
21
+ ~~~
22
+ !!!plain
23
+ gem list
24
+ ...
25
+ bundler (2.6.3, default: 2.6.2)
26
+ ...
27
+ test-unit (3.6.8, 3.6.7)
28
+ ~~~
29
+
30
+ ## 3. Create gem template.
31
+
32
+ Next, create a gem template using `bundler` command.
33
+ This command generates package skeleton with a testing framework.
34
+
35
+ The `bundle gem -t test-unit sample` command will generate a gem template with the `test-unit` testing framework.
36
+
37
+ ## 4. Execute test.
38
+
39
+ The `rake test` command execute test scenarios in the `test` directory.
40
+ Now it tries to two tests. One will success the other one fails.
41
+
42
+ ~~~
43
+ !!!plain
44
+ $ rake test
45
+ Loaded suite /path/to/ruby/lib/ruby/gems/3.4.0/gems/rake-13.2.1/lib/rake/rake_test_loader
46
+ Started
47
+ F
48
+ ================================================================================
49
+ Failure: test: something useful(SampleTest)
50
+ /path/to/sample/test/sample_test.rb:13:in 'block in <class:SampleTest>'
51
+ 10: end
52
+ 11:
53
+ 12: test "something useful" do
54
+ => 13: assert_equal("expected", "actual")
55
+ 14: end
56
+ 15: end
57
+ <"expected"> expected but was
58
+ <"actual">
59
+
60
+ diff:
61
+ ? expected
62
+ ? a ual
63
+ ? ???? ??
64
+ ================================================================================
65
+ Finished in 0.013737 seconds.
66
+ --------------------------------------------------------------------------------
67
+ 2 tests, 2 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
68
+ 50% passed
69
+ --------------------------------------------------------------------------------
70
+ 145.59 tests/s, 145.59 assertions/s
71
+ rake aborted!
72
+ Command failed with status (1)
73
+
74
+ Tasks: TOP => test
75
+ (See full trace by running task with --trace)
76
+ ~~~
77
+
78
+ ## 5. Create original tests.
79
+
80
+ Let's create your original tests with the following rules.
81
+
82
+ * Create a test file in the `test` directory.
83
+ * The file needs suffix `xxx_test.rb`.
84
+ * You can put test file into the subdirectory like `test/sub`.
85
+
86
+ Example directory layout.
87
+
88
+ ~~~
89
+ !!!plain
90
+ test
91
+ |-- sample_test.rb
92
+ |-- sub
93
+ | `-- sample2_test.rb
94
+ `-- test_helper.rb
95
+ ~~~
96
+
97
+ Example test file in the sub directory.
98
+
99
+ ~~~
100
+ !!!ruby
101
+ require 'test_helper'
102
+
103
+ module Sub
104
+ class Sample2Test < Test::Unit::TestCase
105
+ def test_that_it_has_a_version_number
106
+ refute_nil ::Sample::VERSION
107
+ end
108
+
109
+ def test_it_does_something_useful
110
+ assert false
111
+ end
112
+ end
113
+ end
114
+ ~~~
115
+
116
+ ## 6. For more information
117
+
118
+ Let's read the official document.
119
+
120
+ * [test-unit](https://test-unit.github.io/index.html)
@@ -0,0 +1,90 @@
1
+ # How To
2
+
3
+ ## Run all tests
4
+
5
+ To make it easy to run all your tests, you can add a `run.rb` script
6
+ to your `test` directory. A simple example might look like:
7
+
8
+ base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
9
+ lib_dir = File.join(base_dir, "lib")
10
+ test_dir = File.join(base_dir, "test")
11
+
12
+ $LOAD_PATH.unshift(lib_dir)
13
+
14
+ require 'test/unit'
15
+
16
+ exit Test::Unit::AutoRunner.run(true, test_dir)
17
+
18
+ Then it's easy to run tests via the command line with,
19
+
20
+ $ ruby test/run.rb
21
+
22
+ ## Change test runner via the command line
23
+
24
+ The output format can be changed via the command line with
25
+ the `--runner` option. Simply tack it to the end:
26
+
27
+ ruby test/run.rb --runner emacs
28
+
29
+
30
+ ## Configure test-unit per-project
31
+
32
+ Test::Unit reads `~/.test-unit.yml` or `test-unit.yml` in the current working
33
+ directory as Test::Unit's configuration file. It can contain the following
34
+ settings:
35
+
36
+ * color scheme definitions
37
+ * test runner to be used
38
+ * test runner options
39
+ * test collector to be used
40
+
41
+ Except color scheme definitions, all of them can be specified by command
42
+ line option.
43
+
44
+ Here are sample color scheme definitions:
45
+
46
+ color_schemes:
47
+ inverted:
48
+ success:
49
+ name: red
50
+ bold: true
51
+ failure:
52
+ name: green
53
+ bold: true
54
+ other_scheme:
55
+ ...
56
+
57
+ Here are the syntax of color scheme definitions:
58
+
59
+ color_schemes:
60
+ SCHEME_NAME:
61
+ EVENT_NAME:
62
+ name: COLOR_NAME
63
+ intensity: BOOLEAN
64
+ bold: BOOLEAN
65
+ italic: BOOLEAN
66
+ underline: BOOLEAN
67
+ ...
68
+ ...
69
+
70
+ | Definition | Description |
71
+ |-------------|------------------------------|
72
+ | SCHEME_NAME | the name of the color scheme |
73
+ | EVENT_NAME | success, failure, pending, omission, notification, error |
74
+ | COLOR_NAME | black, red, green, yellow, blue, magenta, cyan, white |
75
+ | BOOLEAN | true or false |
76
+
77
+ You can use the above 'inverted' color scheme with the following configuration:
78
+
79
+ runner: console
80
+ console_options:
81
+ color_scheme: inverted
82
+ color_schemes:
83
+ inverted:
84
+ success:
85
+ name: red
86
+ bold: true
87
+ failure:
88
+ name: green
89
+ bold: true
90
+