Skip to content

Commit

Permalink
Merge pull request #79 from abes-esr/develop
Browse files Browse the repository at this point in the history
merge dev to test
  • Loading branch information
pierre-maraval authored Mar 22, 2024
2 parents 5554870 + 6bb076a commit eb92357
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<groupId>fr.abes</groupId>
<artifactId>sudoc</artifactId>
<version>0.0.7</version>
<version>0.0.8-SNAPSHOT</version>
<packaging>jar</packaging>
<name>sudoc</name>
<description>webservices de récupération de ppns dans le sudoc</description>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/abes/sudoc/service/IsbnService.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public IsbnService(BaseXmlFunctionsCaller caller) {

@Override
public boolean checkFormat(String isbn) {
return isbn != null && isbn.matches("^[0-9]((?:-?[0-9]){9}|(?:-?[0-9]){12})$");
return isbn != null && isbn.matches("^[0-9]((?:-?[0-9]){9}|(?:-?[0-9]){8}X|(?:-?[0-9]){12})$");
}

@Override
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/fr/abes/sudoc/service/IsbnServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ void checkFormatIsbn10Characters() {

String isbn6 = "-22225-555---3--1";
Assertions.assertFalse(isbnService.checkFormat(isbn6));

String isbn7 = "274758450X";
Assertions.assertTrue(isbnService.checkFormat(isbn7));
}

@Test
Expand Down

0 comments on commit eb92357

Please sign in to comment.