I changed the cursor position, but this is another thing. Even in interactive mode, I could not keep the same cursor position when I opened and save a file.
When the comparison test fails, it prints a diff of the two files. Denemo - MESSAGE : Opening file /home/azmeuk/dev/denemo/tests/integration-data/hemiola.denemo Finding and reopening /home/azmeuk/dev/denemo/tests/integration-tmp/hemiola.denemo.denemo Denemo - MESSAGE : Loading preference file: /home/azmeuk/.denemo-1.1.5/denemorc Denemo - MESSAGE : Denemo version 1.1.5 Denemo - MESSAGE : Loaded keymap /home/azmeuk/dev/denemo/actions/Default.commands Success 1 Denemo - MESSAGE : Opening file /home/azmeuk/dev/denemo/tests/integration-tmp/hemiola.denemo.denemo Comparing /home/azmeuk/dev/denemo/tests/integration-data/hemiola.denemo with /home/azmeuk/dev/denemo/tests/integration-tmp/hemiola.denemo.denemo ** ERROR:integration.c:52:compare_denemo_files: child process (6282) failed unexpectedly 522a523 > <lily-directive tag="!" minpixels="10"> </lily-directive> 543,552d543 < <chord show="true" id="id48"> < <duration base="quarter"> < <dots>1</dots> < </duration> < <notes> < <note id="id49"> < <middle-c-offset>4</middle-c-offset> < </note> < </notes> < </chord> 556c547 < <chord show="true" id="id50"> --- > <chord show="true" id="id48"> 561c552 < <note id="id51"> --- > <note id="id49"> 567c558 < <chord show="true" id="id52"> --- > <chord show="true" id="id50"> 570c561 < <note id="id53"> --- > <note id="id51"> 575c566 < <chord show="true" id="id54"> --- > <chord show="true" id="id52"> 578c569 < <note id="id55"> --- > <note id="id53"> 586c577 < <voice id="id56"> --- > <voice id="id54"> 648c639 < <chord show="true" id="id57"> --- > <chord show="true" id="id55"> 653c644 < <note id="id58"> --- > <note id="id56"> 658c649 < <chord show="true" id="id59"> --- > <chord show="true" id="id57"> 663c654 < <note id="id60"> --- > <note id="id58"> 668c659 < <chord show="true" id="id61"> --- > <chord show="true" id="id59"> 673c664 < <note id="id62"> --- > <note id="id60"> 681c672 < <chord show="true" id="id63"> --- > <chord show="true" id="id61"> 686c677 < <note id="id64"> --- > <note id="id62"> 692c683 < <rest show="false" id="id65"> --- > <rest show="false" id="id63"> 695c686 < <rest show="false" id="id66"> --- > <rest show="false" id="id64"> # ERROR:integration.c:52:compare_denemo_files: child process (6282) failed unexpectedly ../build/tap-test : ligne 5 : 6085 Abandon (core dumped)$1 -k --tap Denemo - MESSAGE : Opening file /home/azmeuk/dev/denemo/tests/integration-data/note-insertion.denemo Finding and reopening /home/azmeuk/dev/denemo/tests/integration-tmp/note-insertion.denemo.denemo Denemo - MESSAGE : Loading preference file: /home/azmeuk/.denemo-1.1.5/denemorc Denemo - MESSAGE : Denemo version 1.1.5 Denemo - MESSAGE : Loaded keymap /home/azmeuk/dev/denemo/actions/Default.commands Success 1 Denemo - MESSAGE : Opening file /home/azmeuk/dev/denemo/tests/integration-tmp/note-insertion.denemo.denemo Comparing /home/azmeuk/dev/denemo/tests/integration-data/note-insertion.denemo with /home/azmeuk/dev/denemo/tests/integration-tmp/note-insertion.denemo.denemo 85,86c85,86 < <measureno>6</measureno> < <cursorposition>0</cursorposition> --- > <measureno>1</measureno> > <cursorposition>7</cursorposition> 146,247d145 < <chord show="true" id="id2"> < <duration base="quarter"></duration> < <notes> < <note id="id3"> < <middle-c-offset>0</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id4"> < <duration base="quarter"></duration> < <notes> < <note id="id5"> < <middle-c-offset>1</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id6"> < <duration base="quarter"></duration> < <notes> < <note id="id7"> < <middle-c-offset>2</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id8"> < <duration base="quarter"></duration> < <notes> < <note id="id9"> < <middle-c-offset>3</middle-c-offset> < <accidental name="natural" show="true"></accidental> < </note> < </notes> < </chord> < </measure> < <measure> < <chord show="true" id="id10"> < <duration base="quarter"></duration> < <notes> < <note id="id11"> < <middle-c-offset>4</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id12"> < <duration base="quarter"></duration> < <notes> < <note id="id13"> < <middle-c-offset>5</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id14"> < <duration base="quarter"></duration> < <notes> < <note id="id15"> < <middle-c-offset>6</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id16"> < <duration base="quarter"></duration> < <notes> < <note id="id17"> < <middle-c-offset>7</middle-c-offset> < </note> < </notes> < </chord> < </measure> < <measure> < <chord show="true" id="id18"> < <duration base="quarter"></duration> < <notes> < <note id="id19"> < <middle-c-offset>4</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id20"> < <duration base="quarter"></duration> < <notes> < <note id="id21"> < <middle-c-offset>3</middle-c-offset> < <accidental name="sharp" show="false"></accidental> < </note> < </notes> < </chord> < <chord show="true" id="id22"> < <duration base="quarter"></duration> < <notes> < <note id="id23"> < <middle-c-offset>2</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id24"> < <duration base="quarter"></duration> < <notes> < <note id="id25"> < <middle-c-offset>1</middle-c-offset> < </note> < </notes> < </chord> 251,253c149 < </measure> < <measure> < <rest show="true" id="id26"> --- > <rest show="true" id="id2"> 278,311d173 < </measure> < <measure> < <chord show="true" id="id27"** ERROR:integration.c:52:compare_denemo_files: child process (6656) failed unexpectedly > < <duration base="quarter"></duration> < <notes> < <note id="id28"> < <middle-c-offset>-2</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id29"> < <duration base="quarter"></duration> < <notes> < <note id="id30"> < <middle-c-offset>-1</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id31"> < <duration base="quarter"></duration> < <notes> < <note id="id32"> < <middle-c-offset>0</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id33"> < <duration base="quarter"></duration> < <notes> < <note id="id34"> < <middle-c-offset>1</middle-c-offset> < </note> < </notes> < </chord> 316,349d177 < </measure> < <measure> < <chord show="true" id="id35"> < <duration base="quarter"></duration> < <notes> < <note id="id36"> < <middle-c-offset>-2</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id37"> < <duration base="quarter"></duration> < <notes> < <note id="id38"> < <middle-c-offset>-1</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id39"> < <duration base="quarter"></duration> < <notes> < <note id="id40"> < <middle-c-offset>0</middle-c-offset> < </note> < </notes> < </chord> < <chord show="true" id="id41"> < <duration base="quarter"></duration> < <notes> < <note id="id42"> < <middle-c-offset>1</middle-c-offset> < </note> < </notes> < </chord> # ERROR:integration.c:52:compare_denemo_files: child process (6656) failed unexpectedly ../build/tap-test : ligne 5 : 6450 Abandon (core dumped)$1 -k --tap 2014-05-18 15:53 GMT+02:00 Richard Shann <[email protected]>: > On Sun, 2014-05-18 at 15:41 +0200, Éloi Rivard wrote: > > I just fixed the tests. Actually it wasn't comparing > > integration-data/*.denemo files with themselves after saving. > > > > I suffixed hemiola.denemo and note-insertion.denemo with ".bak" > > because they make the test fail. > Why do they make the test fail, when I loaded and saved them they > remained identical? > > I see that the .bak files are not the same as the original, they have > the cursor in a different position. This could cause the test to fail. > > Richard > > > > > > > > > > > 2014-05-15 19:08 GMT+02:00 Richard Shann <[email protected]>: > > On Thu, 2014-05-15 at 17:51 +0200, Éloi Rivard wrote: > > > > > > > > > > > > 2014-05-14 18:43 GMT+02:00 Richard Shann > > <[email protected]>: > > > On Wed, 2014-05-14 at 18:15 +0200, Éloi Rivard > > wrote: > > > > > > > > The reference file should be in integration-data. > > > > > > > > Comparison against reference files is done > > for .denemo files > > > in > > > > example directory, and scm / mxml files in > > integration-data > > > > > > > > > > > > Sorry but I still don't understand. The file > > hemiola.denemo > > > which I have > > > checked into tests/integration-data is not suitable > > for > > > inclusion in the > > > example directory - > > > > > > > > > I see, I will look for a way to fix that. > > > > > > No need! It is "idempotent" so it is fine in the the > > integration-data > > directory. (I hadn't read your Readme.md file when I typed > > that). I have > > added another file in tests/integration-data that does some > > general note > > insertion, and that again has a script inside it which > > re-creates > > itself. The build passed so I assume it got loaded saved and > > the result > > was the same as the original file, which means that a whole > > set of > > commands for inserting notes (going over to the next bar as > > needed) and > > several other things are now tested for regression. > > > > What we *could* have is files which alter themselves, but I > > think you > > have created something perhaps better: we can have a scheme > > script which > > generate Denemo file. > > > > That is suppose I create > > mytest.scm > > > > containing > > (d-InsertA) > > (d-Save "filename=mytest") > > > > Then and put it in integration-data along with mytest.denemo > > that > > results from the script. > > Will this then pass? > > Shall I try checking it in to see? > > > > Richard > > > > > > > > > > > > > > > > > > > it is a test, not something users will want to look > > > at. It is, in fact, the same as its output, that is > > if you > > > load it and > > > then save it then the saved file is the same as the > > original, > > > or should > > > be if the command it tests is still working. > > > Ah! When in doubt, read the documentation :) : > > > From the Readme.md file this single file should be > > good as a > > > complete > > > test. It would not be good to have a file which when > > loaded > > > and saved > > > became different, such a test would need to go > > elsewhere and > > > would > > > presumably require more infrastructure. And this is > > not really > > > needed, > > > since such a test could always be done via a scheme > > script. > > > > > > Ok, so if I have understood correctly, the check in > > I did of > > > hemiola.denemo was all that was needed, and the > > travis-ci > > > report that > > > the build passed means that the test passed. > > > Excellent! > > > Richard > > > > > > > > > > > > > > > > > > > > > -- > > > Éloi Rivard - [email protected] > > > > > > « On perd plus à être indécis qu'à se tromper. » > > > > > > > > > > > > > > > > > -- > > Éloi Rivard - [email protected] > > > > « On perd plus à être indécis qu'à se tromper. » > > > > > -- Éloi Rivard - [email protected] « On perd plus à être indécis qu'à se tromper. »
_______________________________________________ Denemo-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/denemo-devel
