aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
| * MergeMatthew Wild2020-09-301-0/+130
| |\
| | * util.dbuffer: Simplify test caseKim Alvefur2020-08-241-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | An earlier theory involved the bug being related to collapsing multiple items, so it exercised that too. Also correct the comment, it referred to the space in "hello world" in an earlier version before the test string was changed to "foobar", which was what was tested in a REPL
* | | Merge 0.11->trunkMatthew Wild2020-09-301-1/+19
|\| |
| * | util.indexedbheap: Fix heap datastructure corruption in ↵Waqas Hussain2020-09-291-0/+33
| |/ | | | | | | :reschedule(smaller_value)
* | util.error: Drop registry initialization with namespace as keyKim Alvefur2020-09-281-11/+4
| | | | | | | | Enough complexity with compact vs normal and with/without namespace
* | util.error: Expand compact registries into normal form internallyKim Alvefur2020-09-281-0/+32
| | | | | | | | Also the exposed form on the table returned from init()
* | util.error: Add a "compact mode" for registriesKim Alvefur2020-09-281-0/+21
| | | | | | | | Inspired by the older registry in pubsub.lib.lua
* | util.error: Cover registry initialization in testKim Alvefur2020-09-281-0/+20
| |
* | util.error: Collect Application-Specific Conditions from stanza errorsKim Alvefur2020-09-261-1/+2
| |
* | util.error: Extract error originator from stanza errorsKim Alvefur2020-09-261-1/+2
| |
* | util.stanza: Extract Application-Specific Condition from errorsKim Alvefur2020-09-261-0/+13
| | | | | | | | API change
* | spec.stanza spec: Split up util.error related testsKim Alvefur2020-09-261-0/+8
| |
* | util.stanza: Support Application-Specific Conditions in util.errorKim Alvefur2020-09-261-1/+13
| |
* | util.stanza: Get 'by' from context insteadKim Alvefur2020-09-261-1/+1
| | | | | | | | | | | | | | Zash> <error by=?> should go where? extra.by? context? source? Zash> In Prosody this would usually be module.host or a bare user/room JID MattJ> Zash: context MattJ> context.by, basically the opposite of context.actor
* | util.stanza: Support inclusion of <gone> URI from util.error objectKim Alvefur2020-09-261-0/+5
| |
* | util.stanza: Support getting 'by' from util.error objectKim Alvefur2020-09-261-1/+2
| |
* | util.error: Add well-known field 'extra'Kim Alvefur2020-09-261-0/+8
| | | | | | | | | | A place for various extra fields and edge cases of the stanza error data model, e.g. the URI field of <gone>
* | util.dataforms: Add support for validating (integer) rangesKim Alvefur2019-11-211-0/+9
| |
* | util.interpolation: Add test for ~ when value is false (not just nil)Matthew Wild2020-09-091-3/+7
| |
* | util.interpolation: Add '~' as the opposite of '&' (render sub-block if falsy)Matthew Wild2020-09-091-1/+11
| | | | | | | | One more magic character consumed!
* | util.event: Add luacheck annotation to unused parameter in testsMatthew Wild2020-09-031-1/+1
| |
* | util.events: Add set_debug_hook() methodMatthew Wild2020-09-031-0/+38
| | | | | | | | | | | | Hook signature: ret = debug_hook(handler, event_name, event_data)
* | util.jid: Add test coverage for XEP-0106: JID Escaping functionsKim Alvefur2020-08-281-0/+50
| |
* | util.dbuffer: Simplify test caseKim Alvefur2020-08-241-3/+2
| | | | | | | | | | | | | | | | | | An earlier theory involved the bug being related to collapsing multiple items, so it exercised that too. Also correct the comment, it referred to the space in "hello world" in an earlier version before the test string was changed to "foobar", which was what was tested in a REPL
* | util.dbuffer: Fix :sub() not working with partially-consumed chunks (thanks ↵Matthew Wild2020-08-241-1/+1
| | | | | | | | | | | | Zash for test case) This also appears to fix some bugs with chunk-encoded streams in net.http.parser.
* | util.dbuffer: Add failing test case involving :sub after :discardKim Alvefur2020-08-241-0/+9
| |
* | mod_external_services: XEP-0215: External Service DiscoveryKim Alvefur2020-07-182-0/+69
| |
* | net.http.parser: Allow configuration of the chunk size fed to the parserMatthew Wild2020-08-211-1/+3
| |
* | net.http.parser: Switch tests so that CRLF conversion of input data is optionalMatthew Wild2020-08-211-7/+10
| |
* | net.http.parser: Fix incorrect path in testMatthew Wild2020-08-211-1/+1
| |
* | net.http.parser: Add failing test for (large?) chunk-encoded responsesMatthew Wild2020-08-212-0/+27
| |
* | util.dbuffer: Fix traceback when :collapse() is called on empty bufferMatthew Wild2020-08-201-0/+12
| |
* | util.dataforms: Add more XEP-0211 media element test coverageKim Alvefur2020-08-161-0/+28
| |
* | util.dataforms: Convert media element sizes to avoid error on Lua 5.3Kim Alvefur2020-08-161-0/+15
| | | | | | | | | | | | | | | | The stanza API does not accept number values and threw an error due to the height and width attributes of the media element (XEP-0221). This part had no test coverage previously, explaining why it was not discovered until now.
* | net.http.parser: Allow specifying sink for large request bodiesKim Alvefur2020-08-011-3/+5
| | | | | | | | | | | | | | This enables uses such as saving uploaded files directly to a file on disk or streaming parsing of payloads. See #726
* | mod_server_contact_info: Add status-addresses fieldKim Alvefur2020-05-272-0/+4
| | | | | | | | XEP-0157 version 1.1.0
* | scansion/prosody.cfg: Fix typoKim Alvefur2020-07-091-1/+1
| |
* | util.indexedbheap: Add failing test case for #1572Kim Alvefur2020-07-081-0/+15
| | | | | | | | | | This approximates what happens if you add a timer far in the future, then reschedule it to right now.
* | util.dbuffer: If no bytes parameter passed to read, return remainder of ↵Matthew Wild2020-06-291-0/+15
| | | | | | | | frontmost chunk
* | util.human.io: Add brief test of table generationKim Alvefur2020-06-281-0/+29
| |
* | util.dbuffer: Don't use # operator in tests, Lua 5.1 doesn't support __lenMatthew Wild2020-06-281-1/+1
| |
* | util.dbuffer: dynamic string bufferMatthew Wild2020-06-261-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to util.ringbuffer (and shares almost identical API). Differences: - size limit is optional and dynamic - does not allocate a fixed buffer of max_size bytes - focus on simply storing references to existing string objects where possible, avoiding unnecessary allocations - references are still stored in a ring buffer to enable use as a fast FIFO Optional second parameter to new() provides the number of ring buffer segments. On Lua 5.2 on my laptop, a segment is ~19 bytes. If the ring buffer fills up, the next write will compact all strings into a single item.
* | util.ringbuffer: Fix accidentally committed test change (thanks buildbot)Matthew Wild2020-06-251-1/+1
| |
* | util.ringbuffer: Add some additional asserts to testsMatthew Wild2020-06-241-4/+4
| |
* | util.ringbuffer: Ensure unsigned chars are always returned from :byte()Matthew Wild2020-06-241-0/+7
| |
* | util.ringbuffer: Add test for :discard()Matthew Wild2020-06-231-0/+11
| |
* | scansion tests: Enable mod_muc_mam during tests (expect breakage)Kim Alvefur2020-06-211-0/+4
| |
* | MUC: Remove XEP-0091 Legacy Delayed Delivery from testKim Alvefur2020-06-211-1/+0
| | | | | | | | | | | | | | Long time Obsolete XEP. The element is apparently not included when mod_muc_mam is enabled, and deleting this seems like the sanity-preserving approach.
* | storage tests: Add tests for archive queries before/after specific idsMatthew Wild2020-06-121-5/+47
| | | | | | | | | | Also increased the size of the test data for easier debugging with more complex tests.
* | util.promise: Add all_settled, which follows semantics of allSettled from ES2020Matthew Wild2020-06-081-0/+54
| |