@cryptotaxi247 / kubo / commits / ec8e45120

fix(files): add test

License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>

Overbool committed Oct 16, 2018 at 23:19 UTC ec8e45120e0af757a1c3cb597b155eab94320d73
1 file changed +7
test/sharness/t0250-files-api.sh
+7
@@ -260,6 +260,13 @@ test_files_api() {
260 verify_dir_contents /cats/this/is/a/dir
261 '
262
263 + test_expect_success "dir has correct name" '
264 + DIR_HASH=$(ipfs files stat /cats/this --hash) &&
265 + echo "this/ $DIR_HASH 0" > ls_dir_expected &&
266 + ipfs files ls -l /cats | grep this/ > ls_dir_actual &&
267 + test_cmp ls_dir_expected ls_dir_actual
268 + '
269 +
270 test_expect_success "can copy file into new dir $EXTRA" '
271 ipfs files cp /ipfs/$FILE3 /cats/this/is/a/dir/file3
272 '