3 trap 'rm -f test.json' EXIT
6 # missing required cmdline args
7 gnunet-auction-create -r 1 -d foo -p test.json && exit 1
8 gnunet-auction-create -s 1 -d foo -p test.json && exit 1
9 gnunet-auction-create -s 1 -r 1 -p test.json && exit 1
10 gnunet-auction-create -s 1 -r 1 -d foo && exit 1
15 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
22 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
27 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
30 # unexpected structures
34 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
39 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
44 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
47 {"currency": "foo", "prices": "bar"}
49 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
54 {"currency": "foo", "prices": []}
56 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
59 {"currency": "foo", "prices": ["bar"]}
61 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
64 {"currency": "foo", "prices": [null]}
66 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
69 {"currency": "foo", "prices": [1, 2]}
71 gnunet-auction-create -s 1 -r 1 -d foo -p test.json && exit 1
76 {"currency": "foo", "prices": [2, 1]}
78 gnunet-auction-create -s 1 -r 1 -d foo -p test.json || exit 1