Status/Resolution/Reason: Closed/Withdrawn/AsDesigned
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 08/23/2012
Components: Language
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win All
Vote Count: 0
Problem Description:
I dunno whether arrayDelete() is supposed to be case-sensitive or not, but either way, it's got casing bugs
Steps to Reproduce:
<cfscript>
struct function getTestData(){
var data = {};
data.struct = {one="tahi"};
data.array = ["rua", "toru"];
data.simple = "wha";
data.test = [
data.struct,
data.array,
data.simple
];
return data;
}
string function ok(array){
return arrayLen(array) == 3 ? "DELETED" : "NOT DELETED";
}
data = getTestData();
arrayDelete(data.test, "WHA");
writeOutput("Delete simple value, different case: #ok(data.test)#<br />");
data = getTestData();
elementToFind = {one="TAHI"};
arrayDelete(data.test, elementToFind);
writeOutput("Delete equivalent struct with different-cased key: #ok(data.test)#<br />");
data = getTestData();
elementToFind = ["RUA", "TORU"];
arrayDelete(data.test, elementToFind);
writeOutput("Delete equivalent array with different case: #ok(data.test)#<br />");
</cfscript>
Actual Result:
Depending on the test, it's either not deleting mismatched-case elements, or deleting them.
Expected Result:
It should either be case-sensitive, or not case-sensitive. Not a mix of the two.
Any Workarounds:
Doesn't matter: it should work properly.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3316798
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: Adam Cameron.
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: