From e6201151c67b3f5d1515f4c0749dabc7fffa89b3 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Fri, 15 Jan 2016 09:52:31 +0100 Subject: [PATCH] t0081: fix greping pin type License: MIT Signed-off-by: Christian Couder --- test/bin/ipfs-pin-stat | 6 +++--- test/sharness/t0081-repo-pinning.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/bin/ipfs-pin-stat b/test/bin/ipfs-pin-stat index ffb0b2260..967ee9b65 100755 --- a/test/bin/ipfs-pin-stat +++ b/test/bin/ipfs-pin-stat @@ -19,12 +19,12 @@ if [ "$?" -eq 0 ]; then fi ipfs pin ls --type=recursive | grep "$path" >/dev/null -[ "$?" -eq 0 ] && echo "$path pinned recursively" +[ "$?" -eq 0 ] && echo "$path pinned recursive-ly" ipfs pin ls --type=indirect | grep "$path" >/dev/null -[ "$?" -eq 0 ] && echo "$path pinned indirectly" +[ "$?" -eq 0 ] && echo "$path pinned indirect-ly" ipfs pin ls --type=direct | grep "$path" >/dev/null -[ "$?" -eq 0 ] && echo "$path pinned directly" +[ "$?" -eq 0 ] && echo "$path pinned direct-ly" exit 0 diff --git a/test/sharness/t0081-repo-pinning.sh b/test/sharness/t0081-repo-pinning.sh index f57a86303..8b0d2bcdb 100755 --- a/test/sharness/t0081-repo-pinning.sh +++ b/test/sharness/t0081-repo-pinning.sh @@ -17,7 +17,7 @@ test_pin_flag() { echo "test_pin_flag" $@ - ipfs-pin-stat "$object" | grep "$ptype" + ipfs-pin-stat "$object" | egrep "\b$ptype\b" actual=$? if [ "$expect" = "true" ]; then