blackstart 0.2.0 → 0.9.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.
data/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/README ADDED
@@ -0,0 +1,202 @@
1
+ Blackstart
2
+
3
+ Blackstart is a small, subdued library for automated testing in Ruby. It
4
+ doesn't depend on anything beyond the Ruby platform and doesn't modify the
5
+ environment beyond its conventional namespace. The program that tests it is
6
+ written in primitive Ruby, with no other testing library, so it can be verified
7
+ straightforwardly.
8
+
9
+ The blackstart is a small, subdued bird that eats bugs. A black start is when
10
+ an inactive power plant restarts by means of an independent power source rather
11
+ than the electrical grid.
12
+
13
+ Here's an example of a test program that uses Blackstart:
14
+
15
+ require "blackstart"
16
+
17
+ exit Blackstart.run [
18
+ lambda {
19
+ unless "Hello, World!" == ["He", "", "o, Wor", "d!"].join("l")
20
+ raise "join did not work as expected"
21
+ end
22
+ },
23
+
24
+ lambda {
25
+ unless "sample" == "simple".gsub(/i/, "a")
26
+ raise "gsub did not work as expected"
27
+ end
28
+ }
29
+ ]
30
+
31
+ Blackstart.run runs a sequence of tests and reports information about any that
32
+ fail. It returns false if there were failures, true otherwise.
33
+
34
+ An array of procs is an easy way to represent a sequence of tests. In general,
35
+ the sequence can be any object that responds to an each message in the
36
+ conventional way and each test object in the sequence can be any object that
37
+ (1) is a proc or converts to one via to_proc and (2) converts to a string via
38
+ to_s.
39
+
40
+ Each test is run by converting the test object to a proc if necessary and then
41
+ calling it in the context of a new instance of Blackstart::Scratchpad; if and
42
+ only if this raises an error (any exception that's a kind of StandardError),
43
+ Blackstart.run interprets it as a failed test.
44
+
45
+ After each test failure, Blackstart.run sends a puts message to the output
46
+ stream -- its second parameter, which is $stdout by default -- with seven
47
+ positional arguments: (1) "FAILED TEST:", (2) the test object converted to a
48
+ string, (3) "...ERROR:", (4) the error's class converted to a string, (5) the
49
+ error converted to a string, (6) the error's backtrace array or an empty array
50
+ if it has no backtrace, and (7) an empty string. With the standard output
51
+ stream, a failure produces output resembling this:
52
+
53
+ FAILED TEST:
54
+ #<Proc:0x0000000fe2e010@test.rb:4 (lambda)>
55
+ ...ERROR:
56
+ RuntimeError
57
+ join did not work as expected
58
+ test.rb:6:in `block in <main>'
59
+ [more backtrace lines]
60
+ [blank line]
61
+
62
+ If a test raises a non-StandardError exception, Blackstart.run interprets it as
63
+ a system-level event or fundamental problem: it immediately raises the
64
+ exception and doesn't run any more tests.
65
+
66
+ The library provides little beyond this, but it supports more sophisticated
67
+ uses. Some examples follow.
68
+
69
+
70
+ - Exiting with the appropriate status
71
+
72
+ You may want your test program to exit with a successful status only if there
73
+ were no failures, perhaps so it can work as part of a testing script. You can
74
+ do this by using the object returned by Blackstart.run as the argument to
75
+ Kernel#exit. Blackstart.run returns false if there were failures, true
76
+ otherwise.
77
+
78
+
79
+ - Defining helpers
80
+
81
+ You may want to enable all your tests to assert something, generate test data,
82
+ or perform some other task by sending a message. You could implement this
83
+ statelessly in a singleton object or all instances of Object, for example, but
84
+ there's another option that may be more convenient. When Blackstart.run calls a
85
+ test proc, it sets the self object to a new instance of Blackstart::Scratchpad.
86
+ You can define instance methods in that class. For example:
87
+
88
+ class Blackstart::Scratchpad
89
+ def assert boolean
90
+ raise "assertion failed" unless boolean
91
+ end
92
+
93
+ def make_products
94
+ @cabbage = { :description => "head of cabbage", :price => 125 }
95
+ @orange = { :description => "Cara Cara navel orange", :price => 100 }
96
+ nil
97
+ end
98
+ end
99
+
100
+ All your test procs can use them by sending messages to self. These methods,
101
+ like the test proc itself, can see and modify instance variables and other
102
+ elements of the scratchpad's state. The scratchpad is disposable:
103
+ Blackstart.run discards it after the test is complete.
104
+
105
+
106
+ - Running code before and after each test
107
+
108
+ You may want to run code before and after each test -- for example, to create
109
+ objects needed in tests or clean up resources without requiring every test to
110
+ do these explicitly. You can do this by defining a custom
111
+ Blackstart::Scratchpad#instance_exec. For example:
112
+
113
+ class Blackstart::Scratchpad
114
+ def instance_exec(*)
115
+ puts "before test"
116
+ @variable = "example"
117
+ super
118
+ ensure
119
+ puts "after test"
120
+ end
121
+ end
122
+
123
+ Use this technique with care because the test proc could send instance_exec
124
+ messages to self.
125
+
126
+
127
+ - Building a test collection in stages
128
+
129
+ You may want to build a test collection in stages rather than all at once. This
130
+ can be done straightforwardly:
131
+
132
+ require "blackstart"
133
+
134
+ TESTS = []
135
+
136
+ TESTS.concat [
137
+ lambda {
138
+ unless "Hello, World!" == ["He", "", "o, Wor", "d!"].join("l")
139
+ raise "join did not work as expected"
140
+ end
141
+ }
142
+ ]
143
+
144
+ TESTS.concat [
145
+ lambda {
146
+ unless "sample" == "simple".gsub(/i/, "a")
147
+ raise "gsub did not work as expected"
148
+ end
149
+ }
150
+ ]
151
+
152
+ exit Blackstart.run TESTS
153
+
154
+ This pattern is useful if you want to define your tests in multiple files: you
155
+ create a collection with an agreed-upon name, load multiple files, each of
156
+ which adds test objects to that collection, and then run all the tests.
157
+
158
+
159
+ - Running tests in random order
160
+
161
+ To check if you have any tests that depend on other tests having run, or not
162
+ having run, earlier, you may want to run your tests in random order.
163
+ Blackstart.run runs a sequence of tests in order, but you can pass it a
164
+ randomly-ordered sequence. Array#shuffle may be helpful for this. If you use
165
+ Array#shuffle or something similar, you may also want to print the random seed
166
+ just before the tests are shuffled so you can rerun your tests in the same
167
+ order by setting the random seed.
168
+
169
+
170
+ - Reporting detailed test descriptions
171
+
172
+ After a test fails, Blackstart.run writes a string describing the test to the
173
+ output stream. It gets this string by sending a to_s message to the test
174
+ object. When the test object is an instance of Proc, the returned string
175
+ typically includes the file path and line number where it was defined: helpful,
176
+ but it won't be immediately clear what was being tested.
177
+
178
+ You can improve this by designing your own test objects. Blackstart.run does
179
+ not strictly need a sequence of procs; it also works with a sequence of objects
180
+ that convert to procs in response to to_proc messages. Your custom test objects
181
+ can respond to to_s with detailed descriptions instead of mere file paths and
182
+ line numbers.
183
+
184
+
185
+ - Handling failures differently
186
+
187
+ Blackstart.run handles each failure by sending a puts message to the output
188
+ stream, one of its parameters, with failure information. By default, the output
189
+ stream is $stdout, so the default behavior is to print unadorned failure
190
+ information to standard output. But you can specify any object as the output
191
+ stream -- even if it's not really a stream -- allowing you to handle failure
192
+ information however you want.
193
+
194
+
195
+ - Running multiple tests at the same time
196
+
197
+ Although Blackstart.run is written in a sequential style, it can run multiple
198
+ tests at the same time. Blackstart.run sends an each message with a block to
199
+ your test collection, expecting the block to be executed once for each test;
200
+ your test collection can execute the block in multiple threads concurrently.
201
+ For your program to work well in this mode, your tests and the output stream
202
+ must work correctly when used from multiple threads.
data/lib/blackstart.rb CHANGED
@@ -1,92 +1,66 @@
1
1
  ##
2
- # This module provides facilities for defining and running automated tests.
2
+ # This module provides facilities for running automated tests.
3
3
 
4
4
  module Blackstart
5
5
 
6
6
  ##
7
- # Calls the block and returns a string describing the error raised, if any.
8
- #
9
- # In detail: This method sends call with no arguments to the object
10
- # representing the block. If that raises an error -- that is, an exception
11
- # whose class is StandardError or a descendent of StandardError -- this
12
- # method creates a string describing that error and returns it; the
13
- # description includes the error's class, message, and backtrace (if any). If
14
- # sending the message raises any other exception, this method raises that
15
- # exception. If sending the message does not raise an exception, this method
16
- # returns nil.
7
+ # A class for tests' disposable helper objects.
17
8
 
18
- def self.vet &prc
19
- prc.call
20
- nil
21
- rescue ::StandardError
22
- # Like IO#puts, separate lines with a line feed character rather than $\.
23
- ["#{$!.class}: #{$!.message}"].concat($!.backtrace || []).join "\n"
9
+ class Scratchpad
24
10
  end
25
11
 
26
12
  ##
27
- # Allows the block to add procs to a collection, which it returns.
28
- #
29
- # In detail: This method sends call with one positional argument, an adder
30
- # object, to the object representing the block, director. This block can send
31
- # call messages to the adder to add objects representing the respective
32
- # blocks to the collection, sink. With each sending of call, the object to be
33
- # added will be either a proc (if call is sent with a block) or nil (if call
34
- # is sent without a block). If any non-block arguments are sent with the call
35
- # message, an exception is raised. To add the object, the adder sends a <<
36
- # message to sink with the object as the positional argument and no other
37
- # arguments. The adder returns nil in response to a call message if it
38
- # returns at all. This method returns sink.
39
- #
40
- # By default, sink is a new empty array.
41
-
42
- def self.add sink = [], &director
43
- director.call ::Kernel.lambda { |&prc|
44
- sink << prc
45
- nil
46
- }
47
- sink
48
- end
49
-
50
- ##
51
- # A class for the contexts (the self objects) of tests.
52
-
53
- class Context
54
- end
55
-
56
- ##
57
- # Runs the tests, writes any failure information to the output stream, and
13
+ # Runs tests, writes any failure information to the output stream, and
58
14
  # returns a boolean indicating whether there were no failures.
59
15
  #
60
- # In detail: This method expects the sequence of test objects, source, to
61
- # respond to an each message by yielding successive test objects to its
62
- # block. Each test is run by converting the test object to a proc and calling
63
- # it in the context of a new instance of Blackstart::Context. A failure is
64
- # when the test raises an error (that is, an exception whose class is
65
- # StandardError or a descendent of StandardError). After a failure, this
66
- # method sends a puts message to the output stream, ostream, with these
67
- # arguments (positional, in order): a string "FAILED TEST:", the test object
68
- # converted to a string via to_s, a string "...ERROR:", a string describing
69
- # the error, and an empty string. If a test raises any other exception, this
70
- # method immediately raises that exception. After it has run all the tests
71
- # and handled any failures, this method returns false if there were failures
72
- # or true otherwise.
16
+ # In detail: This method sends an each message with a block to the sequence
17
+ # of test objects, source, expecting it to yield to the block once for each
18
+ # test object in the sequence with that test object as the first argument.
19
+ # Each test involves creating a new scratchpad -- an instance of
20
+ # Blackstart::Scratchpad -- and sending an instance_exec message to it with
21
+ # the test object as the block, which converts the test object to a proc via
22
+ # to_proc if it's not already a proc. The resulting proc is called with no
23
+ # arguments and no block; the self object is set to the scratchpad. A failure
24
+ # is when the test (which includes any initial conversion to a proc) raises
25
+ # an error: an exception whose class is StandardError or a descendant of
26
+ # StandardError. After a failure, this method sends a puts message to the
27
+ # output stream, ostream, with no block and these arguments (positional, in
28
+ # order): a string "FAILED TEST:"; the test object converted to a string via
29
+ # to_s; a string "...ERROR:"; the error's class converted to a string via
30
+ # to_s; the error converted to a string via to_s; the error's backtrace or an
31
+ # empty array if the error signals that it has no backtrace; and an empty
32
+ # string. It ignores the object returned by the output stream and continues
33
+ # running tests. If a test raises a non-error exception, this method
34
+ # immediately raises that exception. If a test does not raise an exception,
35
+ # this method interprets it as a successful test; it ignores the object
36
+ # returned by the test and continues running tests. Whether the test fails
37
+ # or succeeds, the block sent with the each message returns nil. After it
38
+ # has run all the tests and handled any failures, this method returns false
39
+ # if there were failures, true otherwise. This method immediately raises any
40
+ # exception raised outside of a test.
73
41
  #
74
42
  # By default, ostream is $stdout.
75
43
 
76
44
  def self.run source, ostream = $stdout
77
- success = true
78
- for tst in source
79
- # Convert to a proc and create a context outside the vet block so that
80
- # this method will raise any exception that results instead of
81
- # potentially treating it as a test failure.
82
- prc = ::Proc.new(&tst)
83
- context = Context.new
84
- if err_desc = vet { context.instance_exec(&prc) }
85
- success = false
86
- ostream.puts "FAILED TEST:", tst.to_s, "...ERROR:", err_desc.to_s, ""
45
+ no_failures = true
46
+ source.each do |tst|
47
+ # Create the scratchpad outside the begin block so that this method will
48
+ # raise any exception that results instead of potentially treating it as
49
+ # a test failure.
50
+ scratchpad = ::Blackstart::Scratchpad.new
51
+ begin
52
+ scratchpad.instance_exec(&tst)
53
+ rescue ::StandardError => e
54
+ no_failures = false
55
+ ostream.puts "FAILED TEST:", tst.to_s, "...ERROR:", e.class.to_s,
56
+ e.to_s, e.backtrace || [], ""
87
57
  end
58
+ # Always return nil so that an each that's been modified to be sensitive
59
+ # to the block's return value can't behave differently based on the
60
+ # objects returned by the tests and the output stream.
61
+ nil
88
62
  end
89
- success
63
+ no_failures
90
64
  end
91
65
 
92
66
  end
@@ -0,0 +1,17 @@
1
+ module Blackstart
2
+ class Scratchpad
3
+ end
4
+
5
+ type test_proc = ^() [self: Scratchpad] -> void
6
+ interface _ConvertsToTestProc
7
+ def to_proc: () -> test_proc
8
+ end
9
+ type test = (test_proc | _ConvertsToTestProc) & ::_ToS
10
+
11
+ interface _OutputStream
12
+ def puts: (::String, ::String, ::String, ::String, ::String,
13
+ ::Array[::String], ::String) -> void
14
+ end
15
+
16
+ def self.run: (::_Each[test], ?_OutputStream) -> bool
17
+ end