|
4 | 4 | # since there are many use-cases and combinations to take care of.
|
5 | 5 | # We do so below by constructing "task" strings from components we
|
6 | 6 | # know to be a dataset name and some defined (or not) remote spec
|
7 |
| -# and/or snapshot name, and deconstructing it back with the class |
| 7 | +# and/or snapshot name, and de-constructing it back with the class |
8 | 8 | # method.
|
9 | 9 | #
|
10 | 10 | # Copyright (C) 2024 by Jim Klimov <[email protected]>
|
@@ -135,9 +135,9 @@ for my $r (qw(undef hostname username@hostname)) {
|
135 | 135 |
|
136 | 136 | # See big comment above:
|
137 | 137 | if ($task eq 'username@hostname:poolrootfs') {
|
138 |
| - isnt (defined ($remote), 1, "remote should BOGUSLY be not defined after parsing for this exceptional test case"); |
139 |
| - is (($dataSet eq "username"), 1, "dataSet has expected BOGUS value after parsing for this exceptional test case"); |
140 |
| - is (($snapshot eq "hostname:poolrootfs"), 1, "snapshot has expected BOGUS value after parsing for this exceptional test case"); |
| 138 | + isnt (defined ($remote), 1, "BOGUS exceptional test case: remote should be not defined after parsing for this exceptional test case"); |
| 139 | + is (($dataSet eq "username"), 1, "BOGUS exceptional test case: dataSet has expected BOGUS value after parsing for this exceptional test case"); |
| 140 | + is (($snapshot eq "hostname:poolrootfs"), 1, "BOGUS exceptional test case: snapshot has expected BOGUS value after parsing for this exceptional test case"); |
141 | 141 | } else {
|
142 | 142 | is (($dataSet eq $d), 1, "dataSet has expected value after parsing");
|
143 | 143 |
|
@@ -181,22 +181,15 @@ for my $r (qw(undef hostname username@hostname)) {
|
181 | 181 | printTaskReportCFG($task, $remote, $dataSet);
|
182 | 182 |
|
183 | 183 | is (defined ($dataSet), 1, "dataSet should always be defined after parsing");
|
| 184 | + is (($dataSet eq $d), 1, "dataSet has expected value after parsing"); |
184 | 185 |
|
185 |
| - # See big comment above: |
186 |
| -# if ($task eq 'username@hostname:poolrootfs') { |
187 |
| -# isnt (defined ($remote), 1, "remote should BOGUSLY be not defined after parsing for this exceptional test case"); |
188 |
| -# is (($dataSet eq "username"), 1, "dataSet has expected BOGUS value after parsing for this exceptional test case"); |
189 |
| -# } else { |
190 |
| - is (($dataSet eq $d), 1, "dataSet has expected value after parsing"); |
191 |
| - |
192 |
| - if ($r ne "undef") { |
193 |
| - is (defined ($remote), 1, "remote should be defined after parsing this test case"); |
194 |
| - is (($remote eq $r), 1, "remote has expected value after parsing"); |
195 |
| - } else { |
196 |
| - isnt (defined ($remote), 1, "remote should not be defined after parsing this test case"); |
197 |
| - } |
| 186 | + if ($r ne "undef") { |
| 187 | + is (defined ($remote), 1, "remote should be defined after parsing this test case"); |
| 188 | + is (($remote eq $r), 1, "remote has expected value after parsing"); |
| 189 | + } else { |
| 190 | + isnt (defined ($remote), 1, "remote should not be defined after parsing this test case"); |
198 | 191 | }
|
199 |
| -# } |
| 192 | + } |
200 | 193 | }
|
201 | 194 |
|
202 | 195 | done_testing;
|
|
0 commit comments