Nice! Thanks for updating that, it'll be a huge help



On Sun, Dec 15, 2013 at 7:37 AM, Christian Grün <christian.gruen@gmail.com> wrote:
Feel free to check out the updated example in our Wiki [1] and the
latest snapshot [2].

[1] http://docs.basex.org/wiki/Unit_Module
[2] http://files.basex.org/releases/latest/
___________________________

On Sat, Dec 14, 2013 at 5:35 PM, Christian Grün
<christian.gruen@gmail.com> wrote:
> Hi Joe,
>
> a little preview: I agree that the current output of the unit
> reporting functions is not as convenient as it could be. This is why
> we’ll soon extend the XML testcase output, and add some more functions
> like unit:assert-equals() which will create a more helpful error
> output.
>
> Best,
> Christian
> ___________________________
>
> On Thu, Dec 5, 2013 at 4:59 AM, Joe Templeman <joe@inkling.com> wrote:
>> Hi all,
>>
>> Is there a way to output unescaped XML to a string for debugging purposes?
>> In unittests we would like to output the XML returned when a test fails,
>> here is my example:
>>
>> declare %unit:test function elementinfo-test:test-element-info()
>> {
>>   let $cases :=
>>   <cases>
>>     <case>
>>       <comment>Failed input</comment>
>>       <input>input</input>
>>       <output>
>>         <result> output </result>
>>       </output>
>>     </case>
>>   </cases>
>>   for $case in $cases/case
>>   let $result := {some function which returns XML}
>>   let $u := unit:assert(deep-equal($case/output, result),
>>                         $case/comment/text()
>>                         || "  Input:  " || $case/input/text()
>>                         || "  Expected: " || fn:serialize($case/output)
>>                         || "  Got: " || fn:serialize($result))
>>   return $u
>> };
>>
>> But when a test fails, I get escaped XML as the output. Is there any way to
>> get  this as actual XML?
>>
>> Thanks,
>> Joe
>>
>>
>> _______________________________________________
>> BaseX-Talk mailing list
>> BaseX-Talk@mailman.uni-konstanz.de
>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>>