aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/helper/PatternBuilderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/org/traccar/helper/PatternBuilderTest.java')
-rw-r--r--test/org/traccar/helper/PatternBuilderTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/org/traccar/helper/PatternBuilderTest.java b/test/org/traccar/helper/PatternBuilderTest.java
new file mode 100644
index 000000000..a36481934
--- /dev/null
+++ b/test/org/traccar/helper/PatternBuilderTest.java
@@ -0,0 +1,14 @@
+package org.traccar.helper;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class PatternBuilderTest {
+
+ @Test
+ public void testPatternBuilder() {
+ Assert.assertEquals("\\$GPRMC", new PatternBuilder().txt("$GPRMC").toString());
+ Assert.assertEquals("(\\d{2}\\.\\p{XDigit}+)", new PatternBuilder().num("(dd.x+)").toString());
+ }
+
+}