~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_patches.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2005-2010 Aaron Bentley, Canonical Ltd
2
 
# <aaron.bentley@utoronto.ca>
3
2
#
4
3
# This program is free software; you can redistribute it and/or modify
5
4
# it under the terms of the GNU General Public License as published by
55
54
        finally:
56
55
            datafile.close()
57
56
 
 
57
    def test_parse_patches_leading_noise(self):
 
58
        # https://bugs.edge.launchpad.net/bzr/+bug/502076
 
59
        # https://code.edge.launchpad.net/~toshio/bzr/allow-dirty-patches/+merge/18854
 
60
        lines = ["diff -pruN commands.py",
 
61
            "--- orig/commands.py",
 
62
            "+++ mod/dommands.py"]
 
63
        bits = parse_patches(iter(lines), allow_dirty=True)
 
64
 
58
65
    def testValidPatchHeader(self):
59
66
        """Parse a valid patch header"""
60
67
        lines = "--- orig/commands.py\n+++ mod/dommands.py\n".split('\n')