/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_win32utils.py

  • Committer: John Arbash Meinel
  • Date: 2009-11-20 16:42:28 UTC
  • mto: This revision was merged to the branch mainline in revision 4819.
  • Revision ID: john@arbash-meinel.com-20091120164228-aa9agsdfomwzqshc
Fix bug #485771. Only change '/' to '/' when expanding globs.

The code we had would replace '/' even if it was in a quoted section,
or if it was part of a simple argument that didn't have a glob.

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
        self.assertCommandLine([u"'a/*.c'"], "'a/*.c'")
374
374
 
375
375
    def test_slashes_changed(self):
376
 
        self.assertCommandLine([u'a/*.c'], '"a\\*.c"')
377
 
        # Expands the glob, but nothing matches
 
376
        # Quoting doesn't change the supplied args
 
377
        self.assertCommandLine([u'a\\*.c'], '"a\\*.c"')
 
378
        # Expands the glob, but nothing matches, swaps slashes
378
379
        self.assertCommandLine([u'a/*.c'], 'a\\*.c')
379
 
        self.assertCommandLine([u'a/foo.c'], 'a\\foo.c')
 
380
        self.assertCommandLine([u'a/?.c'], 'a\\?.c')
 
381
        # No glob, doesn't touch slashes
 
382
        self.assertCommandLine([u'a\\foo.c'], 'a\\foo.c')
380
383
 
381
384
    def test_no_single_quote_supported(self):
382
385
        self.assertCommandLine(["add", "let's-do-it.txt"],