Those macros are useful because the example captcha scripts are copied in a path ejabberd-$VERSION/priv/bin tha depends on the ejabberd version number, and changes for each release. Also, depending on the install method (one that uses rebar3, or Elixir's mix), that $VERSION may be in XX.YY or in SEMVER format (respectively).
Thanks to @weiss for the semver_to_xxyy/1 function code.
Coverage decreased (-0.005%) to 33.604% when pulling 217e930dc7b3b9cecc1ea2741e179d0a32ed0e00 on badlop:captchaversion into fbf43f2a310bc011c5d4a4df0b9b786a55a14207 on processone:master.
Those macros are useful because the example captcha scripts are copied in a path
ejabberd-$VERSION/priv/bin
tha depends on the ejabberd version number, and changes for each release. Also, depending on the install method (one that uses rebar3, or Elixir's mix), that $VERSION may be inXX.YY
or inSEMVER
format (respectively).Thanks to @weiss for the
semver_to_xxyy/1
function code.