summaryrefslogtreecommitdiffstats
path: root/test/space-in-filenames.test
blob: 0b25948260c098dc8b8a7835ac49a59ebc27c5ff (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
$ mkdir patches

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

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

$ quilt files
> foo
$ quilt patches foo
> %{P}test.diff
$ quilt patches "foo bar"

$ echo foo > "foo bar"
$ quilt add "foo bar"
> File foo bar added to patch %{P}test.diff

$ quilt files
> foo
> foo bar
$ quilt patches "foo bar"
> %{P}test.diff
$ quilt patches bar
$ quilt patches "foo bar baz"

$ quilt add "a: b [c]"
> File a: b [c] added to patch %{P}test.diff

$ quilt files
> a: b [c]
> foo
> foo bar
$ quilt patches 'a: b [c]'
> %{P}test.diff
$ quilt patches a
$ quilt patches b
$ quilt patches 'a: b c'

$ echo bar > "foo bar"
$ echo "new line" > "a: b [c]"
$ quilt diff -p ab
> Index: b/a: b [c]
> ===================================================================
> --- /dev/null
> +++ "b/a: b [c]"
> @@ -0,0 +1 @@
> +new line
> Index: b/foo
> ===================================================================
> --- /dev/null
> +++ b/foo
> @@ -0,0 +1 @@
> +foo
> Index: b/foo bar
> ===================================================================
> --- "a/foo bar"
> +++ "b/foo bar"
> @@ -1 +1 @@
> -foo
> +bar

$ quilt refresh -p ab
> Refreshed patch %{P}test.diff
$ cat patches/test.diff
> Index: b/a: b [c]
> ===================================================================
> --- /dev/null
> +++ "b/a: b [c]"
> @@ -0,0 +1 @@
> +new line
> Index: b/foo
> ===================================================================
> --- /dev/null
> +++ b/foo
> @@ -0,0 +1 @@
> +foo
> Index: b/foo bar
> ===================================================================
> --- "a/foo bar"
> +++ "b/foo bar"
> @@ -1 +1 @@
> -foo
> +bar

$ quilt refresh -p ab --sort
> Patch %{P}test.diff is unchanged
$ cat patches/test.diff
> Index: b/a: b [c]
> ===================================================================
> --- /dev/null
> +++ "b/a: b [c]"
> @@ -0,0 +1 @@
> +new line
> Index: b/foo
> ===================================================================
> --- /dev/null
> +++ b/foo
> @@ -0,0 +1 @@
> +foo
> Index: b/foo bar
> ===================================================================
> --- "a/foo bar"
> +++ "b/foo bar"
> @@ -1 +1 @@
> -foo
> +bar

$ quilt grep bar
> foo bar:bar
$ quilt grep new
> a: b [c]:new line
$ quilt grep " "
> a: b [c]:new line

$ quilt diff -p ab -z

$ quilt pop
> Removing patch patches/test.diff
> Removing a: b [c]
> Removing foo
> Restoring foo bar
>
> No patches applied

$ quilt patches "foo bar"
> %{P}test.diff

$ quilt patches "a: b [c]"
> %{P}test.diff

$ quilt push
> Applying patch patches/test.diff
> patching file a: b [c]
> patching file foo
> patching file foo bar
>
> Now at patch patches/test.diff

$ quilt remove "a: b [c]"
> File a: b [c] removed from patch %{P}test.diff

$ quilt files
> foo
> foo bar

$ quilt remove "foo bar"
> File foo bar removed from patch %{P}test.diff

$ quilt files
> foo