Merge pull request #522 from mwmiller/empty_reverse
Reverse: add guard against empty remainder.master
commit
d4ae639ddb
|
@ -19,6 +19,7 @@ zci answer_type => "reverse";
|
|||
|
||||
handle remainder => sub {
|
||||
|
||||
return unless $_; # Guard against empty query.
|
||||
#Filter out requests for DNA/RNA reverse complements, handled
|
||||
# by the ReverseComplement goodie
|
||||
return if $_ =~ /^complement\s(of )?[ATCGURYKMSWBVDHN\s-]+$/i;
|
||||
|
|
|
@ -15,6 +15,7 @@ ddg_goodie_test(
|
|||
'reverse bla' => test_zci('Reversed "bla": alb'),
|
||||
'reverse blabla' => test_zci('Reversed "blabla": albalb'),
|
||||
'reverse esrever' => test_zci('Reversed "esrever": reverse'),
|
||||
'reverse' => undef,
|
||||
|
||||
#Should not trigger on a request for DNA/RNA reverse complement
|
||||
'reverse complement of ATG-CTA-GGG-GCT' => undef,
|
||||
|
|
Loading…
Reference in New Issue