File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
main/java/ru/mystamps/web/feature/series/importing
test/groovy/ru/mystamps/web/feature/series/importing Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ public class SeriesInfoExtractorServiceImpl implements SeriesInfoExtractorServic
79
79
private static final Pattern RUB_CURRENCY_REGEXP = Pattern .compile ("[0-9][ ]?р(уб|\\ .)" );
80
80
81
81
// Regular expression that matches Ukrainian hryvnia.
82
- private static final Pattern UAH_CURRENCY_REGEXP = Pattern .compile ("[0-9] грн" );
82
+ private static final Pattern UAH_CURRENCY_REGEXP = Pattern .compile ("( [0-9] | \\ b) грн\\ b " );
83
83
84
84
// Regular expression that matches US dollar.
85
85
private static final Pattern USD_CURRENCY_REGEXP = Pattern .compile ("[0-9]\\ $" );
Original file line number Diff line number Diff line change @@ -670,6 +670,8 @@ class SeriesInfoExtractorServiceImplTest extends Specification {
670
670
fragment | _
671
671
' CAD' | _
672
672
' труб' | _
673
+ ' агрн' | _
674
+ ' грном' | _
673
675
}
674
676
675
677
def ' extractCurrency() should extract exactly specified currency' () {
@@ -710,6 +712,7 @@ class SeriesInfoExtractorServiceImplTest extends Specification {
710
712
service. extractCurrency(fragment) == ' UAH'
711
713
where :
712
714
fragment | _
715
+ ' грн' | _
713
716
' 135.74 грн' | _
714
717
}
715
718
You can’t perform that action at this time.
0 commit comments