Adds tests for "ipfs add -rn"
License: MIT Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
Stephen Whitmore committed
Apr 7, 2016 at 12:38 UTC
d30152cfe9ed3f763cce089b86c0a2983f3e19a3
1 file changed
+17
test/sharness/t0040-add-and-cat.sh
+17
@@ -285,6 +285,23 @@ test_expect_success "'ipfs add -r' output looks good" '
285
test_cmp expected actual
286
'
287
288
+test_expect_success "'ipfs add -rn' succeeds" '
289
+ mkdir mountdir/moons &&
290
+ echo "Hello Europa!" >mountdir/moons/europa.txt &&
291
+ echo "Hello Titan!" >mountdir/moons/titan.txt &&
292
+ ipfs add -rn mountdir/moons >actual
293
+'
294
+
295
+test_expect_success "'ipfs add -rn' output looks good" '
296
+ MOONS="QmUzSf98B1y5Aw5UcaV5SnAEDNzsppxfigbKjciy57hNRv" &&
297
+ EUROPA="Qmbjg7zWdqdMaK2BucPncJQDxiALExph5k3NkQv5RHpccu" &&
298
+ TITAN="QmZzppb9WHn552rmRqpPfgU5FEiHH6gDwi3MrB9cTdPwdb" &&
299
+ echo "added $EUROPA moons/europa.txt" >expected &&
300
+ echo "added $TITAN moons/titan.txt" >>expected &&
301
+ echo "added $MOONS moons" >>expected &&
302
+ test_cmp expected actual
303
+'
304
+
305
test_expect_success "ipfs cat accept many hashes from stdin" '
306
{ echo "$MARS"; echo "$VENUS"; } | ipfs cat >actual
307
'