Index: trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 9693)
+++ trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 9701)
@@ -24,4 +24,5 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.WayData;
+import org.openstreetmap.josm.tools.date.DateUtils;
 
 /**
@@ -381,6 +382,9 @@
     }
 
-    @Test
-    public void testFooTypeBar() throws Exception {
+    /**
+     * Compiles "foo type bar" and tests the parse error message
+     */
+    @Test
+    public void testFooTypeBar() {
         try {
             SearchCompiler.compile("foo type bar");
@@ -390,3 +394,17 @@
         }
     }
+
+    /**
+     * Search for primitive timestamps.
+     * @throws ParseError if an error has been encountered while compiling
+     */
+    @Test
+    public void testTimestamp() throws ParseError {
+        final Match search = SearchCompiler.compile("timestamp:2010/2011");
+        final Node n1 = new Node();
+        n1.setTimestamp(DateUtils.fromString("2010-01-22"));
+        assertTrue(search.match(n1));
+        n1.setTimestamp(DateUtils.fromString("2016-01-22"));
+        assertFalse(search.match(n1));
+    }
 }
