File: zero.t

package info (click to toggle)
perltidy 20250105-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,896 kB
  • sloc: perl: 42,462; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 539 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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);