summaryrefslogtreecommitdiffstats
path: root/test/colon-in-patch-name.test
blob: 5d0a27b81a136be49223098bfcf8b5f7b35252d9 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Test that patch names including special characters such as a colons,
# brackets or parentheses are properly handled by all quilt commands

$ mkdir patches

$ quilt new "patch_with:strange[name]"
> Patch %{P}patch_with:strange[name] is now on top

$ echo foo > foo
$ quilt add foo
> File foo added to patch %{P}patch_with:strange[name]

$ quilt files
> foo

$ echo bar > foo
$ quilt diff -p ab -P "patch_with:strange[name]"
> Index: b/foo
> ===================================================================
> --- a/foo
> +++ b/foo
> @@ -1 +1 @@
> -foo
> +bar

$ quilt refresh -p ab
> Refreshed patch %{P}patch_with:strange[name]

$ quilt applied
> %{P}patch_with:strange[name]

$ quilt pop -q
> Removing patch %{P}patch_with:strange[name]
> No patches applied

$ quilt next
> %{P}patch_with:strange[name]

$ quilt push -q "patch_with:strange[name]"
> Applying patch %{P}patch_with:strange[name]
> Now at patch %{P}patch_with:strange[name]

$ quilt top
> %{P}patch_with:strange[name]

$ quilt rename "another:strange(name)"
> Patch %{P}patch_with:strange[name] renamed to %{P}another:strange(name)

$ quilt new "{%'}.patch"
> Patch %{P}{%'}.patch is now on top

$ quilt add foo
> File foo added to patch %{P}{%'}.patch

$ echo baz > foo
"
$ quilt previous
> %{P}another:strange(name)

$ quilt series
> %{P}another:strange(name)
> %{P}{%'}.patch

$ quilt refresh -p0 "{%'}.patch"
> Refreshed patch %{P}{%'}.patch

$ cat "patches/{%'}.patch"
> Index: foo
> ===================================================================
> --- foo.orig
> +++ foo
> @@ -1 +1 @@
> -bar
> +baz

$ quilt pop "another:strange(name)"
> Removing patch %{P}{%'}.patch
> Restoring foo
>
> Now at patch %{P}another:strange(name)

$ quilt remove foo
> File foo removed from patch %{P}another:strange(name)