Skip to content

Commit 0aa6f98

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

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ test_add_cat_file() {
3030
echo "added $HASH hello.txt" >expected &&
3131
test_cmp expected actual
3232
'
33-
3433
test_expect_success "ipfs add --only-hash succeeds" '
3534
ipfs add --only-hash mountdir/hello.txt > oh_actual
3635
'
@@ -75,6 +74,17 @@ test_add_cat_file() {
7574
echo "added $HASH hello.txt" >expected &&
7675
test_cmp expected actual
7776
'
77+
78+
test_expect_success "ipfs add on hidden file succeeds" '
79+
echo "Hello Worlds!" >mountdir/.hello.txt &&
80+
ipfs add mountdir/.hello.txt >actual
81+
'
82+
83+
test_expect_success "ipfs add on hidden file output looks good" '
84+
HASH="QmVr26fY1tKyspEJBniVhqxQeEjhF78XerGiqWAwraVLQH" &&
85+
echo "added $HASH .hello.txt" >expected &&
86+
test_cmp expected actual
87+
'
7888
}
7989

8090
test_add_cat_5MB() {

0 commit comments

Comments
 (0)