[Commits] [SCM] clawsker branch, master, updated. 1.3.8-2-g7b1d8b0

mones at claws-mail.org mones at claws-mail.org
Sat Jun 1 21:39:58 UTC 2024


The branch, master has been updated
       via  7b1d8b00ffb05c5906f814d9a77b9dd69f998162 (commit)
      from  d2488b2a19a9c47eb8a5bcf7e4003a0b7482a361 (commit)

Summary of changes:
 t/load_history.t | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 t/load_history.t


- Log -----------------------------------------------------------------
commit 7b1d8b00ffb05c5906f814d9a77b9dd69f998162
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Jun 1 23:39:29 2024 +0200

    Add test for history load sub

diff --git a/t/load_history.t b/t/load_history.t
new file mode 100644
index 0000000..ed48719
--- /dev/null
+++ b/t/load_history.t
@@ -0,0 +1,31 @@
+
+use 5.010_000;
+use strict;
+use utf8;
+use File::Temp qw(tempdir);
+use File::Spec::Functions;
+use Test::More tests => 3;
+
+require_ok ('Clawsker');
+
+my ($temp, $history);
+
+BEGIN {
+    $temp = tempdir (CLEANUP => 1);
+    $history = catfile ($temp, 'history_file');
+    open my $hif, '>', $history
+        or die "opening $history for writing: $!\n";
+    print $hif <<HISTORY
+ one
+   two two
+
+three three three
+
+HISTORY
+}
+
+use Clawsker;
+
+my $data = Clawsker::load_history($history);
+is ( ref $data, '', 'scalar' );
+is ( $data, "one\ntwo two\nthree three three", 'content' );

-----------------------------------------------------------------------


hooks/post-receive
-- 
Hidden preferences editor for Claws Mail


More information about the Commits mailing list