Lines 255-264
subtest 'is_valid' => sub {
Link Here
|
255 |
is(Koha::Email->is_valid('Fróm <from@example.com>'), 1); |
255 |
is(Koha::Email->is_valid('Fróm <from@example.com>'), 1); |
256 |
is(Koha::Email->is_valid('from@example.com'), 1); |
256 |
is(Koha::Email->is_valid('from@example.com'), 1); |
257 |
is(Koha::Email->is_valid('<from@example.com>'), 1); |
257 |
is(Koha::Email->is_valid('<from@example.com>'), 1); |
|
|
258 |
is(Koha::Email->is_valid('root@localhost'), 1); # See bug 28017 |
258 |
|
259 |
|
259 |
is(Koha::Email->is_valid('<from@fróm.com>'), 0); # "In accordance with RFC 822 and its descendants, this module demands that email addresses be ASCII only" |
260 |
is(Koha::Email->is_valid('<from@fróm.com>'), 0); # "In accordance with RFC 822 and its descendants, this module demands that email addresses be ASCII only" |
260 |
isnt(Koha::Email->is_valid('@example.com'), 1); |
261 |
isnt(Koha::Email->is_valid('@example.com'), 1); |
261 |
isnt(Koha::Email->is_valid('example.com'), 1); |
262 |
isnt(Koha::Email->is_valid('example.com'), 1); |
262 |
isnt(Koha::Email->is_valid('root@localhost'), 1); |
|
|
263 |
isnt(Koha::Email->is_valid('from'), 1); |
263 |
isnt(Koha::Email->is_valid('from'), 1); |
264 |
}; |
264 |
}; |
265 |
- |
|
|