diff --git a/core/src/test/java/hudson/UtilTest.java b/core/src/test/java/hudson/UtilTest.java index b8141a6360..8f7df2eb82 100644 --- a/core/src/test/java/hudson/UtilTest.java +++ b/core/src/test/java/hudson/UtilTest.java @@ -37,18 +37,18 @@ public class UtilTest extends TestCase { // We're still working on the assumption that a month is 30 days, so there will // be 5 days at the end of the year that will be "12 months" but not "1 year". // First check 359 days. - assertEquals("11 " + Messages.Util_month(), Util.getTimeSpanString(31017600000L)); + assertEquals("11 " + Messages.Util_month() + Messages.Util_timeSuffix(), Util.getTimeSpanString(31017600000L)); // And 362 days. - assertEquals("12 " + Messages.Util_month(), Util.getTimeSpanString(31276800000L)); + assertEquals("12 " + Messages.Util_month() + Messages.Util_timeSuffix(), Util.getTimeSpanString(31276800000L)); // 11.25 years - Check that if the first unit has 2 or more digits, a second unit isn't used. - assertEquals("11 " + Messages.Util_year(), Util.getTimeSpanString(354780000000L)); + assertEquals("11 " + Messages.Util_year() + Messages.Util_timeSuffix(), Util.getTimeSpanString(354780000000L)); // 9.25 years - Check that if the first unit has only 1 digit, a second unit is used. - assertEquals("9 " + Messages.Util_year() + " 3 " + Messages.Util_month(), Util.getTimeSpanString(291708000000L)); + assertEquals("9 " + Messages.Util_year() + Messages.Util_timeSuffix() + " 3 " + Messages.Util_month() + Messages.Util_timeSuffix(), Util.getTimeSpanString(291708000000L)); // 67 seconds - assertEquals("1 " + Messages.Util_minute() + " 7 " + Messages.Util_second(), Util.getTimeSpanString(67000L)); + assertEquals("1 " + Messages.Util_minute() + " 7 " + Messages.Util_second() + Messages.Util_timeSuffix(), Util.getTimeSpanString(67000L)); // 17 seconds - Check that times less than a minute only use seconds. - assertEquals("17 " + Messages.Util_second(), Util.getTimeSpanString(17000L)); + assertEquals("17 " + Messages.Util_second() + Messages.Util_timeSuffix(), Util.getTimeSpanString(17000L)); } }