@cryptotaxi247 / kubo / commits / 3b65f1a50

Add sharness tests for recursive add

License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

Christian Couder committed Nov 28, 2014 at 22:05 UTC 3b65f1a507693f8cf75b9c0ba6ec078e3dea74d3
1 file changed +17
test/t0040-add-and-cat.sh
+17
@@ -67,6 +67,23 @@ test_expect_success "'ipfs add -q' output looks good" '
67 test_cmp expected actual
68 '
69
70 +test_expect_success "'ipfs add -r' succeeds" '
71 + mkdir mountdir/planets &&
72 + echo "Hello Mars!" >mountdir/planets/mars.txt &&
73 + echo "Hello Venus!" >mountdir/planets/venus.txt &&
74 + ipfs add -r mountdir/planets >actual
75 +'
76 +
77 +test_expect_success "'ipfs add -r' output looks good" '
78 + PLANETS="QmWSgS32xQEcXMeqd3YPJLrNBLSdsfYCep2U7CFkyrjXwY" &&
79 + MARS="QmPrrHqJzto9m7SyiRzarwkqPcCSsKR2EB1AyqJfe8L8tN" &&
80 + VENUS="QmU5kp3BH3B8tnWUU2Pikdb2maksBNkb92FHRr56hyghh4" &&
81 + echo "added $PLANETS mountdir/planets" >expected &&
82 + echo "added $MARS mountdir/planets/mars.txt" >>expected &&
83 + echo "added $VENUS mountdir/planets/venus.txt" >>expected &&
84 + test_cmp expected actual
85 +'
86 +
87 test_expect_success "go-random is installed" '
88 type random
89 '