Skip to content

Commit

Permalink
grab test from #2690
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jeromy <[email protected]>
  • Loading branch information
whyrusleeping committed Jun 2, 2016
1 parent 3737f35 commit a024034
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/sharness/t0250-files-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,25 @@ test_files_api() {
test_expect_success "child dir looks right" '
verify_dir_contents /
'

# test for https://github.com/ipfs/go-ipfs/issues/2654
test_expect_success "create and remove dir" '
ipfs files mkdir /test_dir &&
ipfs files rm -r "/test_dir"
'
test_expect_success "create test file" '
echo "content" | ipfs files write -e "/test_file"
'
test_expect_success "copy test file onto test dir" '
ipfs files cp "/test_file" "/test_dir"
'
test_expect_success "test /test_dir" '
ipfs files stat "/test_dir" | grep -q "^Type: file"
'
test_expect_success "clean up /test_dir and /test_file" '
ipfs files rm -r /test_dir &&
ipfs files rm -r /test_file
'
}

# test offline and online
Expand Down

0 comments on commit a024034

Please sign in to comment.