aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* util.stanza: Handle Clark notation for attributes in :find()Kim Alvefur8 days1-0/+1
|
* util.stanza: Handle namespace prefixes for attributes in :find()Kim Alvefur8 days2-3/+6
| | | | | | More correct handling of namespaces here. This works with both prefixes from the parser and hacky .attr["foo:bar"]
* util.queue: tests: Add test for :replace() methodMatthew Wild13 days1-0/+19
|
* util.pubsub: Add method returning subset of config as metadataKim Alvefur2024-11-081-0/+10
| | | | | | Allows granting read only access to other sets of users using a separate access control capability, which makes sense as some properties may be intended to be public but read-only.
* scansion: Remove publisher attribute from bookmarks2 testsKim Alvefur2024-10-311-2/+2
| | | | | Seems exposing publisher is not enabled in mod_pep, but then it'll be the user themselves most of the time
* scansion: Import XEP-0402 test from prosody-modules rev 2c6b14207271Kim Alvefur2024-10-311-0/+181
| | | | This corresponds to the file mod_bookmarks2/tests/bookmarks2.scs
* util.crypto: Add more ECC methodsStephen Paul Weber2024-10-291-0/+21
| | | | | | | pkey_meth_derive: to derive a shared symmetric key from two ECC keys pkey_meth_public_raw: to get the raw form of the public key import_public_ec_raw: to import the raw form of the public key generate_p256_keypair: key generation for the P-256 curve
* util.pubsub: Fix test to account for not using util.errorKim Alvefur2024-10-291-1/+1
|
* util.error: Use is_error() instead of is_err() everywhereKim Alvefur2024-10-291-7/+7
| | | | Continuation of 4b39691a274e
* util.xtemplate: Fix error on applying each() to zero stanzasKim Alvefur2024-07-111-0/+4
|
* Merge 0.12->trunkKim Alvefur2024-06-121-0/+2
|\
| * scansion: Enable blocklist compat during tests to fix CIKim Alvefur2024-06-121-0/+2
| |
* | scansion: Add roster groups setting to pubsub form in testsKim Alvefur2024-06-124-0/+6
| |
* | util.bit53: Add bnot() methodMatthew Wild2024-03-011-0/+4
| |
* | util.strbitop: Remove unused import in testsMatthew Wild2024-02-231-1/+1
| |
* | util.strbitop: Add common_prefix_bits() methodMatthew Wild2024-02-231-0/+44
| | | | | | | | | | This returns the number of bits that two strings have in common. It is significantly more efficient than similar calculations in Lua.
* | util.ip: Add another test case for match() and commonPrefixLength()Matthew Wild2024-02-231-0/+4
| |
* | util.strbitop: Rename spec file to correct name so tests actually runMatthew Wild2024-02-231-0/+0
| |
* | util.rfc6724: Remove, unused since introduction of Happy EyeballsKim Alvefur2024-02-221-97/+0
| | | | | | | | | | | | | | | | It was mainly used to determine whether to try IPv6 or IPv4 first, following the rules for this in the RFC. Now we always try IPv6 and IPv4 at roughly the same time, thus there no need to carry these rules.
* | MUC: Record reason for affiliation changes and return in list (fixes #1227)Kim Alvefur2021-08-081-0/+72
| |
* | MUC: Test that <subject/> + <thread/> is not handled as subject changeKim Alvefur2024-01-231-0/+29
| | | | | | | | | | Ref #667 Ref #1838
* | Merge 0.12->trunkKim Alvefur2023-12-171-0/+26
|\|
| * mod_disco: Advertise disco#info and #items on bare JIDs to fix #1664Kim Alvefur2023-12-171-0/+26
| | | | | | | | | | | | | | | | Having to add these in *there* places seems less than ideal. I would also think that advertising disco#info is a bit redundant, since it is a requirement for everything in XMPP and if it was missing you would get an error back.
* | scansion: Use new style for accessing Lua globalsKim Alvefur2023-12-171-1/+1
| |
* | scansion: Use new prosody namespace in importKim Alvefur2023-12-171-1/+1
| |
* | scansion: Use captures or wildcards instead of mocking timeKim Alvefur2023-12-175-24/+14
| | | | | | | | | | > Mockery is one of the things I hold dear! And he's making a mockery of it!! -- Belkar Bitterleaf
* | util.xtemplate: Test the each template functionKim Alvefur2023-12-161-0/+8
| | | | | | | | | | | | | | | | It iterates over childtags, so a template like {foo|each{...}} would be equivalent to root:childtags("foo"), while a deeper query needs the bit that becomes arguments to :childtags as an argument to each, e.g. {foo/bar|each(baz)} would behave like root:get_child("foo"):get_child("bar"):childtags("baz")
* | mod_storage_internal, tests: Fix before/after combined with the 'reverse' flagMatthew Wild2023-12-121-0/+24
| |
* | util.http: Silence strict luacheck warning in testsKim Alvefur2023-12-091-0/+1
| |
* | core.moduleapi: Silence strict luacheck warnings in testsKim Alvefur2023-12-091-3/+3
| |
* | util.throttle: Silence some strict luacheck warningsKim Alvefur2023-12-091-0/+1
| |
* | util.xtemplate: Add some initial testsKim Alvefur2023-12-091-0/+35
| | | | | | | | Strict typing does not magically make code correct
* | util.jsonschema: Return basic structured validation responseKim Alvefur2023-12-021-0/+1
| |
* | Merge 0.12->trunkKim Alvefur2023-12-011-0/+27
|\|
| * net.http.parser: Reject overlarge header section earlierKim Alvefur2023-08-231-0/+27
| | | | | | | | This case would eventually be rejected by the buffer size limit.
| * util.array: Fix new() library functionKim Alvefur2023-07-221-0/+7
| | | | | | | | Backport of ffe4adbd2af9 since new was added in the 0.12 branch
* | util.human.io: Don't accept ambiguous durations by defaultMatthew Wild2023-11-301-1/+32
| | | | | | | | | | The new method parse_duration_lax() exports the old behaviour, mainly for compatibility purposes.
* | util.uuid: Add UUIDv7Kim Alvefur2021-08-151-0/+22
| | | | | | | | | | | | | | | | | | Allows sorting by id as a substitute for sorting by timestamp since it has the timestamp in the encoded in the first part, and only things that happen extremely close together may get out of order by such a sort, which might not matter. From draft-ietf-uuidrev-rfc4122bis formerly draft-peabody-dispatch-new-uuid-format
* | util.array: Fix new() library functionKim Alvefur2023-07-221-0/+7
| |
* | tests: Add hack to test only a single storage driverKim Alvefur2023-07-221-0/+5
| | | | | | | | | | Fixes that LuaDBI being unavailable makes these produce nothing but endless stack overflows in luarocks.
* | tests: Update storagemanager tests for prosody.* namespace changeKim Alvefur2023-07-221-8/+6
| | | | | | | | | | Part of an attempt to make these tests work again. Previously they would just explode in a million luarocks stack overflows
* | util.human.io: Add tests for parse_duration() (some failing)Kim Alvefur2023-07-161-0/+9
| |
* | util.human.io: Include relevant arguments in test messagesKim Alvefur2023-07-161-1/+1
| | | | | | | | This way the relevant arguments are shown in case a test case fails
* | util.human.io: Use tail call in test to get correct line numbersKim Alvefur2023-07-161-1/+1
| | | | | | | | | | | | This is probably not guaranteed to work and might vary with Lua version, but it's good enough for me to get accurate line numbers out of Busted that don't all point to the test() function.
* | util.cache: Pass cache itself to eviction callbackKim Alvefur2023-06-301-2/+1
| | | | | | | | | | | | | | Simplifies access to the cache without moving code around a lot given the currently common pattern of local some_cache = cache.new(size, function(k,v) end)
* | util.cache: Keep eviction candidate if callback resized to make roomKim Alvefur2023-06-301-0/+21
| | | | | | | | | | Previously either the old or the new values would be rejected, even if the cache was resized to allow more items.
* | util.argparse: Add support for repeatable parametersKim Alvefur2022-01-051-0/+5
| | | | | | | | These are gathered into arrays
* | storagemanager tests: Reorder test data in chronological orderKim Alvefur2021-05-111-13/+13
| | | | | | | | | | | | | | Why was the test data not in chronological order? Altho, maybe that was the point? Except for MAM, the data might *not* be in chronological order!
* | util.http: Implement parser for RFC 7239 Forwarded headerKim Alvefur2023-06-031-0/+21
| | | | | | | | | | | | | | | | Standardized and structured replacement for the X-Forwarded-For, X-Forwarded-Proto set of headers. Notably, this allows per-hop protocol information, unlike X-Forwarded-Proto which is always a single value for some reason.
* | util.sasl: Add basic tests for OAUTHBEARERKim Alvefur2023-05-261-0/+32
| |