diff --git a/src/test/java/org/jabref/gui/util/comparator/NumericFieldComparatorTest.java b/src/test/java/org/jabref/gui/util/comparator/NumericFieldComparatorTest.java index be11abf0abe..ab96cc42daa 100644 --- a/src/test/java/org/jabref/gui/util/comparator/NumericFieldComparatorTest.java +++ b/src/test/java/org/jabref/gui/util/comparator/NumericFieldComparatorTest.java @@ -62,4 +62,15 @@ public void compareWithPlusString() { public void compareWordWithMinus() { assertEquals(-1, comparator.compare("-abc", "-5")); } + + @Test + void compareNumericSignalWithoutNumberWithLenghtBiggerThanOne() { + assertEquals(2, comparator.compare("- ", "+ ")); + } + + @Test + void compareNumericSignalAfterNumber() { + assertEquals(-2, comparator.compare("5- ", "7+ ")); + } + }