Debian Codegraph @

upstream/opensuse-tumbleweed/man3/App::Prove::State.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "App::Prove::State 3pm"
61 .TH App::Prove::State 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 App::Prove::State \- State storage for the "prove" command.
68 .SH VERSION
69 .IX Header "VERSION"
70 Version 3.50
71 .SH DESCRIPTION
72 .IX Header "DESCRIPTION"
73 The \f(CW\*(C`prove\*(C'\fR command supports a \f(CW\*(C`\-\-state\*(C'\fR option that instructs it to
74 store persistent state across runs. This module implements that state
75 and the operations that may be performed on it.
76 .SH SYNOPSIS
77 .IX Header "SYNOPSIS"
78 .Vb 2
79 \& # Re\-run failed tests
80 \& $ prove \-\-state=failed,save \-rbv
81 .Ve
82 .SH METHODS
83 .IX Header "METHODS"
84 .SS "Class Methods"
85 .IX Subsection "Class Methods"
86 \fR\f(CI\*(C`new\*(C'\fR\fI\fR
87 .IX Subsection "new"
88 .PP
89 Accepts a hashref with the following key/value pairs:
90 .IP \(bu 4
91 \&\f(CW\*(C`store\*(C'\fR
92 .Sp
93 The filename of the data store holding the data that App::Prove::State reads.
94 .IP \(bu 4
95 \&\f(CW\*(C`extensions\*(C'\fR (optional)
96 .Sp
97 The test name extensions. Defaults to \f(CW\*(C`.t\*(C'\fR.
98 .IP \(bu 4
99 \&\f(CW\*(C`result_class\*(C'\fR (optional)
100 .Sp
101 The name of the \f(CW\*(C`result_class\*(C'\fR. Defaults to \f(CW\*(C`App::Prove::State::Result\*(C'\fR.
102 .ie n .SS """result_class"""
103 .el .SS \f(CWresult_class\fP
104 .IX Subsection "result_class"
105 Getter/setter for the name of the class used for tracking test results. This
106 class should either subclass from \f(CW\*(C`App::Prove::State::Result\*(C'\fR or provide an
107 identical interface.
108 .ie n .SS """extensions"""
109 .el .SS \f(CWextensions\fP
110 .IX Subsection "extensions"
111 Get or set the list of extensions that files must have in order to be
112 considered tests. Defaults to [\*(Aq.t\*(Aq].
113 .ie n .SS """results"""
114 .el .SS \f(CWresults\fP
115 .IX Subsection "results"
116 Get the results of the last test run. Returns a \f(CWresult_class()\fR instance.
117 .ie n .SS """commit"""
118 .el .SS \f(CWcommit\fP
119 .IX Subsection "commit"
120 Save the test results. Should be called after all tests have run.
121 .SS "Instance Methods"
122 .IX Subsection "Instance Methods"
123 \fR\f(CI\*(C`apply_switch\*(C'\fR\fI\fR
124 .IX Subsection "apply_switch"
125 .PP
126 .Vb 1
127 \& $self\->apply_switch(\*(Aqfailed,save\*(Aq);
128 .Ve
129 .PP
130 Apply a list of switch options to the state, updating the internal
131 object state as a result. Nothing is returned.
132 .PP
133 Diagnostics:
134 \- "Illegal state option: \f(CW%s\fR"
135 .ie n .IP """last""" 4
136 .el .IP \f(CWlast\fR 4
137 .IX Item "last"
138 Run in the same order as last time
139 .ie n .IP """failed""" 4
140 .el .IP \f(CWfailed\fR 4
141 .IX Item "failed"
142 Run only the failed tests from last time
143 .ie n .IP """passed""" 4
144 .el .IP \f(CWpassed\fR 4
145 .IX Item "passed"
146 Run only the passed tests from last time
147 .ie n .IP """all""" 4
148 .el .IP \f(CWall\fR 4
149 .IX Item "all"
150 Run all tests in normal order
151 .ie n .IP """hot""" 4
152 .el .IP \f(CWhot\fR 4
153 .IX Item "hot"
154 Run the tests that most recently failed first
155 .ie n .IP """todo""" 4
156 .el .IP \f(CWtodo\fR 4
157 .IX Item "todo"
158 Run the tests ordered by number of todos.
159 .ie n .IP """slow""" 4
160 .el .IP \f(CWslow\fR 4
161 .IX Item "slow"
162 Run the tests in slowest to fastest order.
163 .ie n .IP """fast""" 4
164 .el .IP \f(CWfast\fR 4
165 .IX Item "fast"
166 Run test tests in fastest to slowest order.
167 .ie n .IP """new""" 4
168 .el .IP \f(CWnew\fR 4
169 .IX Item "new"
170 Run the tests in newest to oldest order.
171 .ie n .IP """old""" 4
172 .el .IP \f(CWold\fR 4
173 .IX Item "old"
174 Run the tests in oldest to newest order.
175 .ie n .IP """save""" 4
176 .el .IP \f(CWsave\fR 4
177 .IX Item "save"
178 Save the state on exit.
179 .PP
180 \fR\f(CI\*(C`get_tests\*(C'\fR\fI\fR
181 .IX Subsection "get_tests"
182 .PP
183 Given a list of args get the names of tests that should run
184 .PP
185 \fR\f(CI\*(C`observe_test\*(C'\fR\fI\fR
186 .IX Subsection "observe_test"
187 .PP
188 Store the results of a test.
189 .PP
190 \fR\f(CI\*(C`save\*(C'\fR\fI\fR
191 .IX Subsection "save"
192 .PP
193 Write the state to a file.
194 .PP
195 \fR\f(CI\*(C`load\*(C'\fR\fI\fR
196 .IX Subsection "load"
197 .PP
198 Load the state from a file