diff options
author | Russ Allbery <rra@stanford.edu> | 2007-12-07 00:26:24 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-12-07 00:26:24 +0000 |
commit | 5a6775be4fdbee0523a573af960568ca21f38c49 (patch) | |
tree | a8c0ed31e880143825f8760bc59e27babbe966a7 /tests/server | |
parent | b21e806902b9d9342c5990e7b42cbe99e98af704 (diff) |
Allow the empty string in wallet-backend arguments.
When writing to a file in the wallet client program, remove an old
backup file before creating a new backup and don't fail if the backup
already exists.
Diffstat (limited to 'tests/server')
-rw-r--r-- | tests/server/backend-t.in | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/server/backend-t.in b/tests/server/backend-t.in index 8509177..0c02598 100644 --- a/tests/server/backend-t.in +++ b/tests/server/backend-t.in @@ -9,7 +9,7 @@ use strict; use IO::String; -use Test::More tests => 1222; +use Test::More tests => 1224; # Create a dummy class for Wallet::Server that prints what method was called # with its arguments and returns data for testing. @@ -434,7 +434,12 @@ for my $command (sort keys %flag_commands) { } # Almost done. All that remains is to test the robustness of the bad -# character checks against every possible character. +# character checks against every possible character and test permitting the +# empty argument. +($out, $err) = run_backend ('show', 'type', ''); +is ($err, '', 'Allowed the empty argument'); +is ($OUTPUT, "command show type from admin (1.2.3.4) succeeded\n", + ' and success logged'); my $ok = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_/.-'; ($out, $err) = run_backend ('show', 'type', $ok); is ($err, '', 'Allowed all valid characters'); |