Skip to content

Commit

Permalink
fix(files): add test
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Overbool <[email protected]>
  • Loading branch information
overbool committed Oct 16, 2018
1 parent e9d6c06 commit ec8e451
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/sharness/t0250-files-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'
Expand Down

0 comments on commit ec8e451

Please sign in to comment.