-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(replace): replace substrings in values
- Loading branch information
Showing
8 changed files
with
175 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
echo -- case-sensitive, match, beginning | ||
"$INITOOL" r tests/replace-part.ini '' key A a && echo success || echo failure | ||
|
||
echo -- case-sensitive, match, middle | ||
"$INITOOL" r tests/replace-part.ini '' key 'longer ' '' && echo success || echo failure | ||
|
||
echo -- case-sensitive, match, end | ||
"$INITOOL" r tests/replace-part.ini '' key value. string && echo success || echo failure | ||
|
||
echo -- case-sensitive, no match, end | ||
"$INITOOL" r tests/replace-part.ini '' key value.. string && echo success || echo failure | ||
|
||
echo -- case-insensitive, match, beginning | ||
"$INITOOL" -i r tests/replace-part.ini '' key a a && echo success || echo failure | ||
|
||
echo -- case-insensitive, match, middle | ||
"$INITOOL" -i r tests/replace-part.ini '' key 'lOnGeR ' '' && echo success || echo failure | ||
|
||
echo -- case-insensitive, match, end | ||
"$INITOOL" -i r tests/replace-part.ini '' key Value. string && echo success || echo failure | ||
|
||
echo -- only replace the first occurrence | ||
"$INITOOL" -i r tests/replace-part.ini '' another-key AA GG && echo success || echo failure | ||
|
||
echo -- empty text, match | ||
"$INITOOL" -i r tests/replace-part.ini '' empty '' something && echo success || echo failure | ||
|
||
echo -- empty text, no match | ||
"$INITOOL" -i r tests/replace-part.ini '' key '' something && echo success || echo failure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
key=A longer value. | ||
another-key=ABAABBAAABBB | ||
empty= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
-- case-sensitive, match, beginning | ||
key=a longer value. | ||
another-key=ABAABBAAABBB | ||
empty= | ||
success | ||
-- case-sensitive, match, middle | ||
key=A value. | ||
another-key=ABAABBAAABBB | ||
empty= | ||
success | ||
-- case-sensitive, match, end | ||
key=A longer string | ||
another-key=ABAABBAAABBB | ||
empty= | ||
success | ||
-- case-sensitive, no match, end | ||
key=A longer value. | ||
another-key=ABAABBAAABBB | ||
empty= | ||
failure | ||
-- case-insensitive, match, beginning | ||
key=a longer value. | ||
another-key=ABAABBAAABBB | ||
empty= | ||
success | ||
-- case-insensitive, match, middle | ||
key=A value. | ||
another-key=ABAABBAAABBB | ||
empty= | ||
success | ||
-- case-insensitive, match, end | ||
key=A longer string | ||
another-key=ABAABBAAABBB | ||
empty= | ||
success | ||
-- only replace the first occurrence | ||
key=A longer value. | ||
another-key=ABGGBBAAABBB | ||
empty= | ||
success | ||
-- empty text, match | ||
key=A longer value. | ||
another-key=ABAABBAAABBB | ||
empty=something | ||
success | ||
-- empty text, no match | ||
key=A longer value. | ||
another-key=ABAABBAAABBB | ||
empty= | ||
failure |
File renamed without changes.
File renamed without changes.