<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://hg.omfa.de/prosody-hg/</link>
    <language>en-us</language>

    <title>prosody-hg: spec/util_argparse_spec.lua history</title>
    <description>spec/util_argparse_spec.lua revision history</description>
    <item>
    <title>util.argparse: Rename kv_params to bool_params, remove support for arbitrary values</title>
    <link>http://hg.omfa.de/prosody-hg/log/aac30c5ee334/spec/util_argparse_spec.lua</link>
    <description><![CDATA[util.argparse: Rename kv_params to bool_params, remove support for arbitrary values<br/>
<br/>
We have value_params now, which has overlapping behaviour and support<br/>
for '--foo bar' as well as '--foo=bar' (only the latter syntax is supported by<br/>
kv_params).<br/>
<br/>
The remaining unique property of kv_params is that when used without a value,<br/>
i.e. '--foo' then it defaults to boolean true, and when used as '--no-foo' it<br/>
defaults to boolean false. This is a useful thing that value_params don't do.<br/>
<br/>
So this commit officially renames kv_params to bool_params (kv_params is still<br/>
allowed for now, for some backwards compatibility).<br/>
<br/>
Breaking change though: if any kv_params expected a value, it will no longer<br/>
work (--foo=bar will not work). In this case the param should be moved to<br/>
value_params.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Thu, 19 Jun 2025 11:19:13 +0100</pubDate>
</item>
<item>
    <title>util.argparse: Fix bug (regression?) in argument parsing with --foo=bar</title>
    <link>http://hg.omfa.de/prosody-hg/log/81856814d74f/spec/util_argparse_spec.lua</link>
    <description><![CDATA[util.argparse: Fix bug (regression?) in argument parsing with --foo=bar<br/>
<br/>
After recent changes, '--foo bar' was working, but '--foo=bar' was not. The<br/>
test had a typo (?) (bar != baz) and because util.argparse is not strict by<br/>
default, the typo was not caught.<br/>
<br/>
The typo caused the code to take a different path, and bypassed the buggy<br/>
handling of --foo=bar options.<br/>
<br/>
I've preserved the existing test (typo and all!) because it's still an<br/>
interesting test, and ensures no unintended behaviour changes compared to the<br/>
old code.<br/>
<br/>
However I've added a new variant of the test, with strict mode enabled and the<br/>
typo fixed. This test failed due to the bug, and this commit introduces a fix.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Tue, 11 Mar 2025 18:27:36 +0000</pubDate>
</item>
<item>
    <title>util.argparse: Add strict mode + tests</title>
    <link>http://hg.omfa.de/prosody-hg/log/48c056c10e5a/spec/util_argparse_spec.lua</link>
    <description><![CDATA[util.argparse: Add strict mode + tests]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Mon, 17 Feb 2025 18:24:23 +0000</pubDate>
</item>
<item>
    <title>util.argparse: Add support for repeatable parameters</title>
    <link>http://hg.omfa.de/prosody-hg/log/4ee9a912ceea/spec/util_argparse_spec.lua</link>
    <description><![CDATA[util.argparse: Add support for repeatable parameters<br/>
<br/>
These are gathered into arrays]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Wed, 05 Jan 2022 04:46:27 +0100</pubDate>
</item>
<item>
    <title>util.argparse: Revise 553c6204fe5b with a different approach</title>
    <link>http://hg.omfa.de/prosody-hg/log/cc84682b8429/spec/util_argparse_spec.lua</link>
    <description><![CDATA[util.argparse: Revise 553c6204fe5b with a different approach<br/>
<br/>
The second return value is (not insensibly) assumed to be an error. Instead of<br/>
returning a value there in the success case, copy the positional arguments<br/>
into the existing opts table.]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Mon, 25 Apr 2022 15:24:56 +0100</pubDate>
</item>
<item>
    <title>util.argparse: Add test for #1691</title>
    <link>http://hg.omfa.de/prosody-hg/log/97c1399720c2/spec/util_argparse_spec.lua</link>
    <description><![CDATA[util.argparse: Add test for #1691]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Tue, 12 Oct 2021 14:54:04 +0200</pubDate>
</item>
<item>
    <title>util.argparse: Tests</title>
    <link>http://hg.omfa.de/prosody-hg/log/d2a939e21671/spec/util_argparse_spec.lua</link>
    <description><![CDATA[util.argparse: Tests]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Tue, 12 Oct 2021 14:48:21 +0200</pubDate>
</item>

  </channel>
</rss>
