summaryrefslogtreecommitdiffstats
path: root/test/sort.test
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2005-04-13 13:04:06 +0000
committerAndreas Gruenbacher <agruen@suse.de>2005-04-13 13:04:06 +0000
commite5cbacaf5622ad6d80bd314984eeed40f62cc08e (patch)
tree0bfbd5cbefd93757da1d52ed6579849e88fdb9e8 /test/sort.test
parent0979b44e26ec23ab0445e7271932eba04fa604bb (diff)
downloadquilt-e5cbacaf5622ad6d80bd314984eeed40f62cc08e.tar.gz
- Add --sort options to the diff and refresh commands which
sorts files by filename. The default is to keep files in their original order whenever possible. - refresh command: add new files in sort order instead of the filesystem order. - diff command: output files in the order in which they show up in the patch instead of sorting them alphabetically. - Add sort testcase.
Diffstat (limited to 'test/sort.test')
-rw-r--r--test/sort.test52
1 files changed, 52 insertions, 0 deletions
diff --git a/test/sort.test b/test/sort.test
new file mode 100644
index 0000000..0e0a23f
--- /dev/null
+++ b/test/sort.test
@@ -0,0 +1,52 @@
+ $ mkdir d
+ $ cd d
+
+ $ quilt new sort.diff
+ > Patch patches/sort.diff is now on top
+
+ $ quilt add b c
+ > File b added to patch patches/sort.diff
+ > File c added to patch patches/sort.diff
+
+ $ echo b > b
+ $ echo c > c
+ $ quilt refresh
+ > Refreshed patch patches/sort.diff
+
+ $ quilt add a
+ > File a added to patch patches/sort.diff
+
+ $ echo a > a
+ $ quilt files
+ > b
+ > c
+ > a
+
+ $ quilt diff | grep ^Index
+ > Index: d/b
+ > Index: d/c
+ > Index: d/a
+
+ $ quilt refresh
+ > Refreshed patch patches/sort.diff
+
+ $ grep ^Index patches/sort.diff
+ > Index: d/b
+ > Index: d/c
+ > Index: d/a
+
+ $ quilt diff --sort | grep ^Index
+ > Index: d/a
+ > Index: d/b
+ > Index: d/c
+
+ $ quilt refresh --sort
+ > Refreshed patch patches/sort.diff
+
+ $ grep ^Index patches/sort.diff
+ > Index: d/a
+ > Index: d/b
+ > Index: d/c
+
+ $ cd ..
+ $ rm -rf d