### ----------------------------------------------------
### -- Locale::Dates
### -- Licenses: Artistic-2.0
### -- Authors: Elizabeth Mattijsen
### -- File: t/02-create.rakutest
### ----------------------------------------------------
use Test;
use Locale::Dates;

plan 16;

my %args is Map =
  code => "foo",
  weekdays => <AAAA BBBB CCCC DDDD EEEE FFFF GGGG>,
  months   => <MMMM NNNN OOOO PPPP QQQQ RRRR
               SSSS TTTT UUUU VVVV WWWW XXXX>,
  date-time-representation => "zippie",
  date-representation      => "zip",
  time-representation      => "pie",
  am => "meh",
  pm => "duh",
;

my $ld = Locale::Dates.new(|%args);

is $ld.code, %args<code>,    'is code correct';
is $ld.am,   %args<am>,      'is am correct';
is $ld.pm,   %args<pm>,      'is pm correct';
is $ld.AM,   %args<am>.uc,   'is AM correct';
is $ld.PM,   %args<pm>.uc,   'is PM correct';

is $ld.date-time-representation, %args<date-time-representation>,
  'is date-time-representation correct';
is $ld.date-representation, %args<date-representation>,
  'is date-representation correct';
is $ld.time-representation, %args<time-representation>,
  'is time-representation correct';

is $ld.weekdays[0], 'GGGG', 'is weekday 0 correct';
is $ld.weekdays[1], 'AAAA', 'is weekday 1 correct';
is $ld.abbreviated-weekdays[0], 'GGG', 'is abbrev weekday 0 correct';
is $ld.abbreviated-weekdays[1], 'AAA', 'is abbrev weekday 1 correct';

is $ld.months[0], '?', 'is month 0 correct';
is $ld.months[1], 'MMMM', 'is month 1 correct';
is $ld.abbreviated-months[0], '?',   'is abbrev month 0 correct';
is $ld.abbreviated-months[1], 'MMM', 'is abbrev month 1 correct';

# vim: expandtab shiftwidth=4


