Skip to content

Commit 2793ae4

Browse files
committed
Add test for directly adding hidden file
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
1 parent 518f7e0 commit 2793ae4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/sharness/t0040-add-and-cat.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ test_add_cat_file() {
3030
echo "added $HASH hello.txt" >expected &&
3131
test_cmp expected actual
3232
'
33+
test_expect_success "ipfs add on hidden file succeeds" '
34+
echo "Hello Worlds!" >mountdir/.hello.txt &&
35+
ipfs add mountdir/.hello.txt >actual
36+
'
37+
38+
test_expect_success "ipfs add on hidden file output looks good" '
39+
HASH="QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH" &&
40+
echo "added $HASH .hello.txt" >expected &&
41+
test_cmp expected actual
42+
'
3343

3444
test_expect_success "ipfs add --only-hash succeeds" '
3545
ipfs add --only-hash mountdir/hello.txt > oh_actual

0 commit comments

Comments
 (0)