Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 32 lines (23 sloc) 0.829 kB
ca97108 [mowyw]
moritz authored
1 use Test::More tests => 6;
2 use strict;
3 use warnings;
4
c16fb9f @moritz Renamed Mowyw to App::Mowyw
authored
5 BEGIN { use_ok('App::Mowyw', 'parse_str'); };
ca97108 [mowyw]
moritz authored
6
7 my %meta = ( VARS => {}, FILES => [qw(t/menu.t)]);
c16fb9f @moritz Renamed Mowyw to App::Mowyw
authored
8 $App::Mowyw::config{default}{include} = 't/';
9 $App::Mowyw::config{default}{menu} = 't/menu-';
10 $App::Mowyw::config{default}{postfix} = '';
ca97108 [mowyw]
moritz authored
11
12
13 is parse_str('[% menu sample %]', \%meta),
14 " i1 i2 \n",
15 'Menu without selected item';
16
17 is parse_str('[% menu sample i1 %]', \%meta),
18 " i1b i2 \n",
19 'Menu with first item selected';
20
21 is parse_str('[% menu sample i2 %]', \%meta),
22 " i1 i2b \n",
23 'Menu with second item selected';
24
25 is parse_str('[% menu sample i3 %]', \%meta),
26 " i1 i2 i3i1\n",
27 'Menu with third item selected';
28
29 is parse_str('[% menu sample i3 i3i1 %]', \%meta),
30 " i1 i2 i3i1b\n",
31 'Menu with third item and subitem selected';
Something went wrong with that request. Please try again.