more bsd sed fixes

License: MIT
Signed-off-by: 's avatarJakub Sztandera <kubuxu@protonmail.ch>
上级 daf212a6
......@@ -74,8 +74,8 @@ test_config_cmd() {
test_expect_success "setup for config replace test" '
cp "$IPFS_PATH/config" newconfig.json &&
</dev/null sed -e /PrivKey/d -e s/10GB/11GB/ -i"~" newconfig.json &&
</dev/null sed -e '"'"'/PeerID/ { s/,$// } '"'"' -i"~" newconfig.json
sed -i"~" -e /PrivKey/d -e s/10GB/11GB/ newconfig.json &&
sed -i"~" -e '"'"'/PeerID/ { s/,$// } '"'"' newconfig.json
'
test_expect_success "run 'ipfs config replace'" '
......@@ -84,7 +84,7 @@ test_config_cmd() {
test_expect_success "check resulting config after 'ipfs config replace'" '
sed -e /PrivKey/d "$IPFS_PATH/config" > replconfig.json &&
sed -e '"'"'/PeerID/ { s/,$// } '"'"' -i"~" replconfig.json &&
sed -i"~" -e '"'"'/PeerID/ { s/,$// } '"'"' replconfig.json &&
test_cmp replconfig.json newconfig.json
'
......@@ -118,7 +118,7 @@ test_config_cmd() {
'
test_expect_success "fix it back" '
sed -i -e '\''s/privkey/PrivKey/'\'' "$IPFS_PATH/config"
sed -i"~" -e '\''s/privkey/PrivKey/'\'' "$IPFS_PATH/config"
'
test_expect_success "'ipfs config show' doesn't include privkey" '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论