From 71f764114940e6c4fcea6be5519084c7a91c45ce Mon Sep 17 00:00:00 2001 From: Frank Breedijk Date: Mon, 25 Jul 2016 12:25:03 +0200 Subject: [PATCH] Unit tests --- .gitignore | 1 + t/20_client_sim-data_up_to_date.t | 11 +++++++++++ t/{02_client_sims_old.t => 21_client_sims_old.t} | 0 ...s_intermediate.t => 22_client_sims_intermediate.t} | 0 ...4_client_sims_modern.t => 23_client_sims_modern.t} | 0 ..._sims_testssl.sh.t => 24_client_sims_testssl.sh.t} | 0 ...ient_sims_starttls.t => 25_client_sims_starttls.t} | 0 7 files changed, 12 insertions(+) create mode 100755 t/20_client_sim-data_up_to_date.t rename t/{02_client_sims_old.t => 21_client_sims_old.t} (100%) rename t/{03_client_sims_intermediate.t => 22_client_sims_intermediate.t} (100%) rename t/{04_client_sims_modern.t => 23_client_sims_modern.t} (100%) rename t/{05_client_sims_testssl.sh.t => 24_client_sims_testssl.sh.t} (100%) rename t/{06_client_sims_starttls.t => 25_client_sims_starttls.t} (100%) diff --git a/.gitignore b/.gitignore index 45f774c..adad0cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store tmp.json +*.bak diff --git a/t/20_client_sim-data_up_to_date.t b/t/20_client_sim-data_up_to_date.t new file mode 100755 index 0000000..2e12da4 --- /dev/null +++ b/t/20_client_sim-data_up_to_date.t @@ -0,0 +1,11 @@ +#!/usr/bin/env perl + +use strict; +use Test::More tests => 2; + + +my $outdated=`find include/client_sim.data -mtime 14d`; +ok($outdated eq "","include/client_sim.data should be no older then 14 days, run utils/update_client_sim_data.pl to correct"); +my $newer=`find utils/update_client_sim_data.pl -newer include/client_sim.data`; +ok($newer eq "","utils/update_client_sim_data.pl should not be newer then include/client_sim.data, run utils/update_client_sim_data.pl to correct"); +done_testing; \ No newline at end of file diff --git a/t/02_client_sims_old.t b/t/21_client_sims_old.t similarity index 100% rename from t/02_client_sims_old.t rename to t/21_client_sims_old.t diff --git a/t/03_client_sims_intermediate.t b/t/22_client_sims_intermediate.t similarity index 100% rename from t/03_client_sims_intermediate.t rename to t/22_client_sims_intermediate.t diff --git a/t/04_client_sims_modern.t b/t/23_client_sims_modern.t similarity index 100% rename from t/04_client_sims_modern.t rename to t/23_client_sims_modern.t diff --git a/t/05_client_sims_testssl.sh.t b/t/24_client_sims_testssl.sh.t similarity index 100% rename from t/05_client_sims_testssl.sh.t rename to t/24_client_sims_testssl.sh.t diff --git a/t/06_client_sims_starttls.t b/t/25_client_sims_starttls.t similarity index 100% rename from t/06_client_sims_starttls.t rename to t/25_client_sims_starttls.t