diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/client/full-t.in | 18 | ||||
| -rw-r--r-- | tests/data/full.conf | 1 | 
2 files changed, 18 insertions, 1 deletions
| diff --git a/tests/client/full-t.in b/tests/client/full-t.in index 8acc360..ce2789d 100644 --- a/tests/client/full-t.in +++ b/tests/client/full-t.in @@ -11,7 +11,7 @@  # is loaded, and it's pulled in as a prerequisite for Wallet::Admin.  BEGIN { $ENV{WALLET_CONFIG} = "$ENV{SOURCE}/data/wallet.conf" } -BEGIN { our $total = 53 } +BEGIN { our $total = 59 }  use Test::More tests => $total;  use lib "$ENV{SOURCE}/../perl"; @@ -168,6 +168,22 @@ SKIP: {      is ($out, '-q', ' with the right output');      is ($err, '', ' and no error'); +    # Store data containing nul characters. +    my $data = "Some data\000with a nul"; +    open (IN, '>', 'tmp-file') or BAIL_OUT ("cannot create tmp-file: $!"); +    print IN $data; +    close IN; +    ($out, $err, $status) = wallet ($principal, '-f', 'tmp-file', 'store', +                                    'file', 'auto'); +    unlink ('tmp-file'); +    is ($status, 0, 'Storing data with a nul 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, $data, ' with the right output'); +    is ($err, '', ' and no error'); +      # All done.      remctld_stop;      $admin->destroy; diff --git a/tests/data/full.conf b/tests/data/full.conf index 4c0f435..941a9ac 100644 --- a/tests/data/full.conf +++ b/tests/data/full.conf @@ -1,3 +1,4 @@  # remctl configuration for full wallet client tests. +wallet store data/cmd-wrapper stdin=4 ANYUSER  wallet ALL data/cmd-wrapper ANYUSER | 
