File: faildiff.test

package info (click to toggle)
quilt 0.65-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,980 kB
  • sloc: sh: 5,898; perl: 1,256; lisp: 492; makefile: 430
file content (39 lines) | stat: -rw-r--r-- 828 bytes parent folder | download | duplicates (2)
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
	$ mkdir patches

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

	$ cat > test.txt
	< This is test.txt.
	$ quilt add test.txt
	> File test.txt added to patch %{P}test.diff

What happens when diff fails because of a permission error?

	$ chmod -r test.txt

	$ quilt refresh
	>~ .*diff: test\.txt: Permission denied
	> Diff failed on file 'test.txt', aborting
	$ echo %{?}
	> 1

	$ chmod +r test.txt

What happens on binary files?

	$ printf "\\002\\000\\001" > test.bin
	$ quilt add test.bin
	> File test.bin added to patch %{P}test.diff

	$ printf "\\003\\000\\001" > test.bin
	$ quilt diff -pab --no-index 2>&1
	>~ (Files|Binary files) a/test\.bin and b/test\.bin differ
	> Diff failed on file 'test.bin', aborting
	$ echo %{?}
	> 1

	$ quilt refresh
	> Diff failed on file 'test.bin', aborting
	$ echo %{?}
	> 1