File: 00_basic.pl

package info (click to toggle)
chordpro 6.070%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,124 kB
  • sloc: perl: 32,481; javascript: 28,043; xml: 55; makefile: 52; sh: 44
file content (48 lines) | stat: -rw-r--r-- 787 bytes parent folder | download | duplicates (2)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! perl

use strict;
use warnings;
use utf8;

use ChordPro::Testing;

mkdir("out") unless -d "out";

my $test;

my ( $num, $basic, $backend ) = @::params;
my $base = "${num}_${backend}";

my @argv = ( "--no-default-configs", "$basic.cho" );

# Some basic tests.

my $out = "${base}_" . ++$test . ".$backend";

@ARGV = ( @argv, "--no-single-space", "--output=out/$out" );

::run();

ok( !differ( "out/$out", "ref/$out" ) );

# Single space.

$out = "${base}_" . ++$test . ".$backend";

@ARGV = ( @argv, "--single-space", "--output=out/$out" );

::run();

ok( !differ( "out/$out", "ref/$out" ) );

# Lyrics only.

$out = "${base}_" . ++$test . ".$backend";

@ARGV = ( @argv, "--lyrics-only", "--output=out/$out" );

::run();

ok( !differ( "out/$out", "ref/$out" ) );

done_testing($test);