fixed getParameterString to handle null/undefined values correctly. r=elemoine (closes #2157)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9573 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2009-07-20 21:11:03 +00:00
parent 2c8ec98643
commit 82cbb8c7cb
2 changed files with 10 additions and 3 deletions
+5 -2
View File
@@ -225,7 +225,7 @@
}
function test_Util_getParameterString(t) {
t.plan( 4 );
t.plan( 5 );
var params = {
'foo': "bar",
@@ -242,7 +242,10 @@
t.eq( OpenLayers.Util.getParameterString(params), "foo=bar%2Cbaz", "getParameterString encodes , correctly in arrays");
var params = { foo: ["bar","baz,"] };
t.eq( OpenLayers.Util.getParameterString(params), "foo=bar,baz%2C", "getParameterString returns with list of CSVs when given a list. ");
t.eq( OpenLayers.Util.getParameterString(params), "foo=bar,baz%2C", "getParameterString returns with list of CSVs when given a list. ");
var params = { foo: [null, undefined, 0, "", "bar"] }
t.eq( OpenLayers.Util.getParameterString(params), "foo=,,0,,bar", "getParameterString works fine with null values in array.");
}
function test_Util_createAlphaImageDiv(t) {