From: Steve Hancock Date: Sun, 6 Aug 2023 01:08:54 +0000 (-0700) Subject: add test case for file with just one character, '0' X-Git-Tag: 20230701.03~29 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1faa90225e178dba402902e59ede3b9f6b498cfa;p=perltidy.git add test case for file with just one character, '0' --- diff --git a/t/zero.t b/t/zero.t new file mode 100644 index 00000000..b9d50d60 --- /dev/null +++ b/t/zero.t @@ -0,0 +1,25 @@ +use strict; +use Test; +use Carp; +BEGIN {plan tests => 1} +use Perl::Tidy; + +#----------------------------------------------------------- +# test formatting a single character '0' with no line ending +#----------------------------------------------------------- +my $source = '0'; +my $perltidyrc = <<'EOM'; +-noadd-terminal-newline +EOM + +my $output; + +Perl::Tidy::perltidy( + source => \$source, + destination => \$output, + perltidyrc => \$perltidyrc, + argv => '', +); + +my $expected_output='0'; +ok($output, $expected_output);