Skip to content

Commit b03e578

Browse files
committed
test: e2e 67 avoid GNU sed -i (macOS BSD sed portability)
1 parent dd85b4e commit b03e578

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/e2e/67_features_strict.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ fi
9292
grep -q "does not declare" b4.log || { cat b4.log; echo "missing strict error text"; exit 1; }
9393

9494
# 4. Unknown backend on a dep that declares backend-* features → warning.
95-
sed -i 's/backend = "a"/backend = "zzz"/' mcpp.toml
95+
sed 's/backend = "a"/backend = "zzz"/' mcpp.toml > mcpp.toml.tmp && mv mcpp.toml.tmp mcpp.toml
9696
rm -rf target
9797
"$MCPP" build > b5.log 2>&1 || { cat b5.log; echo "unknown-backend warn path must not fail"; exit 1; }
9898
grep -q "does not declare requested feature 'backend-zzz'" b5.log \
9999
|| { cat b5.log; echo "missing unknown-backend warning"; exit 1; }
100-
sed -i 's/backend = "zzz"/backend = "a"/' mcpp.toml
100+
sed 's/backend = "zzz"/backend = "a"/' mcpp.toml > mcpp.toml.tmp && mv mcpp.toml.tmp mcpp.toml
101101

102102
# 5. Unknown platform → warning by default, error under --strict.
103-
sed -i 's/platforms = \["linux", "macos", "windows"\]/platforms = ["linux", "amiga"]/' mcpp.toml
103+
sed 's/platforms = \["linux", "macos", "windows"\]/platforms = ["linux", "amiga"]/' mcpp.toml > mcpp.toml.tmp && mv mcpp.toml.tmp mcpp.toml
104104
rm -rf target
105105
"$MCPP" build > b6.log 2>&1 || { cat b6.log; echo "platform warn path must not fail"; exit 1; }
106106
grep -q "unknown platform 'amiga'" b6.log || { cat b6.log; echo "missing platform warning"; exit 1; }

0 commit comments

Comments
 (0)