summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRuss Allbery <rra@cpan.org>2022-01-15 16:28:09 -0800
committerRuss Allbery <rra@cpan.org>2022-01-15 16:28:09 -0800
commitf7c5635fda62fea564c3c30f2393ab3e74951f31 (patch)
tree1b45dc6e0e9a1d12e5ec64b8273c9a1a26b17794 /t
parente7e6c9a95fb4cd68110ecd51a8ea2b5accc17e78 (diff)
Update Perl formatting rules
Add some more suggestions from Julien ÉLIE, primarily -nlop to be less aggressive about aligning logical expressions.
Diffstat (limited to 't')
-rwxr-xr-xt/cli/errors.t2
-rw-r--r--t/data/perltidyrc5
-rwxr-xr-xt/spin/sitemap.t2
3 files changed, 5 insertions, 4 deletions
diff --git a/t/cli/errors.t b/t/cli/errors.t
index 64df6c3..c311d14 100755
--- a/t/cli/errors.t
+++ b/t/cli/errors.t
@@ -66,7 +66,7 @@ eval { $docknot->run('generate', '-m', '/nonexistent', 'readme') };
is_error(
$@,
(
- 'generate: can\'t open \'/nonexistent\' for input:'
+ 'generate: can\'t open \'/nonexistent\' for input:'
. ' No such file or directory'
),
);
diff --git a/t/data/perltidyrc b/t/data/perltidyrc
index 431c311..dc3a2f7 100644
--- a/t/data/perltidyrc
+++ b/t/data/perltidyrc
@@ -6,7 +6,7 @@
# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2021 Russ Allbery <eagle@eyrie.org>
+# Copyright 2021-2022 Russ Allbery <eagle@eyrie.org>
# Copyright 2012-2013
# The Board of Trustees of the Leland Stanford Junior University
#
@@ -22,8 +22,9 @@
-boc # do not re-break lists, since perltidy is awful at this
-ce # cuddle braces around else
-l=79 # usually use 78, but don't want 79-long lines reformatted
+-nlop # disable vertical alignment of logical and ternary expressions
-pt=2 # don't add extra whitespace around parentheses
-sbt=2 # ...or square brackets
--sfs # no space before semicolon in for (not that I use this form)
+-nsfs # no space before semicolon in for (not that I use this form)
-nvc # disable vertical alignment of = and similar symbols
-xci # improve indentation of nested structures
diff --git a/t/spin/sitemap.t b/t/spin/sitemap.t
index 59f8fe3..b51d675 100755
--- a/t/spin/sitemap.t
+++ b/t/spin/sitemap.t
@@ -40,7 +40,7 @@ is_deeply(\@navbar, [], 'navbar for unknown page');
# exercised by the test of spinning a tree of files.
@links = $sitemap->links('/faqs/soundness-inn.html');
my @expected = (
- q{ <link rel="next" href="soundness-cnews.html"}
+ q{ <link rel="next" href="soundness-cnews.html"}
. qq{ title="Soundness for C News" />\n},
qq{ <link rel="up" href="./" title="FAQs and Documentation" />\n},
qq{ <link rel="top" href="../" />\n},