Hi Jack,

I'm not sure about the use of grep here - it could potentially fail should
the DOCTYPE be over two lines.

I know that 'normally' in our XMLs, the DOCTYPE usually will be a single
line, e.g.:

    <!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1">

But it is certainly not unusual, or unsupported, for the DOCTYPE to be over
multiple lines, e.g.:

   <!DOCTYPE auto_install SYSTEM
    "file:///usr/share/install/ai.dtd.1">

Which is valid XML.

Also, it certainly doesn't have to be at the start of the line (^) as the
regular expression assumes.

It might be better to create an XML compare method that loads both the XML
files and compares recursively...

Thanks,

Darren.

On 25/06/2012 00:43, Jack Schwartz wrote:
> Hi everyone.
> 
> Please review this unit test fix.  Sue found this bug when she changed 
> the DTD.
> 
> https://cr.opensolaris.org/action/browse/caiman/schwartz/7177531_1/webrev.1/
> 
> Bug ID: http://monaco.us.oracle.com/detail.jsf?cr=7177531
> Bug: unit test that assembles manifest from pieces reads the wrong DTD
> 
> The problem was that the manifest was validating against the system's 
> DTD instead of the DTD in the proto area.  (Adding the schema arg to the 
> mim constructor fixed that.)  The rest of the fix is around performing 
> the diff of original manifest vs the created one.
> 
> Testing:
> 1) Copied Sue's new DTD and manifest to the proto area.  All unit tests 
> in the MIM overlay module now pass.
> 2) Restored original DTD and manifest to the proto area.  All unit tests 
> in the MIM overlay module still pass.
> 3) pep8 and pylint checked.
> 
>      Thanks,
>      Jack
> _______________________________________________
> caiman-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
> 
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to