From 34f9a94242b9d6ced48e20ef406167ba381c0a47 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Thu, 24 May 2018 11:37:40 +0200 Subject: [PATCH] Add Perltidy test in xt (related to #319) - Add cpanfile, specifying dependencies for running the xt tests (authors tests, not installation tests) --- cpanfile | 4 ++++ doc/dot.perltidyrc | 2 +- xt/perltidy.t | 10 ++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 cpanfile create mode 100644 xt/perltidy.t diff --git a/cpanfile b/cpanfile new file mode 100644 index 0000000000..166a72401a --- /dev/null +++ b/cpanfile @@ -0,0 +1,4 @@ +on 'develop' => sub { + requires 'Test::Fixme'; + requires 'Test::PerlTidy'; +}; diff --git a/doc/dot.perltidyrc b/doc/dot.perltidyrc index 65512bb501..870f5e7e60 100644 --- a/doc/dot.perltidyrc +++ b/doc/dot.perltidyrc @@ -6,7 +6,7 @@ -cti=0 # No extra indentation for closing brackets -i=4 # Indent level is 4 cols -ci=4 # Continuation indent is 4 cols --l=78 # Max line witdh is 78 cols +-l=78 # Max line width is 78 cols -nolc # Don't outdent long comments (* -olc) -nolq # Don't outdent long quoted strings -nsbl # No opening sub brace on new line (* -sbl) diff --git a/xt/perltidy.t b/xt/perltidy.t new file mode 100644 index 0000000000..96e2e41ce0 --- /dev/null +++ b/xt/perltidy.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::PerlTidy; +use FindBin qw($Bin); + +run_tests( + path => "$Bin/../src/", + perltidyrc => "$Bin/../doc/dot.perltidyrc" +);