Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java	(revision 8265)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java	(revision 8266)
@@ -8,4 +8,5 @@
 
 import java.io.StringReader;
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
@@ -26,5 +27,7 @@
 import org.openstreetmap.josm.data.osm.OsmUtils;
 import org.openstreetmap.josm.data.validation.Severity;
+import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.TagCheck;
+import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException;
 
 /**
@@ -39,4 +42,10 @@
     public static void setUp() {
         JOSMFixture.createUnitTestFixture().init();
+    }
+
+    static MapCSSTagChecker buildTagChecker(String css) throws ParseException {
+        final MapCSSTagChecker test = new MapCSSTagChecker();
+        test.checks.putAll("test", TagCheck.readMapCSS(new StringReader(css)));
+        return test;
     }
 
@@ -69,5 +78,5 @@
         n2.put("natural", "wood");
         assertFalse(check.evaluate(n2));
-        assertThat(MapCSSTagChecker.TagCheck.insertArguments(check.rule.selectors.get(0), "The key is {0.key} and the value is {0.value}"),
+        assertThat(MapCSSTagChecker.TagCheck.insertArguments(check.rule.selectors.get(0), "The key is {0.key} and the value is {0.value}", null),
                 is("The key is natural and the value is marsh"));
     }
@@ -89,4 +98,24 @@
 
     @Test
+    public void test9782() throws Exception {
+        final MapCSSTagChecker test = buildTagChecker("*[/.+_name/][!name] {" +
+                "throwWarning: tr(\"has {0} but not {1}\", \"{0.key}\", \"{1.key}\");}");
+        final OsmPrimitive p = OsmUtils.createPrimitive("way alt_name=Foo");
+        final Collection<TestError> errors = test.getErrorsForPrimitive(p, false);
+        assertThat(errors.size(), is(1));
+        assertThat(errors.iterator().next().getMessage(), is("has alt_name but not name"));
+    }
+
+    @Test
+    public void test10859() throws Exception {
+        final MapCSSTagChecker test = buildTagChecker("way[highway=footway][foot?!] {\n" +
+                "  throwWarning: tr(\"{0} used with {1}\", \"{0.value}\", \"{1.tag}\");}");
+        final OsmPrimitive p = OsmUtils.createPrimitive("way highway=footway foot=no");
+        final Collection<TestError> errors = test.getErrorsForPrimitive(p, false);
+        assertThat(errors.size(), is(1));
+        assertThat(errors.iterator().next().getMessage(), is("footway used with foot=no"));
+    }
+
+    @Test
     public void testInit() throws Exception {
         MapCSSTagChecker c = new MapCSSTagChecker();
