From 9bf530703ceeb8d80283a6855bc3d4c43e6efaab Mon Sep 17 00:00:00 2001 From: Pascal Christoph Date: Tue, 21 Nov 2023 17:04:55 +0100 Subject: [PATCH] Fix README; adapt test to fit tests name Complements 078b461a10c82f1886b780685b1b85e0c7ad6ffd. --- README.md | 7 ++++--- .../java/org/metafacture/metafix/MetafixMethodTest.java | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 861d2da1..1a08e236 100644 --- a/README.md +++ b/README.md @@ -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(""[, ...]) diff --git a/metafix/src/test/java/org/metafacture/metafix/MetafixMethodTest.java b/metafix/src/test/java/org/metafacture/metafix/MetafixMethodTest.java index c4058238..58788e71 100644 --- a/metafix/src/test/java/org/metafacture/metafix/MetafixMethodTest.java +++ b/metafix/src/test/java/org/metafacture/metafix/MetafixMethodTest.java @@ -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"); @@ -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(); } );