From ec8e45120e0af757a1c3cb597b155eab94320d73 Mon Sep 17 00:00:00 2001 From: Overbool Date: Tue, 16 Oct 2018 23:19:18 +0800 Subject: [PATCH] fix(files): add test License: MIT Signed-off-by: Overbool --- test/sharness/t0250-files-api.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/sharness/t0250-files-api.sh b/test/sharness/t0250-files-api.sh index 793e168bede..244fdcd0a57 100755 --- a/test/sharness/t0250-files-api.sh +++ b/test/sharness/t0250-files-api.sh @@ -260,6 +260,13 @@ test_files_api() { verify_dir_contents /cats/this/is/a/dir ' + test_expect_success "dir has correct name" ' + DIR_HASH=$(ipfs files stat /cats/this --hash) && + echo "this/ $DIR_HASH 0" > ls_dir_expected && + ipfs files ls -l /cats | grep this/ > ls_dir_actual && + test_cmp ls_dir_expected ls_dir_actual + ' + test_expect_success "can copy file into new dir $EXTRA" ' ipfs files cp /ipfs/$FILE3 /cats/this/is/a/dir/file3 '