Moved error-lambda out, there's currently two predefined ones. One
that does allow failover and one that doesn't. This also kills the
newly introduced no-failover key. But it's for the better anyways.
This will make it much easier to actually do proper testing of
different cases in the code that simply wasn't possible before.
Also added a test of running the success lambda.
Added a flag to `webpaste-provider' to disable the failover mechanic
so one can create private providers which failovers to public
providers and leaks data.
This makes it easier to make custom pasting functions that will try a
spacific provider to begin with, it won't *only* try that provider
since the failover is the same as always which might be suboptimal, I
would like to make that an option so one can decide to only ever use
one provider and just fail if one wants to.
This is good if you have internal systems at offices for example, that
you have an internal paste provider for example github
enterprise. Then you don't want it to go try some other provider
afterwards.
This was the first test I wrote, which also tested provider
priority. But now I have separate tests for provider priority so it
didn't need to be as complex anymore.
"test-helper.el" isn't a library intended to be loaded with `require`.
Instead it is loaded with `load`. Because of that, it is confusing to
provide a feature using `provide` anyway. And because around 70 other
packages come with a file named "test-helper.el" and several dozen of
those still provide the feature `test-helper`, this also leads to a,
admittedly somewhat theoretical, feature conflict.
This is also discussed at https://github.com/rejeep/ert-runner.el/issues/38.