summaryrefslogtreecommitdiffstats
path: root/test/create-delete.test
blob: 7bbfa75327e7854a26960dc9762dc1263dcda68d (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
Check whether quilt generates patches properly so that GNU patch recognizes
file creates and deletions.

	$ rm -rf d
	$ mkdir -p d/patches
	$ cd d

	$ echo delete > delete
	$ quilt new test.diff
	> Patch %{P}test.diff is now on top

	$ quilt add create
	> File create added to patch %{P}test.diff

	$ echo create > create
	$ quilt refresh
	> Refreshed patch %{P}test.diff

	$ quilt add delete
	> File delete added to patch %{P}test.diff

	$ rm -f delete
	$ quilt refresh
	> Refreshed patch %{P}test.diff

	$ quilt pop -q
	> Removing patch %{P}test.diff
	> No patches applied

	$ echo create > create
	$ rm -f delete
	$ patch -p1 --dry-run < patches/test.diff
	>~ The next patch would create the file `?create'?,
	> which already exists!  Assume -R? [n] 
	> Apply anyway? [n] 
	> Skipping patch.
	>~ 1 out of 1 hunk ignored -- saving rejects to (file )?create.rej
	>~ The next patch would delete the file `?delete'?,
	> which does not exist!  Assume -R? [n] 
	> Apply anyway? [n] 
	> Skipping patch.
	> 1 out of 1 hunk ignored

	$ cd ..
	$ rm -rf d