Merge lp:~mbp/bzr/scripts into lp:bzr
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Vincent Ladeuil on 2010-06-15 | ||||
| Approved revision: | no longer in the revision history of the source branch. | ||||
| Merged at revision: | 5296 | ||||
| Proposed branch: | lp:~mbp/bzr/scripts | ||||
| Merge into: | lp:bzr | ||||
| Diff against target: |
129 lines (+42/-19) 4 files modified
NEWS (+8/-4) bzrlib/tests/script.py (+6/-0) bzrlib/tests/test_script.py (+12/-0) doc/developers/testing.txt (+16/-15) |
||||
| To merge this branch: | bzr merge lp:~mbp/bzr/scripts | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Vincent Ladeuil | 2010-06-15 | Approve on 2010-06-15 | |
|
Review via email:
|
|||
Commit Message
ignore common leading whitespace in shell-like script tests
Description of the Change
This makes shell-like tests ignore consistent leading indentation which makes them much easier to use.
- 5295. By Canonical.com Patch Queue Manager <email address hidden> on 2010-06-15
-
(mbp) add ObjectWithCleanups (Martin Pool)
| Martin Pool (mbp) wrote : | # |
On 15 June 2010 17:35, Vincent Ladeuil <email address hidden> wrote:
> Review: Approve
> Nice sugar.
> Will it still work if a test expects an output with leading spaces like:
> $ bzr xxx
> done
>
> I'm not sure we *need* to support that though and a leading '\ ' may work too in this case.
I think that's an important case and yes, it does support it: dedent
strips the common prefix of space from each line.
--
Martin
| Martin Pool (mbp) wrote : | # |
sent to pqm by email
- 5296. By Canonical.com Patch Queue Manager <email address hidden> on 2010-06-15
-
(mbp) ignore common leading whitespace in shell-like script tests (Martin
Pool)

Nice sugar.
Will it still work if a test expects an output with leading spaces like:
$ bzr xxx
done
I'm not sure we *need* to support that though and a leading '\ ' may work too in this case.