emacs/test/src
Pierre Téchoueyres 7541b06872 Add support for base64url variant of base-64 encoding/decoding
Implement the RFC4648 variant of base64 encoding used by URLs.
* doc/lispref/text.texi (base64url-encode-region,
base64url-encode-string): Document new functions.
(base64-decode-region, base64-decode-string): Document new optional
parameter 'base64url' used to use url variant when decoding data.

* src/fns.c (base64url-encode-region, base64url-encode-region): New
functions to manage url variant.
(base64-decode-region, base64-decode-string): Add optional
parameter to indicate use of url-variant.
(base64_encode_region_1, base64_encode_string_1): Internal functions
with extracted code from 'base64_encode_region' and
'base64_encode_string' and optional parameters to manage padding and
url variant.
(base64-encode-region, base64-encode-string) : Use
base64_encode_region_1 and base64_encode_string_1.
(base64-encode-1): Add parameters to manage padding and url variant.
(base64-decode-1): Add parameter to manage url variant.

* test/src/fns-tests.el (fns-tests--with-region): New helper macro to
test region variant of base64 encode / decode functions.
(fns-tests--string-repeat): Helper function used in base64 tests.
(fns-tests-base64-encode-region, fns-tests-base64-encode-string):
Tests for standard base64 function.
(fns-test-base64url-encode-region,
fns-test-base64url-encode-string): Tests for url variant.
(fns-tests-base64-decode-string): Tests for decoding part.
2019-06-08 10:49:35 +03:00
..
regex-resources
alloc-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
buffer-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
callint-tests.el Update more copyright years 2018-12-31 18:47:22 -08:00
callproc-tests.el Minor change in a comment 2019-04-15 19:11:16 +03:00
casefiddle-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
charset-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
chartab-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
cmds-tests.el forward-line now works with bignums 2019-01-27 15:52:06 -08:00
coding-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
data-tests.el Merge from origin/emacs-26 2019-02-15 13:25:30 -08:00
decompress-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
doc-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
editfns-tests.el * test/lisp/progmodes/python-tests.el: "Fix" failing test 2019-04-10 10:39:50 -04:00
emacs-module-tests.el Use extract_time in test module. 2019-05-05 01:34:07 +02:00
eval-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
fileio-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
floatfns-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
fns-tests.el Add support for base64url variant of base-64 encoding/decoding 2019-06-08 10:49:35 +03:00
font-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
inotify-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
json-tests.el Small fix for a JSON unit test. 2019-04-23 12:00:32 +02:00
keyboard-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
keymap-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
lcms-tests.el Go back to "Maintainer: emacs-devel@gnu.org" 2019-05-25 14:25:18 -07:00
lread-tests.el Make warning about unescaped character literals more helpful. 2019-04-19 19:19:35 +02:00
marker-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
minibuf-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
print-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
process-tests.el Remove :stop key from make-process. 2019-04-19 14:03:16 +02:00
regex-emacs-tests.el More regexp corrections and tweaks 2019-03-10 23:11:21 -07:00
syntax-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
textprop-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
thread-tests.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
timefns-tests.el Fix decode-time/encode-time roundtrip on macOS 2019-04-30 10:47:17 -07:00
undo-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
xml-tests.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00