]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
perl: Add test for get_continent_code() function.
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 10 Sep 2020 15:57:47 +0000 (17:57 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Sep 2020 16:12:10 +0000 (16:12 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/perl/t/Location.t

index c922a94e1dc020451b5d151a4c978543db539866..e256aec950bb2fc378dd21b60d09b957ae6da86f 100644 (file)
@@ -12,7 +12,7 @@ use warnings;
 my $testdb = $ENV{'database'};
 my $keyfile = $ENV{'keyfile'};
 
-use Test::More tests => 11;
+use Test::More tests => 12;
 BEGIN { use_ok('Location') };
 
 #########################
@@ -68,3 +68,6 @@ ok($network_flag_anycast, "Network has Anycast flag.");
 
 my $country_name = &Location::get_country_name($db, "DE");
 ok($country_name eq "Germany", "Test 13 - Got country name: $country_name");
+
+my $continent_code = &Location::get_continent_code($db, "DE");
+ok($continent_code eq "EU", "Test 14 - Got continent code $continent_code for country code 'DE'");