mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-01 13:19:12 +00:00
Fix sed command portability
Error messages:
$ sed -i'' '-e/->expectWarning(/d' ./PHPCurlClass/PHPCurlClassTest.php ./PHPCurlClass/PHPMultiCurlClassTest.php
sed: 1: "./PHPCurlClass/PHPCurlC ...": invalid command code .
+ phpunit_v10_shim
+ remove_expectWarning
+ sed -i '' '-e/->expectWarning(/d' ./PHPCurlClass/PHPCurlClassTest.php ./PHPCurlClass/PHPMultiCurlClassTest.php
sed: can't read : No such file or directory
This commit is contained in:
+10
-2
@@ -1,6 +1,6 @@
|
||||
remove_expectWarning() {
|
||||
# Fix "Call to undefined method CurlTest\CurlTest::expectWarning()".
|
||||
sed -i'' -e"/->expectWarning(/d" "./PHPCurlClass/PHP"*
|
||||
sed -i$(sed v < /dev/null 2> /dev/null || echo -n " ''") -e "/->expectWarning(/d" "./PHPCurlClass/PHP"*
|
||||
}
|
||||
|
||||
replace_assertStringContainsString() {
|
||||
@@ -8,7 +8,15 @@ replace_assertStringContainsString() {
|
||||
# +->assertContains(
|
||||
find='->assertStringContainsString('
|
||||
replace='->assertContains('
|
||||
sed -i'' -e"s/${find}/${replace}/" "./PHPCurlClass/PHP"*
|
||||
sed -i$(sed v < /dev/null 2> /dev/null || echo -n " ''") -e "s/${find}/${replace}/" "./PHPCurlClass/PHP"*
|
||||
}
|
||||
|
||||
replace_assertMatchesRegularExpression() {
|
||||
# -->assertMatchesRegularExpression(
|
||||
# +->assertRegExp(
|
||||
find='->assertMatchesRegularExpression('
|
||||
replace='->assertRegExp('
|
||||
sed -i$(sed v < /dev/null 2> /dev/null || echo -n " ''") -e"s/${find}/${replace}/" "./PHPCurlClass/PHP"*
|
||||
}
|
||||
|
||||
phpunit_v6_5_shim() {
|
||||
|
||||
+10
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
remove_expectWarning() {
|
||||
# Fix "Call to undefined method CurlTest\CurlTest::expectWarning()".
|
||||
sed -i'' -e"/->expectWarning(/d" "./PHPCurlClass/PHP"*
|
||||
sed -i$(sed v < /dev/null 2> /dev/null || echo -n " ''") -e "/->expectWarning(/d" "./PHPCurlClass/PHP"*
|
||||
}
|
||||
|
||||
replace_assertStringContainsString() {
|
||||
@@ -10,7 +10,15 @@ replace_assertStringContainsString() {
|
||||
# +->assertContains(
|
||||
find='->assertStringContainsString('
|
||||
replace='->assertContains('
|
||||
sed -i'' -e"s/${find}/${replace}/" "./PHPCurlClass/PHP"*
|
||||
sed -i$(sed v < /dev/null 2> /dev/null || echo -n " ''") -e "s/${find}/${replace}/" "./PHPCurlClass/PHP"*
|
||||
}
|
||||
|
||||
replace_assertMatchesRegularExpression() {
|
||||
# -->assertMatchesRegularExpression(
|
||||
# +->assertRegExp(
|
||||
find='->assertMatchesRegularExpression('
|
||||
replace='->assertRegExp('
|
||||
sed -i$(sed v < /dev/null 2> /dev/null || echo -n " ''") -e"s/${find}/${replace}/" "./PHPCurlClass/PHP"*
|
||||
}
|
||||
|
||||
phpunit_v6_5_shim() {
|
||||
|
||||
Reference in New Issue
Block a user