From patchwork Thu Sep 10 15:57:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 3454 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4BnNp62lm1z3x3k for ; Thu, 10 Sep 2020 15:58:06 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4BnNp473Ljz10Q; Thu, 10 Sep 2020 15:58:04 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4BnNp454cbz30Vt; Thu, 10 Sep 2020 15:58:04 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4BnNp30j37z2yVt; Thu, 10 Sep 2020 15:58:03 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 4BnNp257Sbzxl; Thu, 10 Sep 2020 15:58:02 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1599753482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fOG1zopDf/YZyiP8enrNgo/EbJ/gM51/Fy0MpApPnkQ=; b=nG3ZhCLZ53uZTex7aRo77M+J4FQhvpgF4HDLbdPTyE1qm4vAz0XwBPy1//YK+Id5vkGkdl Rbl+F5GQ4qVPzNDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1599753482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fOG1zopDf/YZyiP8enrNgo/EbJ/gM51/Fy0MpApPnkQ=; b=XDGRRBCgZ/5Z9f0k6Z/QvP4y0V2jhVGl/Kqe6cOsZZIvzn0Rws4cV8g6YLOPeWGMxqdk++ tgjyrMxXeRgf7mn0bTIuO1QVE2os9FFjHezY0EDNMr3ikN/exX66BGYcRjN6hxt8ah5Mz3 yoR/5mD7Mu9cWFLqwHWpIakwATmlziQrGX4PmcjyEb2NG2oLD/LNtqV1kmRDDJ9gtPavSz rZ1ByFBSH1+Kpt4GfnXW6e6Tx3EQ+lBtRPGouaMHYrU/W3OXQehK47arIWNVnYUg2fUBMT k03ej/YPSTWnR3U7deC06QBWZD63QUr+s4OBbyPOtPtb7hjdtv7+GdQOhgvCRg== From: Stefan Schantl To: location@lists.ipfire.org Subject: [PATCH 4/4] perl: Add test for get_continent_code() function. Date: Thu, 10 Sep 2020 17:57:47 +0200 Message-Id: <20200910155747.12553-4-stefan.schantl@ipfire.org> In-Reply-To: <20200910155747.12553-1-stefan.schantl@ipfire.org> References: <20200910155747.12553-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=stefan.schantl@ipfire.org X-BeenThere: location@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: development@lists.ipfire.org Errors-To: location-bounces@lists.ipfire.org Sender: "Location" Signed-off-by: Stefan Schantl --- src/perl/t/Location.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/perl/t/Location.t b/src/perl/t/Location.t index c922a94..e256aec 100644 --- a/src/perl/t/Location.t +++ b/src/perl/t/Location.t @@ -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'");