From a3ee976840e97d37022ec117bae09fef25ac4385 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sat, 20 Feb 2010 19:55:05 -0800 Subject: Add support in the wallet client for store of binary data Refactor the wallet client code to use remctl_commandv and send stores with data containing nul. --- tests/data/basic.conf | 1 + tests/data/cmd-fake | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/data') diff --git a/tests/data/basic.conf b/tests/data/basic.conf index 3280ce9..5f3c2a3 100644 --- a/tests/data/basic.conf +++ b/tests/data/basic.conf @@ -1,3 +1,4 @@ # remctl configuration for wallet client tests. +fake-wallet store data/cmd-fake stdin=last ANYUSER fake-wallet ALL data/cmd-fake ANYUSER diff --git a/tests/data/cmd-fake b/tests/data/cmd-fake index 199bd57..add72fc 100755 --- a/tests/data/cmd-fake +++ b/tests/data/cmd-fake @@ -82,10 +82,15 @@ get) ;; store) if [ -n "$3" ] ; then - echo "Too many arguments" >&2 + echo 'Too many arguments' >&2 + exit 1 + fi + if [ -n "$2" ] ; then + echo 'stdin remctld configuration not supported' >&2 exit 1 fi - printf "$type $1\n$2" > store-output + printf "$type $1\n" > store-output + cat >> store-output ;; show) if [ -n "$2" ] ; then -- cgit v1.2.3