[Commits] [SCM] clawsker branch, master, updated. 1.3.7-9-gebdd9c8

mones at claws-mail.org mones at claws-mail.org
Mon Dec 18 10:33:28 UTC 2023


The branch, master has been updated
       via  ebdd9c83ef0d9d1319099d4673ff14c3dad31c68 (commit)
      from  f69ac3b42de1191e7f87cd639c43b23e79c617f8 (commit)

Summary of changes:
 t/parse_command_line.t | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit ebdd9c83ef0d9d1319099d4673ff14c3dad31c68
Author: Ricardo Mones <ricardo at mones.org>
Date:   Mon Dec 18 11:33:07 2023 +0100

    Update test with all command line flags

diff --git a/t/parse_command_line.t b/t/parse_command_line.t
index 5394a2e..ba28ba7 100644
--- a/t/parse_command_line.t
+++ b/t/parse_command_line.t
@@ -1,7 +1,7 @@
 use 5.010_000;
 use strict;
 use utf8;
-use Test::More tests => 10;
+use Test::More tests => 17;
 use Test::Exception;
 use File::Spec::Functions;
 
@@ -22,7 +22,25 @@ use Clawsker;
 
 ok ( defined &Clawsker::parse_command_line, 'has function' );
 
-dies_ok { Clawsker::parse_command_line(['--invalid']) } 'invalid option';
+lives_ok { Clawsker::parse_command_line(['--help']) } '--help';
+
+lives_ok { Clawsker::parse_command_line(['--version']) } '--version';
+
+lives_ok { Clawsker::parse_command_line(['--verbose']) } '--verbose';
+
+lives_ok { Clawsker::parse_command_line(['--read-only']) } '--read-only';
+
+lives_ok { Clawsker::parse_command_line(['--small-screen']) } '--small-screen';
+
+lives_ok { Clawsker::parse_command_line(['--ignore-versions']) } '--ignore-versions';
+
+lives_ok { Clawsker::parse_command_line(['--hide-disabled-keys']) } '--hide-disabled-keys';
+
+dies_ok { Clawsker::parse_command_line(['--use-claws-version']) } '--use-claws-version';
+
+lives_ok { Clawsker::parse_command_line(['--use-claws-version', '1.0.0']) } '--use-claws-version ok';
+
+dies_ok { Clawsker::parse_command_line(['--use-claws-version', 'invalid']) } '--use-claws-version ko';
 
 dies_ok { Clawsker::parse_command_line(['--alternate-config-dir']) } '--alternate-config-dir';
 
@@ -30,11 +48,7 @@ dies_ok { Clawsker::parse_command_line(['--alternate-config-dir', '/notexisting'
 
 lives_ok { Clawsker::parse_command_line(['--alternate-config-dir', '.']) } '--alternate-config-dir ok';
 
-lives_ok { Clawsker::parse_command_line(['--verbose']) } '--verbose';
-
 dies_ok { Clawsker::parse_command_line(['--clawsrc']) } '--clawsrc';
 
-lives_ok { Clawsker::parse_command_line(['--help']) } '--help';
-
-lives_ok { Clawsker::parse_command_line(['--version']) } '--version';
+dies_ok { Clawsker::parse_command_line(['--invalid']) } 'invalid option';
 

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


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


More information about the Commits mailing list