~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testbasicio.py

  • Committer: Martin Pool
  • Date: 2005-11-24 06:11:40 UTC
  • mto: (1185.33.49 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 1512.
  • Revision ID: mbp@sourcefrog.net-20051124061140-12da2df0f37a2756
More basicio quoting tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
\"one\"
276
276
"
277
277
 
 
278
s "\""
 
279
 
 
280
s "\"\""
 
281
 
 
282
s "\"\"\""
 
283
 
 
284
s "
 
285
"
 
286
 
 
287
s "\\"
 
288
 
 
289
s "
 
290
\\
 
291
\\\\
 
292
"
 
293
 
 
294
s "word\\"
 
295
 
 
296
s "quote\""
 
297
 
 
298
s "backslashes\\\\\\"
 
299
 
 
300
s "both\\\""
 
301
 
278
302
"""[1:]) # remove initial newline
279
303
        tmpf.seek(0)
280
304
        expected_vals = ['"one"',
281
305
            '\n"one"\n',
 
306
            '"',
 
307
            '""',
 
308
            '"""',
 
309
            '\n',
 
310
            '\\',
 
311
            '\n\\\n\\\\\n',
 
312
            'word\\',
 
313
            'quote\"',
 
314
            'backslashes\\\\\\',
 
315
            'both\\\"',
282
316
            ]
283
317
        for expected in expected_vals:
284
318
            stanza = read_stanza(tmpf)