Skip to content

Commit

Permalink
Make sure that JabRef#2334 is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Dec 10, 2016
1 parent 32667df commit 4533e73
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
The pattern can be specified in the settings like the filename pattern. [#1092](https://github.com/JabRef/jabref/issues/1092)

### Fixed
- We fixed a few groups related issues:
- "Remove entries from group" no longer removes entries from groups with similar names. [#2334](https://github.com/JabRef/jabref/issues/2334)
- We fixed an issue which prevented JabRef from closing using the "Quit" menu command. [#2336](https://github.com/JabRef/jabref/issues/2336)
- We fixed an issue where the file permissions of the .bib-file were changed upon saving [#2279](https://github.com/JabRef/jabref/issues/2279).
- We fixed an issue which prevented that a database was saved successfully if JabRef failed to generate new BibTeX-keys [#2285](https://github.com/JabRef/jabref/issues/2285).
Expand Down
17 changes: 17 additions & 0 deletions src/test/java/net/sf/jabref/model/groups/ExplicitGroupTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,21 @@ public void addDuplicateGroupDoesNotChangeGroupsField() throws Exception {
assertEquals(Optional.of("myExplicitGroup"), entry.getField(FieldName.GROUPS));
}

@Test
// For https://github.com/JabRef/jabref/issues/2334
public void removeDoesNotChangeFieldIfContainsNameAsPart() throws Exception {
entry.setField(FieldName.GROUPS, "myExplicitGroup_alternative");
group.remove(entry);

assertEquals(Optional.of("myExplicitGroup_alternative"), entry.getField(FieldName.GROUPS));
}

@Test
// For https://github.com/JabRef/jabref/issues/2334
public void removeDoesNotChangeFieldIfContainsNameAsWord() throws Exception {
entry.setField(FieldName.GROUPS, "myExplicitGroup alternative");
group.remove(entry);

assertEquals(Optional.of("myExplicitGroup alternative"), entry.getField(FieldName.GROUPS));
}
}

0 comments on commit 4533e73

Please sign in to comment.