Subject: | Test failures due to localized error messages |
The test suite may fail if a non-English locale is in effect. For example:
# Failed test 'threw Regexp ((?^i:duplicate key value violates unique constraint))'
# at t/pref-basic.t line 79.
# expecting: Regexp ((?^i:duplicate key value violates unique constraint))
# found: DBIx::Class::Exception (DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: FEHLER: doppelter Schl<FC>sselwert verletzt Unique-Constraint "prf_unique_vals_value_prf_owner_type_id_name"
# DETAIL: Schl<FC>ssel "(value, prf_owner_type_id, name)=(colin@opusvl.com, 1, email)" existiert bereits. [for Statement "INSERT INTO prf_unique_vals ( name, prf_owner_type_id, value, value_id) VALUES ( ?, ?, ?, ? ) RETURNING id" with ParamValues: 1='email', 2='1', 3='colin@opusvl.com', 4='3'] at /usr/home/eserte/.cpan/build/2016022515/OpusVL-Preferences-0.20-asZ8wj/blib/lib/OpusVL/Preferences/RolesFor/Result/PrfOwner.pm line 195
# )
Maybe it can help if something like LC_ALL=C is forced in the test scripts. Or POSIX::setlocale is used.