[darcs-users] darcs patch: added regression test for issue1632
Trent W. Buck
trentbuck at gmail.com
Thu Oct 1 13:29:12 UTC 2009
benjamin.franksen at bessy.de writes:
> Please take a look; I hope I have got this right (i.e. that it
> properly fails).
Looks OK from visual inspection. Nitpicks follow.
> +## Test for issue1632 - <SYNOPSIS: 'darcs changes dir/file-that-never-existed'
> +## should not list any patches.>
The surrounding <SYNOPSIS: > part isn't needed. I would probably also
clarify that dir *does* exist (as far as pristine is concerned), e.g.
darcs changes D/f should not list any changes, where D is part of
the repo and f is a non-existent file.
...since I'm assuming that "adddir dir/" must be recorded in order to
trigger this bug.
> +# This one lists no patches:
> +darcs changes non-existent-file | not grep 'added dir'
> +# But this one lists the dir creation patch:
> +darcs changes dir/non-existent-file | not grep 'added dir'
I would prefer these comments to describe what *should* happen, rather
than the current behaviour, i.e.
# Darcs should not list any changes here.
# Darcs should list the dir creation patch here.
I would also redirect output (>log) so as to test Darcs' exit status,
not darcs changes dir/non-existent-file >log
not fgrep 'added dir' log
More information about the darcs-users