File: 800_regressions_030_pherkin_external_libs.t

package info (click to toggle)
libtest-bdd-cucumber-perl 0.87-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 716 kB
  • sloc: perl: 4,493; makefile: 8
file content (27 lines) | stat: -rw-r--r-- 746 bytes parent folder | download | duplicates (5)
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
#!perl

use strict;
use warnings;

use Test::More tests => 5;
use Test::BDD::Cucumber::Harness::Data;
use App::pherkin;

for my $test (
    [ '-l', ['lib'], '-l adds lib' ],
    [ '-b', [ 'blib/lib', 'blib/arch' ], '-b adds blib/lib and blib/arch' ],
    [
        '-l -b',
        [ 'blib/lib', 'blib/arch', 'lib' ],
        '-l -lb adds lib, blib/lib and blib/arch'
    ],
    [ '-I foo -I bar', [ 'foo', 'bar' ], '-I accepts multiple arguments' ],
    [ '-I foo -l -I bar', [ 'lib', 'foo', 'bar' ], '-I and -l work together' ],
  )
{
    my ( $flags, $expected, $name ) = @$test;
    local @INC = ();
    my $p = App::pherkin->new();
    $p->_process_arguments( split( / /, '-o Data ' . $flags ) );
    is_deeply( \@INC, $expected, $name );
}