summaryrefslogtreecommitdiffstats
path: root/test/sort.test
blob: 0e0a23f8e9c71fe43d8a941069ade1edf9266c15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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