Skip to content

Commit

Permalink
Fix README; adapt test to fit tests name
Browse files Browse the repository at this point in the history
Complements 078b461.
  • Loading branch information
dr0i committed Nov 21, 2023
1 parent 078b461 commit 9bf5307
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,9 +717,10 @@ Encodes a field value as URI. Aka percent-encoding.

Options:

- `allow_empty_values`: Sets whether to allow empty values in the filemap or to ignore these entries. (Default: `false`)
- `compression`: Sets the compression of the file.

- `plus_for_space`: Sets whether "space" (' ') will be substituted by a "plus" ('+') or be percent escaped ('%20'). Default: `true`)
- `safe_chars`: Sets characters that won't be escaped. Safe characters are the
ranges 0..9, a..z and A..Z. These are always safe and should not be specified.
Default safe characters are also ".", "-", "*", and "_".

```perl
uri_encode("<sourceField>"[, <options>...])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4047,7 +4047,7 @@ public void shouldUriEncodePathSegmentWithoutPlusForSpace() {
@Test
public void shouldUriEncodePathSegmentWithoutSafeChars() {
MetafixTestHelpers.assertFix(streamReceiver, Arrays.asList(
"uri_encode('id', safe_chars:'', plus_for_space:'false')"
"uri_encode('id', safe_chars:'')"
),
i -> {
i.startRecord("1");
Expand All @@ -4056,7 +4056,7 @@ public void shouldUriEncodePathSegmentWithoutSafeChars() {
},
o -> {
o.get().startRecord("1");
o.get().literal("id", "%2FDE%2DA96%3A%25%20%283%29%23%21");
o.get().literal("id", "%2FDE%2DA96%3A%25+%283%29%23%21");
o.get().endRecord();
}
);
Expand Down

0 comments on commit 9bf5307

Please sign in to comment.