Skip to content

Commit

Permalink
more bsd sed fixes
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
  • Loading branch information
Kubuxu committed Sep 28, 2016
1 parent daf212a commit 5b4a6ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/sharness/t0021-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'" '
Expand All @@ -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
'

Expand Down Expand Up @@ -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" '
Expand Down

0 comments on commit 5b4a6ea

Please sign in to comment.