[DRE-maint] Bug#840664: ruby-faker: FTBFS randomly (failing tests)

Santiago Vila sanvila at unex.es
Mon Oct 31 12:06:09 UTC 2016


I said:

> Try generating a lot of random emails and stop at the first one that
> does not meet the above assert (and then print the generated email address).

Something like this:

#!/usr/bin/ruby
require 'faker'
while true do
  email = Faker::Internet.email
  if not email.match(/.+@[^.].+\.\w+/)
    printf("%s\n", email)
  end
end

[ Sorry if that's not good style, I don't know ruby at all ].

Unfortunately, I have been running this for a while without any result.

A better strategy would be probably to analyze the code and try to
prove that it "must" work (in Knuth style). Since we do know that
it does not always work, we should fail at proving that, and discover
what's wrong while trying.

Stupid question: Should this really be [^.].+\. or maybe [^.]+\. ?

Thanks.



More information about the Pkg-ruby-extras-maintainers mailing list