96 Commits

Author SHA1 Message Date
Zoltán Kéri
d802a4e9fa encoding/base32: Fix padding validation for malformed input
Fix a bug where padding characters in the middle of input were
not detected when there was no trailing padding.

The "verify no padding in middle" check was inside `if
padding_count > 0`, so inputs like "MZ===YTBMZXW6YTB" would
incorrectly pass validation.

Test case added for this edge case.
2025-12-27 04:30:37 +01:00
Jeroen van Rijn
1fb95dade2 Expand base64 tests to include roundtrip 2025-11-22 15:44:19 +01:00
Jeroen van Rijn
aec7d6480b Package lines for base32, move its tests to tests" 2025-10-09 15:27:53 +02:00
Laytan Laats
9eefa2006e encoding/cbor: support simd vectors 2025-06-04 22:00:02 +02:00
Laytan Laats
85224b21e6 encoding/cbor: support the matrix type 2025-06-04 21:51:12 +02:00
Jeroen van Rijn
062a3c2fae Fix parsing of CDATA tags (#5059)
Fixes #5054
2025-04-19 20:25:44 +02:00
jkenda
51b80c5a20 encoding/json: marshal enumerated arrays to objects with key-value pairs 2025-02-01 10:32:07 +01:00
gingerBill
a300a860ec Add #+feature dynamic-literals to tests 2025-01-05 13:46:58 +00:00
Jeroen van Rijn
1a0a6c485d Add comment explaining #4515 test. 2024-11-25 13:47:04 +01:00
Jeroen van Rijn
2dc0187836 Test #4515 2024-11-25 13:16:27 +01:00
Laytan Laats
4608d26e6e encoding/cbor: fix skipping of ignored/missing fields in struct unmarshal 2024-10-26 22:39:46 +02:00
Laytan Laats
793ef6012b encoding/cbor: handle binary having more fields than the struct by discarding 2024-10-25 20:37:55 +02:00
Feoramund
1f04f541cf Fix -vet and -strict-style failures in tests 2024-08-26 16:20:08 -04:00
Laytan Laats
912f99abc8 encoding/cbor: various fixes
- "null" is the proper way to represent the nil value in the diagnostic
  format
- hex encoding in diagnostic format was wrong
- struct keys weren't sorted the right deterministic way
2024-08-09 21:56:54 +02:00
Jeroen van Rijn
fc5ce30f34 Allow json to unmarshal empty struct. 2024-07-21 00:37:11 +02:00
Ronald
e0a8bd04d5 Ensure deletion of maybe is delayed until we're finished with it. 2024-07-20 17:10:34 +01:00
Ronald
f560b14d10 Fix typo in name of test 2024-07-20 17:10:19 +01:00
Ronald
b584eeaade Add encoding/ini tests 2024-07-20 16:53:54 +01:00
VladPavliuk
3f8712edb0 Merge branch 'master' into json-add-int-key-map-support 2024-07-14 18:22:20 +03:00
gingerBill
8642d719f0 Imply #no_capture to all variadic parameters 2024-07-14 12:19:47 +01:00
gingerBill
c7bd954752 Add more uses of #no_capture 2024-07-14 11:56:04 +01:00
VladPavliuk
76fe5d1346 Align ignore syntax of json tags with fmt, cbor 2024-07-14 00:21:05 +03:00
VladPavliuk
64ae99f016 Add support of ignore tag for json.marshal 2024-07-13 14:13:59 +03:00
VladPavliuk
79e2f63182 Small code refactoring in test_core_json 2024-07-13 00:38:58 +03:00
VladPavliuk
39983eaaa4 Remove unused imports in test_core_json 2024-07-13 00:26:54 +03:00
VladPavliuk
dbdad0476d Allow to marshal and unmarshal maps with int keys 2024-07-13 00:07:48 +03:00
gingerBill
b0cbda4ee0 Fix indentation of tests 2024-06-29 18:51:28 +01:00
Feoramund
8a4a3ed66e Change how Time is constructed in uuid 2024-06-22 18:21:32 -04:00
Feoramund
5a75cac5b9 Add API for creating custom version 8 UUIDs 2024-06-22 18:21:32 -04:00
Feoramund
e9b882be05 Add vendor-specific version 8 UUID generation (hashing) 2024-06-22 18:21:32 -04:00
Feoramund
859cbf7d72 Test if v1 and v6 UUID node is set correctly 2024-06-22 18:21:32 -04:00
Feoramund
d559feb701 Add uuid test for timestamps 2024-06-22 18:21:32 -04:00
Feoramund
f6344577d3 Add UUID sorting tests 2024-06-22 18:21:32 -04:00
Feoramund
95a9c9b016 Fix indentation 2024-06-22 18:21:32 -04:00
Feoramund
9b3a104640 Add buffer-based to_string to uuid package 2024-06-22 18:21:32 -04:00
Feoramund
9b265b2309 Improve time-related API in uuid package
- Let timestamps be specified by the user.
- Change `time_v*` to `raw_time_v*` and implement an API that returns
  timestamps from the `time` package.
2024-06-22 18:21:32 -04:00
Feoramund
fcdba334ea Require CSPRNG in UUID generation where applicable 2024-06-22 18:21:31 -04:00
Feoramund
3aa232a894 Move v3 and v5 UUID procs to uuid/legacy 2024-06-22 18:21:31 -04:00
Feoramund
9866b54d59 Add version 6 UUID generation 2024-06-22 18:21:31 -04:00
Feoramund
525bfca4ef Add version 1 UUID generation 2024-06-22 18:21:31 -04:00
Feoramund
4cfbd83b10 Add version 7 UUID generation 2024-06-22 18:21:31 -04:00
Feoramund
6da99b888a Make UUID Identfier only a distinct byte array 2024-06-22 18:21:31 -04:00
Feoramund
4dacddd85e Add core:encoding/uuid 2024-06-22 18:21:27 -04:00
Jeroen van Rijn
2fe961cbcd Fold XML attribute whitespace. 2024-06-12 13:30:00 +02:00
Jeroen van Rijn
ebadff555d Update XML reader to normalize whitespace, part 1. 2024-06-12 12:52:48 +02:00
Jeroen van Rijn
9d0f4833bf Port tests\core\encoding\xml
Made them run in parallel as well.
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
6641a6f6c9 Port tests\core\encoding\varint 2024-06-02 14:47:08 -04:00
Jeroen van Rijn
601df0e8f7 Port tests\core\encoding\json 2024-06-02 14:47:08 -04:00
Jeroen van Rijn
1b32e27aa4 Port tests\core\encoding\hxa
And fix a few leaks in `core:encoding/hxa` while at it.
2024-06-02 14:47:08 -04:00
Jeroen van Rijn
3404dea8ac Port tests\encoding\hex 2024-06-02 14:47:08 -04:00