diff options
-rw-r--r-- | quilt.changes | 5 | ||||
-rw-r--r-- | test/refresh_patch_order.test | 62 |
2 files changed, 67 insertions, 0 deletions
diff --git a/quilt.changes b/quilt.changes index 57bb638..cedc6b9 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Jan 17 18:26:55 CET 2014 - mquinson@debian.org + +- test/refresh_patch_order.test: enforces the file order within a patch + +------------------------------------------------------------------- Fri Jan 17 14:37:21 CET 2014 - jdelvare@suse.de - Stop using patch option -E. diff --git a/test/refresh_patch_order.test b/test/refresh_patch_order.test new file mode 100644 index 0000000..ec8f2ef --- /dev/null +++ b/test/refresh_patch_order.test @@ -0,0 +1,62 @@ +`quilt refresh` must respect the specified file order within patch: + +All files that were already in the patch must be first in the file (in +the current order), and any new file must be in alphabetic order, +after the last file that were already in the file. + + $ mkdir patches + + $ echo foo >foo + $ echo fnord >fnord + $ echo zulu >zulu + + $ quilt new bar + > Patch %{P}bar is now on top + +Adding two files: they are in alphabetic order + $ quilt add fnord zulu + > File fnord added to patch %{P}bar + > File zulu added to patch %{P}bar + + $ echo x >>fnord + $ echo x >>zulu + $ quilt refresh --no-timestamps -p ab + > Refreshed patch %{P}bar + + $ grep '^--- ' patches/bar + > --- a/fnord + > --- a/zulu + +Add a new file: must be placed after the last one + $ quilt add foo + > File foo added to patch %{P}bar + + $ echo x >>foo + $ quilt refresh --no-timestamps -p ab + > Refreshed patch %{P}bar + + $ grep '^--- ' patches/bar + > --- a/fnord + > --- a/zulu + > --- a/foo + +Remove the first file: should not change the relative order of others + $ echo fnord >fnord + + $ quilt refresh --no-timestamps -p ab + > Refreshed patch %{P}bar + + $ grep '^--- ' patches/bar + > --- a/zulu + > --- a/foo + +Readd the file: must now be last + $ echo x >>fnord + + $ quilt refresh --no-timestamps -p ab + > Refreshed patch %{P}bar + + $ grep '^--- ' patches/bar + > --- a/zulu + > --- a/foo + > --- a/fnord |