Skip to content

Commit

Permalink
Added a testcase to check the xmlsearch with lenient=true for LDEV-4781
Browse files Browse the repository at this point in the history
  • Loading branch information
cfmitrah committed Jan 23, 2024
1 parent f7b88cc commit c13c869
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/tickets/LDEV4781.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
component extends="org.lucee.cfml.test.LuceeTestCase" labels="sos"{

function run( testResults , testBox ) {
describe( title="Test suite for LDEV-4781", body=function() {
it(title = "checking xmlSearch with lenient=true", body = function( currentSpec ) {

```
<cfxml variable="xml_document" lenient=true>
<office>
<employee>
<emp_name>lucee_dev</emp_name>
<emp_no>121</emp_no>
</employee>
</office>
</cfxml>
```

expect( XmlSearch(xml_document,"/office/employee").isEmpty() ).toBeFalse();
expect( arrayIndexExists(XmlSearch(xml_document,"/office/employee"), 1) ).toBeTrue();
});
});
}

}

0 comments on commit c13c869

Please sign in to comment.