From 2d20c8e269a502945e981662abe1f7818090a618 Mon Sep 17 00:00:00 2001 From: cyberta Date: Tue, 22 Nov 2022 16:37:59 +0100 Subject: improve pattern matching for getFormattedDateWithTimezone() test --- app/src/test/java/se/leap/bitmaskclient/base/utils/DateHelperTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/src/test/java/se/leap/bitmaskclient/base/utils/DateHelperTest.java b/app/src/test/java/se/leap/bitmaskclient/base/utils/DateHelperTest.java index 3d38cb8a..2651a64d 100644 --- a/app/src/test/java/se/leap/bitmaskclient/base/utils/DateHelperTest.java +++ b/app/src/test/java/se/leap/bitmaskclient/base/utils/DateHelperTest.java @@ -11,7 +11,7 @@ public class DateHelperTest { @Test public void getFormattedDateWithTimezone() { - Pattern datePattern = Pattern.compile("^10 Nov 22 11:26 [+-][0-9]{4}$"); + Pattern datePattern = Pattern.compile("^10 Nov 22 [1]?[0-9]:26 [+-][0-9]{4}$"); String formattedDate = DateHelper.getFormattedDateWithTimezone(1668075969744L); Matcher matcher = datePattern.matcher(formattedDate); System.out.println(formattedDate); -- cgit v1.2.3