From 4b1df0699a800411c106b96974eab52b737e2d60 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 13 Aug 2008 23:36:45 +0000 Subject: Correctly handle storing of data that begins with a dash and don't parse it as an argument to wallet-backend. --- tests/client/full-t.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/client/full-t.in b/tests/client/full-t.in index 83c0ce9..f4ef1d3 100644 --- a/tests/client/full-t.in +++ b/tests/client/full-t.in @@ -12,7 +12,7 @@ # is loaded, and it's pulled in as a prerequisite for Wallet::Admin. BEGIN { $ENV{WALLET_CONFIG} = '@abs_top_srcdir@/tests/data/wallet.conf' } -BEGIN { our $total = 47 } +BEGIN { our $total = 53 } use Test::More tests => $total; use lib '@abs_top_srcdir@/perl'; @@ -155,6 +155,17 @@ SKIP: { is ($out, "baz\nboo\n", ' with the right output'); is ($err, '', ' and no error'); + # Store data beginning with a dash. + ($out, $err, $status) = wallet ($principal, 'store', 'file', 'auto', '--', + '-q'); + is ($status, 0, 'Storing data that looks like an option succeeds'); + is ($out, '', ' with no output'); + is ($err, '', ' and no error'); + ($out, $err, $status) = wallet ($principal, 'get', 'file', 'auto'); + is ($status, 0, 'Object get succeeds'); + is ($out, '-q', ' with the right output'); + is ($err, '', ' and no error'); + # All done. remctld_stop; $admin->destroy; -- cgit v1.2.3