more fixes for standard sed

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera 2016-09-28 16:22:32 +02:00
parent 5b4a6eac10
commit 80a776286c
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -75,7 +75,7 @@ test_config_cmd() {
test_expect_success "setup for config replace test" '
cp "$IPFS_PATH/config" newconfig.json &&
sed -i"~" -e /PrivKey/d -e s/10GB/11GB/ newconfig.json &&
sed -i"~" -e '"'"'/PeerID/ { s/,$// } '"'"' newconfig.json
sed -i"~" -e '"'"'/PeerID/ {'"'"' -e '"'"' s/,$// '"'"' -e '"'"' } '"'"' 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 -i"~" -e '"'"'/PeerID/ { s/,$// } '"'"' replconfig.json &&
sed -i"~" -e '"'"'/PeerID/ {'"'"' -e '"'"' s/,$// '"'"' -e '"'"' } '"'"' replconfig.json &&
test_cmp replconfig.json newconfig.json
'