~piastucki/bzr-xmloutput/fix-auth

« back to all changes in this revision

Viewing changes to tests/test_ls_xml.py

  • Committer: Guillermo Gonzalez
  • Date: 2011-03-09 23:42:41 UTC
  • mfrom: (153.1.1 fix-568941)
  • Revision ID: guillo.gonzo@gmail.com-20110309234241-3extc74ctgt1gkvg
Escape id in xmlls output.

Show diffs side-by-side

added added

removed removed

Lines of Context:
304
304
                           'status_kind': 'unknown'}]
305
305
        self.assertEquals(expected_items,
306
306
                          self.run_xmlls('%s --non-recursive' % self.test_dir))
 
307
 
 
308
    def test_escape_id(self):
 
309
        """Test that the id is properly escaped."""
 
310
        self.wt.add(['a'], ['Hola_<user@foobar>_Mundo'])
 
311
        self.wt.commit('add')
 
312
 
 
313
        self.build_tree(['subdir/'])
 
314
 
 
315
        # Check what happens if the id contains <, @ and >
 
316
        expected_items = [{'id': 'Hola_<user@foobar>_Mundo',
 
317
                           'kind': 'file',
 
318
                           'path': 'a',
 
319
                           'status_kind': 'versioned'}]
 
320
        self.assertEquals(expected_items, self.run_xmlls('--revision 1'))
 
321