[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Conditionally skip a test
From: |
Gavin D. Smith |
Subject: |
branch master updated: Conditionally skip a test |
Date: |
Thu, 14 Apr 2022 11:17:31 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new c8e014ac44 Conditionally skip a test
c8e014ac44 is described below
commit c8e014ac4482190a3faa9b5667e2cf2e9fd62544
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Thu Apr 14 16:16:52 2022 +0100
Conditionally skip a test
* tp/t/test_utils.pl (test): Check for 'skip' setting in options
and skip test if it is set.
* tp/t/21multitable.t (multitable_figure_space): Skip test
for Perl older than 5.14.
---
ChangeLog | 9 +++++++++
tp/t/21multitable.t | 4 +++-
tp/t/test_utils.pl | 10 ++++++++++
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 0e209b45e1..9f5c718fc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-04-14 Gavin Smith <gavinsmith0123@gmail.com>
+
+ Conditionally skip a test
+
+ * tp/t/test_utils.pl (test): Check for 'skip' setting in options
+ and skip test if it is set.
+ * tp/t/21multitable.t (multitable_figure_space): Skip test
+ for Perl older than 5.14.
+
2022-04-14 Patrice Dumas <pertusus@free.fr>
Improve test results optional output files
diff --git a/tp/t/21multitable.t b/tp/t/21multitable.t
index 59ab782306..c1c0f76e1e 100644
--- a/tp/t/21multitable.t
+++ b/tp/t/21multitable.t
@@ -157,7 +157,9 @@ XXX XXX XXX XXX XXX XXX XXX XXX XX}.
@item '."\x{2007}\x{2007}535".' @tab explanation
@item 49303 @tab explanation
@end multitable
-'],
+',
+{'skip' => ($] < 5.014) ? 'Perl too old: /a regex flag needed' : undef, },
+],
);
my @test_invalid = (
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index ea64137a2c..5b0f400ed1 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -867,6 +867,16 @@ sub test($$)
}
}
+ if ($parser_options->{'skip'}) {
+ SKIP: {
+ skip "$test_name: $parser_options->{'skip'}", 1;
+ ok 1, $test_name;
+ }
+ return 1;
+ } elsif (exists($parser_options->{'skip'})) {
+ delete $parser_options->{'skip'};
+ }
+
my %todos;
if ($parser_options->{'todo'}) {
%todos = %{$parser_options->{'todo'}};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Conditionally skip a test,
Gavin D. Smith <=