Created
September 22, 2020 18:15
-
-
Save LadyAleena/884980db8380cbe0f85722ade674cfac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!perl | |
| use strict; | |
| use warnings; | |
| use v5.8.8; | |
| use Test::More tests => 18; | |
| BEGIN { | |
| use_ok( 'Date::Month::Number', qw(month_number) ) | |
| or die "Date::Month::Number is not available\n"; | |
| } | |
| diag( "Testing Date::Month::Number $Date::Month::Number::VERSION, Perl $], $^X" ); | |
| # TESTS | |
| my @test_data = <DATA>; | |
| chomp(@test_data); | |
| for my $test (@test_data) { | |
| my ($month, $number) = split(/, ?/, $test); | |
| is( | |
| scalar(Date::Month::Number::month_number($month)), | |
| $number, | |
| "testing that $month returns $number", | |
| ); | |
| } | |
| done_testing(); | |
| __DATA__ | |
| January, 1 | |
| Feb, 2 | |
| marts, 3 | |
| april, 4 | |
| toukokuu, 5 | |
| juin, 6 | |
| Juli, 7 | |
| Avghustos, 8 | |
| Szeptember, 9 | |
| ottobre, 10 | |
| november, 11 | |
| Grudzien, 12 | |
| janeiro, 1 | |
| Februarie, 2 | |
| Март, 3 | |
| abril, 4 | |
| maj, 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment