提交 adfe1978 作者: Juan Benet

Merge pull request #2204 from ipfs/fix-test-str-contains

Fix test str contains
......@@ -9,5 +9,4 @@
*.orig
*~
/test/bin
.ipfs
\ No newline at end of file
.ipfs
# Ignore everything in this directory by default
/**
# Do not ignore this file itself
!.gitignore
# Do not ignore the following special scripts
!checkflags
!continueyn
!ipfs-pin-stat
!verify-go-fmt.sh
......@@ -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
......@@ -321,7 +321,7 @@ test_should_contain() {
test_str_contains() {
find=$1
shift
echo "$@" | grep "$find" >/dev/null
echo "$@" | grep "\b$find\b" >/dev/null
}
disk_usage() {
......
......@@ -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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论