From 0d78dda8c41e10abca031d22ce8e7944282e14b9 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 10 Dec 2012 08:59:03 -0700 Subject: [PATCH] Additional test for filter parsing This confirms that literals are properly parsed when they have text node siblings (see #794). --- tests/Format/Filter/v1.html | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/Format/Filter/v1.html b/tests/Format/Filter/v1.html index 60e7002e6e..a8629551fb 100644 --- a/tests/Format/Filter/v1.html +++ b/tests/Format/Filter/v1.html @@ -246,6 +246,25 @@ t.xml_eq(got, exp, "wrote FID filter in logical NOT without complaint"); } + function test_between_literal(t) { + t.plan(3); + + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.BETWEEN, + property: "foo", + lowerBoundary: 1.0, + upperBoundary: 2.0 + }); + var format = new OpenLayers.Format.Filter.v1_0_0(); + + var exp = format.read(readXML("BetweenLiteral")); + + // confirm that reading works as expected + t.eq(exp.property, "foo", "property"); + t.eq(exp.lowerBoundary, 1.0, "lowerBoundary"); + t.eq(exp.upperBoundary, 2.0, "upperBoundary"); + } + function test_date_writing(t) { t.plan(1); @@ -341,6 +360,19 @@ --> +