<div dir="ltr">Hi,<br><br><div class="gmail_quote"><div dir="ltr">On Fri, Apr 14, 2017 at 12:22 AM David van der Spoel <<a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm trying to test the writing of an xpm file using ExactTextMatch but<br>
it fails. Could that be due to newline characters in the data file?</blockquote><div><br></div><div>Conceivable. For example, the new tests of grompp -po have whole mdp file contents as strings in refdata, but they don't get written as CDATA. As 2f00ac17824b13dbb128c67cf338ec9890f0d05f notes, the xml library we use doesn't let us use '\r' in a text node (IIRC that's what a CDATA element is), and a Mac might produce '\r' for a newline? The test failure seems consistent with the symptoms of a '\r' getting converted to '\n' on the round trip. So maybe generating the refdata on a linux machine is enough to produce robust test reference data.</div><div><br></div><div>But perhaps serializing the matrix using the refdata sequence functionality is better still? Depends whether you're intending to assert on the contents of the matrix or the contents of the file.</div>
<div><br></div><div>Mark</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> The<br>
patch is here:<br>
<br>
<a href="https://gerrit.gromacs.org/#/c/6546/" rel="noreferrer" target="_blank">https://gerrit.gromacs.org/#/c/6546/</a><br>
<br>
The problem seems to be in the CDATA section.<br>
% od -a ClustsizeTest_MolCSize.xml<br>
<snip><br>
0000320 S t r i n g sp N a m e = " C o n<br>
0000340 t e n t s " > < ! [ C D A T A [<br>
0000360 nl / * sp X P M sp * / nl / * sp T h<br>
^^<br>
Is the nl character portable?<br>
<br>
Felmeddelande:<br>
<br>
/home/jenkins/workspace/Gromacs_Gerrit_master_nrwpo/c046391a/gromacs/src/testutils/refdata.cpp:887<br>
In item: /Files/-ow/Contents<br>
Actual: '/* XPM */<br>
/* This file can be converted to EPS by the GROMACS program xpm2ps */<br>
<br>
Reference: '/* XPM */<br>
/* This file can be converted to EPS by the GROMACS program xpm2ps */<br>
<br>
--<br>
David van der Spoel, Ph.D., Professor of Biology<br>
Head of Department, Cell & Molecular Biology, Uppsala University.<br>
Box 596, SE-75124 Uppsala, Sweden. Phone: <a href="tel:018-471%2042%2005" value="+46184714205" target="_blank">+46184714205</a>.<br>
<a href="http://www.icm.uu.se" rel="noreferrer" target="_blank">http://www.icm.uu.se</a><br>
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</blockquote></div></div>