Index: trunk/test/data/renderer/node-text/data.osm
===================================================================
--- trunk/test/data/renderer/node-text/data.osm	(revision 11693)
+++ trunk/test/data/renderer/node-text/data.osm	(revision 11693)
@@ -0,0 +1,82 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<osm version='0.6' upload='true' generator='JOSM'>
+  <node id='-30552' action='modify' visible='true' lat='0.1' lon='0.1' >
+    <tag k='test' v='n21' />
+  </node>
+  <node id='-30554' action='modify' visible='true' lat='0.1' lon='0.3' >
+    <tag k='test' v='n22' />
+  </node>
+  <node id='-30556' action='modify' visible='true' lat='0.1' lon='0.5' >
+    <tag k='test' v='n23' />
+    <tag k='name' v='Test' />
+  </node>
+  <node id='-30558' action='modify' visible='true' lat='0.1' lon='0.7' >
+    <tag k='test' v='n24' />
+    <tag k='ref' v='Test' />
+  </node>
+  <node id='-30560' action='modify' visible='true' lat='0.1' lon='0.9' >
+    <tag k='test' v='n25' />
+  </node>
+  <node id='-30562' action='modify' visible='true' lat='0.3' lon='0.1' >
+    <tag k='test' v='n16' />
+  </node>
+  <node id='-30564' action='modify' visible='true' lat='0.3' lon='0.3' >
+    <tag k='test' v='n17' />
+  </node>
+  <node id='-30566' action='modify' visible='true' lat='0.3' lon='0.5' >
+    <tag k='test' v='n18' />
+  </node>
+  <node id='-30568' action='modify' visible='true' lat='0.3' lon='0.7' >
+    <tag k='test' v='n19' />
+    <tag k='highlight' v='yes' />
+  </node>
+  <node id='-30570' action='modify' visible='true' lat='0.3' lon='0.9' >
+    <tag k='test' v='n20' />
+    <tag k='disabled' v='yes' />
+  </node>
+  <node id='-30572' action='modify' visible='true' lat='0.5' lon='0.1' >
+    <tag k='test' v='n11' />
+  </node>
+  <node id='-30574' action='modify' visible='true' lat='0.5' lon='0.3' >
+    <tag k='test' v='n12' />
+  </node>
+  <node id='-30576' action='modify' visible='true' lat='0.5' lon='0.5' >
+    <tag k='test' v='n13' />
+  </node>
+  <node id='-30578' action='modify' visible='true' lat='0.5' lon='0.7' >
+    <tag k='test' v='n14' />
+  </node>
+  <node id='-30580' action='modify' visible='true' lat='0.5' lon='0.9' >
+    <tag k='test' v='n15' />
+  </node>
+  <node id='-30582' action='modify' visible='true' lat='0.7' lon='0.1' >
+    <tag k='test' v='n6' />
+  </node>
+  <node id='-30584' action='modify' visible='true' lat='0.7' lon='0.3' >
+    <tag k='test' v='n7' />
+  </node>
+  <node id='-30586' action='modify' visible='true' lat='0.7' lon='0.5' >
+    <tag k='test' v='n8' />
+  </node>
+  <node id='-30588' action='modify' visible='true' lat='0.7' lon='0.7' >
+    <tag k='test' v='n9' />
+  </node>
+  <node id='-30590' action='modify' visible='true' lat='0.7' lon='0.9' >
+    <tag k='test' v='n10' />
+  </node>
+  <node id='-30592' action='modify' visible='true' lat='0.9' lon='0.1' >
+    <tag k='test' v='n1' />
+  </node>
+  <node id='-30594' action='modify' visible='true' lat='0.9' lon='0.3' >
+    <tag k='test' v='n2' />
+  </node>
+  <node id='-30596' action='modify' visible='true' lat='0.9' lon='0.5' >
+    <tag k='test' v='n3' />
+  </node>
+  <node id='-30598' action='modify' visible='true' lat='0.9' lon='0.7' >
+    <tag k='test' v='n4' />
+  </node>
+  <node id='-30600' action='modify' visible='true' lat='0.9' lon='0.9' >
+    <tag k='test' v='n5' />
+  </node>
+</osm>
Index: trunk/test/data/renderer/node-text/style.mapcss
===================================================================
--- trunk/test/data/renderer/node-text/style.mapcss	(revision 11693)
+++ trunk/test/data/renderer/node-text/style.mapcss	(revision 11693)
@@ -0,0 +1,141 @@
+canvas {
+    default-points: false;
+    default-lines: false;
+}
+
+node[test] {
+	symbol-shape: circle;
+	symbol-size: 5;
+	symbol-fill-color: #8888ff;
+	text-color: red;
+	_match: regexp_match("n(.+)", tag("test"));
+	text: eval(concat("Test ", get(prop("_match"),1)));
+}
+
+/* Anchor position */
+node[test=n1] {
+	text-anchor-horizontal: center; 
+	text-anchor-vertical: center; 
+}
+
+node[test=n2] {
+	text-anchor-horizontal: left;
+	text-anchor-vertical: center;
+	text-color: green;
+}
+
+node[test=n3] {
+	text-anchor-horizontal: right;
+	text-anchor-vertical: center;
+	text-color: rgba(0.1, 1.0, 0.1, 0.5);
+}
+
+node[test=n4] {
+	text-anchor-horizontal: center;
+	text-anchor-vertical: top;
+	text-color: rgba(0.1, 1.0, 0.1, 1.0);
+	text-opacity: 0.5;
+}
+
+node[test=n5] {
+	text-anchor-horizontal: center;
+	text-anchor-vertical: bottom;
+	text-color: rgba(0.1, 1.0, 0.1, 0.8);
+	text-opacity: 0.8;
+}
+
+node[test=n6] {
+	text-anchor-horizontal: center; 
+	text-anchor-vertical: above; 
+}
+
+node[test=n7] {
+	text-anchor-horizontal: center; 
+	text-anchor-vertical: below; 
+}
+
+node[test=n8] {
+	text-anchor-horizontal: center; 
+	text-anchor-vertical: below; 
+	text-offset-x: -10;
+	text-offset-y: -10;
+}
+
+node[test=n9] {
+	text-anchor-horizontal: left; 
+	text-anchor-vertical: top; 
+	text-offset-x: 5;
+	text-offset: 10; /* interpreted as offset-y */
+}
+
+node[test=n10] {
+	text-offset: list(2, -6);
+}
+
+/* Halo */
+
+node[test=n11] {
+	text-halo-radius: 1;
+	text-halo-color: green;
+}
+
+node[test=n12] {
+	text-halo-radius: 5;
+	text-halo-opacity: 0.5;
+}
+
+node[test=n13] {
+	text-halo-radius: 5;
+	text-halo-color: rgba(0, 0, 1.0, 0.4);
+}
+
+node[test=n14] {
+	text-halo-radius: 5;
+	text-halo-color: rgba(0, 0, 1.0, 0.4);
+	text-halo-opacity: 0.5;
+}
+
+node[test=n15] {
+	/* ignored */
+	text-halo-radius: -2;
+}
+
+/* Text style */
+
+node[test=n16] {
+	 font-size: 10;
+	 font-style: italic;
+}
+
+node[test=n17] {
+	 font-size: 5;
+	 text-color: green;
+}
+
+node[test=n18] {
+	 font-size: 12;
+	 font-weight: bold;
+}
+
+/* 19, 20: hover/disabled */
+
+/* Text values */
+node[test=n21] {
+	text: test;
+}
+
+node[test=n22] {
+	text: unused_key;
+}
+
+node[test=n23] {
+	text: auto;
+}
+
+node[test=n24] {
+	text: auto;
+}
+
+node[test=n25] {
+	text: auto;
+}
Index: trunk/test/data/renderer/way-color/data.osm
===================================================================
--- trunk/test/data/renderer/way-color/data.osm	(revision 11693)
+++ trunk/test/data/renderer/way-color/data.osm	(revision 11693)
@@ -0,0 +1,88 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<osm version='0.6' upload='true' generator='JOSM'>
+  <node id='-30552' action='modify' visible='true' lat='0.1' lon='0.1' />
+  <node id='-30554' action='modify' visible='true' lat='0.15' lon='0.3' />
+  <node id='-30556' action='modify' visible='true' lat='0.1' lon='0.5' />
+  <node id='-30558' action='modify' visible='true' lat='0.1' lon='0.7' />
+  <node id='-30560' action='modify' visible='true' lat='0.1' lon='0.9' />
+  <node id='-30562' action='modify' visible='true' lat='0.3' lon='0.1' />
+  <node id='-30564' action='modify' visible='true' lat='0.35' lon='0.3' />
+  <node id='-30566' action='modify' visible='true' lat='0.3' lon='0.5' />
+  <node id='-30568' action='modify' visible='true' lat='0.3' lon='0.7' />
+  <node id='-30570' action='modify' visible='true' lat='0.3' lon='0.9' />
+  <node id='-30572' action='modify' visible='true' lat='0.5' lon='0.1' />
+  <node id='-30574' action='modify' visible='true' lat='0.55' lon='0.3' />
+  <node id='-30576' action='modify' visible='true' lat='0.5' lon='0.5' />
+  <node id='-30578' action='modify' visible='true' lat='0.5' lon='0.7' />
+  <node id='-30580' action='modify' visible='true' lat='0.5' lon='0.9' />
+  <node id='-30582' action='modify' visible='true' lat='0.7' lon='0.1' />
+  <node id='-30584' action='modify' visible='true' lat='0.75' lon='0.3' />
+  <node id='-30586' action='modify' visible='true' lat='0.7' lon='0.5' />
+  <node id='-30588' action='modify' visible='true' lat='0.7' lon='0.7' />
+  <node id='-30590' action='modify' visible='true' lat='0.7' lon='0.9' />
+  <node id='-30592' action='modify' visible='true' lat='0.9' lon='0.1' />
+  <node id='-30594' action='modify' visible='true' lat='0.95' lon='0.3' />
+  <node id='-30596' action='modify' visible='true' lat='0.9' lon='0.5' />
+  <node id='-30598' action='modify' visible='true' lat='0.9' lon='0.7' />
+  <node id='-30600' action='modify' visible='true' lat='0.9' lon='0.9' />
+  <way id='-30626' action='modify' visible='true'>
+    <nd ref='-30600' />
+    <nd ref='-30598' />
+    <tag k='highlight' v='yes' />
+    <tag k='test' v='style5' />
+  </way>
+  <way id='-30629' action='modify' visible='true'>
+    <nd ref='-30590' />
+    <nd ref='-30588' />
+    <tag k='highlight' v='yes' />
+    <tag k='test' v='style4' />
+  </way>
+  <way id='-30630' action='modify' visible='true'>
+    <nd ref='-30580' />
+    <nd ref='-30578' />
+    <tag k='highlight' v='yes' />
+    <tag k='test' v='style3' />
+  </way>
+  <way id='-30631' action='modify' visible='true'>
+    <nd ref='-30570' />
+    <nd ref='-30568' />
+    <tag k='highlight' v='yes' />
+    <tag k='test' v='style2' />
+  </way>
+  <way id='-30632' action='modify' visible='true'>
+    <nd ref='-30560' />
+    <nd ref='-30558' />
+    <tag k='highlight' v='yes' />
+    <tag k='test' v='style1' />
+  </way>
+  <way id='-30638' action='modify' visible='true'>
+    <nd ref='-30596' />
+    <nd ref='-30594' />
+    <nd ref='-30592' />
+    <tag k='test' v='style5' />
+  </way>
+  <way id='-30640' action='modify' visible='true'>
+    <nd ref='-30586' />
+    <nd ref='-30584' />
+    <nd ref='-30582' />
+    <tag k='test' v='style4' />
+  </way>
+  <way id='-30642' action='modify' visible='true'>
+    <nd ref='-30576' />
+    <nd ref='-30574' />
+    <nd ref='-30572' />
+    <tag k='test' v='style3' />
+  </way>
+  <way id='-30644' action='modify' visible='true'>
+    <nd ref='-30566' />
+    <nd ref='-30564' />
+    <nd ref='-30562' />
+    <tag k='test' v='style2' />
+  </way>
+  <way id='-30646' action='modify' visible='true'>
+    <nd ref='-30556' />
+    <nd ref='-30554' />
+    <nd ref='-30552' />
+    <tag k='test' v='style1' />
+  </way>
+</osm>
Index: trunk/test/data/renderer/way-color/style.mapcss
===================================================================
--- trunk/test/data/renderer/way-color/style.mapcss	(revision 11693)
+++ trunk/test/data/renderer/way-color/style.mapcss	(revision 11693)
@@ -0,0 +1,30 @@
+canvas {
+    default-points: false;
+    default-lines: false;
+}
+
+way[test] {
+	width: 5;
+}
+
+way[test=style5] {
+	color: red;
+}
+
+way[test=style4] {
+	color: #1220ad;
+}
+
+way[test=style3] {
+	color: #1220ad80;
+}
+
+way[test=style2] {
+	color: #12ad20;
+	opacity: .5;
+}
+
+way[test=style1] {
+	color: rgba(0.0, 1.0, 0.0, 0.8);
+	opacity: .8;
+}
Index: trunk/test/data/renderer/way-dashes/data.osm
===================================================================
--- trunk/test/data/renderer/way-dashes/data.osm	(revision 11693)
+++ trunk/test/data/renderer/way-dashes/data.osm	(revision 11693)
@@ -0,0 +1,88 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<osm version='0.6' upload='true' generator='JOSM'>
+  <node id='-30552' action='modify' visible='true' lat='0.1' lon='0.1' />
+  <node id='-30554' action='modify' visible='true' lat='0.15' lon='0.3' />
+  <node id='-30556' action='modify' visible='true' lat='0.1' lon='0.5' />
+  <node id='-30558' action='modify' visible='true' lat='0.1' lon='0.7' />
+  <node id='-30560' action='modify' visible='true' lat='0.1' lon='0.9' />
+  <node id='-30562' action='modify' visible='true' lat='0.3' lon='0.1' />
+  <node id='-30564' action='modify' visible='true' lat='0.35' lon='0.3' />
+  <node id='-30566' action='modify' visible='true' lat='0.3' lon='0.5' />
+  <node id='-30568' action='modify' visible='true' lat='0.3' lon='0.7' />
+  <node id='-30570' action='modify' visible='true' lat='0.3' lon='0.9' />
+  <node id='-30572' action='modify' visible='true' lat='0.5' lon='0.1' />
+  <node id='-30574' action='modify' visible='true' lat='0.55' lon='0.3' />
+  <node id='-30576' action='modify' visible='true' lat='0.5' lon='0.5' />
+  <node id='-30578' action='modify' visible='true' lat='0.5' lon='0.7' />
+  <node id='-30580' action='modify' visible='true' lat='0.5' lon='0.9' />
+  <node id='-30582' action='modify' visible='true' lat='0.7' lon='0.1' />
+  <node id='-30584' action='modify' visible='true' lat='0.75' lon='0.3' />
+  <node id='-30586' action='modify' visible='true' lat='0.7' lon='0.5' />
+  <node id='-30588' action='modify' visible='true' lat='0.7' lon='0.7' />
+  <node id='-30590' action='modify' visible='true' lat='0.7' lon='0.9' />
+  <node id='-30592' action='modify' visible='true' lat='0.9' lon='0.1' />
+  <node id='-30594' action='modify' visible='true' lat='0.95' lon='0.3' />
+  <node id='-30596' action='modify' visible='true' lat='0.9' lon='0.5' />
+  <node id='-30598' action='modify' visible='true' lat='0.9' lon='0.7' />
+  <node id='-30600' action='modify' visible='true' lat='0.9' lon='0.9' />
+  <way id='-30626' action='modify' visible='true'>
+    <nd ref='-30600' />
+    <nd ref='-30598' />
+    <tag k='highlight' v='yes' />
+    <tag k='test' v='style5' />
+  </way>
+  <way id='-30629' action='modify' visible='true'>
+    <nd ref='-30590' />
+    <nd ref='-30588' />
+    <tag k='highlight' v='yes' />
+    <tag k='test' v='style4' />
+  </way>
+  <way id='-30630' action='modify' visible='true'>
+    <nd ref='-30580' />
+    <nd ref='-30578' />
+    <tag k='highlight' v='yes' />
+    <tag k='test' v='style3' />
+  </way>
+  <way id='-30631' action='modify' visible='true'>
+    <nd ref='-30570' />
+    <nd ref='-30568' />
+    <tag k='highlight' v='yes' />
+    <tag k='test' v='style2' />
+  </way>
+  <way id='-30632' action='modify' visible='true'>
+    <nd ref='-30560' />
+    <nd ref='-30558' />
+    <tag k='highlight' v='yes' />
+    <tag k='test' v='style1' />
+  </way>
+  <way id='-30638' action='modify' visible='true'>
+    <nd ref='-30596' />
+    <nd ref='-30594' />
+    <nd ref='-30592' />
+    <tag k='test' v='style5' />
+  </way>
+  <way id='-30640' action='modify' visible='true'>
+    <nd ref='-30586' />
+    <nd ref='-30584' />
+    <nd ref='-30582' />
+    <tag k='test' v='style4' />
+  </way>
+  <way id='-30642' action='modify' visible='true'>
+    <nd ref='-30576' />
+    <nd ref='-30574' />
+    <nd ref='-30572' />
+    <tag k='test' v='style3' />
+  </way>
+  <way id='-30644' action='modify' visible='true'>
+    <nd ref='-30566' />
+    <nd ref='-30564' />
+    <nd ref='-30562' />
+    <tag k='test' v='style2' />
+  </way>
+  <way id='-30646' action='modify' visible='true'>
+    <nd ref='-30556' />
+    <nd ref='-30554' />
+    <nd ref='-30552' />
+    <tag k='test' v='style1' />
+  </way>
+</osm>
Index: trunk/test/data/renderer/way-dashes/style.mapcss
===================================================================
--- trunk/test/data/renderer/way-dashes/style.mapcss	(revision 11693)
+++ trunk/test/data/renderer/way-dashes/style.mapcss	(revision 11693)
@@ -0,0 +1,36 @@
+canvas {
+    default-points: false;
+    default-lines: false;
+}
+
+way[test] {
+	width: 10;
+	color: red;
+}
+
+way[test=style5] {
+	dashes: 3,3,10,3;
+}
+
+way[test=style4] {
+	dashes: 0.2,5;
+}
+
+way[test=style3] {
+	color: blue;
+	dashes: list(12, 2);
+	dashes-offset: 1;
+}
+
+way[test=style2] {
+	dashes: list(8, 4);
+	dashes-offset: 1;
+	dashes-background-color: green;
+}
+
+way[test=style1] {
+	dashes: 8, 4;
+	dashes-offset: 1;
+	dashes-background-color: green;
+	dashes-background-opacity: .5;
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java	(revision 11692)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java	(revision 11693)
@@ -70,5 +70,5 @@
      * @return The parameters.
      */
-    @Parameters(name="{1}")
+    @Parameters(name = "{1}")
     public static Collection<Object[]> runs() {
         return Stream.of(
@@ -76,6 +76,15 @@
                 new TestConfig("node-shapes", AREA_DEFAULT),
 
+                /** Text for nodes */
+                new TestConfig("node-text", AREA_DEFAULT),
+
                 /** Tests that StyledMapRenderer#drawWay respects width */
-                new TestConfig("way-width", AREA_DEFAULT)
+                new TestConfig("way-width", AREA_DEFAULT),
+
+                /** Tests the way color property, including alpha */
+                new TestConfig("way-color", AREA_DEFAULT),
+
+                /** Tests dashed ways. */
+                new TestConfig("way-dashes", AREA_DEFAULT)
 
                 ).map(e -> new Object[] {e, e.testDirectory})
@@ -147,4 +156,5 @@
         nc.zoomTo(testConfig.testArea);
         dataSet.allPrimitives().stream().forEach(n -> n.setHighlighted(n.isKeyTrue("highlight")));
+        dataSet.allPrimitives().stream().filter(n -> n.isKeyTrue("disabled")).forEach(n -> n.setDisabledState(false));
         Graphics2D g = image.createGraphics();
         // Force all render hints to be defaults - do not use platform values
@@ -207,14 +217,14 @@
     /**
      * Check if two colors differ
-     * @param expected
-     * @param result
+     * @param expected The expected color
+     * @param actual The actual color
      * @return <code>true</code> if they differ.
      */
-    private boolean colorsAreSame(int expected, int result) {
+    private boolean colorsAreSame(int expected, int actual) {
         int expectedAlpha = expected >> 24;
         if (expectedAlpha == 0) {
-            return (result & 0xff000000) == 0;
+            return actual >> 24 == 0;
         } else {
-            return expected == result;
+            return expected == actual;
         }
     }
