@cryptotaxi247 / kubo / commits / 802d3f957

Add back still useful test from fe7b01f1 (Resolve symlink if ...)

Add back still useful test from reverted commit: fe7b01f14e2b8db6e856b567dbd7db4d00f6e366 Resolve symlink if it is directly referenced in cli (#2897) License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>

Kevin Atkinson committed Aug 29, 2016 at 16:10 UTC 802d3f9570401d5df420cb28fa973b57cef8a3e0
1 file changed +10
test/sharness/t0044-add-symlink.sh
+10
@@ -44,6 +44,16 @@ test_add_symlinks() {
44 echo "QmWYN8SEXCgNT2PSjB6BnxAx6NJQtazWoBkTRH9GRfPFFQ" > badlink_exp &&
45 test_cmp badlink_exp badlink_out
46 '
47 +
48 + test_expect_success "adding with symlink in middle of path is same as\
49 +adding with no symlink" '
50 + mkdir -p files2/a/b/c &&
51 + echo "some other text" > files2/a/b/c/foo &&
52 + ln -s b files2/a/d
53 + ipfs add -rq files2/a/b/c > no_sym &&
54 + ipfs add -rq files2/a/d/c > sym &&
55 + test_cmp no_sym sym
56 + '
57 }
58
59 test_init_ipfs