Next / Previous / Contents / Shipman's homepage

22. Testing

Here are some files to be used to test this module.

22.1. Sample XML input file

The file shown below is an example of a notes file in XML form. It exercises most, if not all, of the features of notes files. It is intended to be used to test that the module correctly reads a valid input file. Another useful test is to read the file and then write it back, and compare the output to see if it is equivalent to the input. It is available on the Web as file 2999-01.xml.

<note-set period='Septober 2999'>
  <day-notes state='vt' date='2999-09-05'>
    <day-summary default-loc='Mont'>
      <loc code='Mont' name='Montpelier Municipal Parks'/>
      <loc code='PI' name='Padre Island National Seashore'/>
    <form ab6='empgoo' gps='461218.5n 855959.9w' q='?'
          fide='Adam Weishaupt'/>
    <form ab6='mallar' rel='^' alt='snogoo' notable='1' count='1'/>
    <form ab6='baleag' loc='PI'>
        Standing on a light stand during filming of
        <cite>Flight of the Coot</cite>.
      <floc age='a' count='2'/>
      <floc age='i' count='1' loc='Mont'>
        <desc>White in the meat part of the wing.</desc>
        <breeding>Building a stick nest.</breeding>
        <voc>Thin yipping noises.</voc>
        <behavior>Standing around looking regal.</behavior>
          Would we really have been better off with the turkey as
          our nationable bird?
        <photo cat-no='2999-09-05b8047'
          View from inside the spleen.
  <day-notes state='nh' date='2999-09-06' day-loc='Spg'>
    <day-summary default-loc='NH'>
      <loc code='Spg' name='Springfield'>
        <gps waypoint='4306n8206w'/>
        <gps waypoint='4307n8156w'>
          This is not a real waypoint.
        This isn't a real place.
      <loc code='NH' name='Statewide'/>
        The route has no internal paragraphs.
        Beautiful day, only a few F5 tornadoes.
        <para>Roll #8506, Ilford XP1-36.</para>
          Roll #8507, Kodak Technical Pan.
      <missed>No Jabirus today.</missed>
        This comment isn't terribly useful either.
      <para>I can has two paragraphs?</para>
    <form ab6='jabiru' sex='p'/>