knife-essentials 0.7.6 → 0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. data/Rakefile +2 -2
  2. data/lib/chef/knife/{delete.rb → delete_essentials.rb} +10 -2
  3. data/lib/chef/knife/dependencies_essentials.rb +117 -0
  4. data/lib/chef/knife/{diff.rb → diff_essentials.rb} +3 -1
  5. data/lib/chef/knife/{download.rb → download_essentials.rb} +9 -4
  6. data/lib/chef/knife/{list.rb → list_essentials.rb} +8 -2
  7. data/lib/chef/knife/{raw.rb → raw_essentials.rb} +2 -0
  8. data/lib/chef/knife/{show.rb → show_essentials.rb} +3 -1
  9. data/lib/chef/knife/{upload.rb → upload_essentials.rb} +9 -4
  10. data/lib/chef_fs/command_line.rb +18 -0
  11. data/lib/chef_fs/file_pattern.rb +18 -0
  12. data/lib/chef_fs/file_system.rb +18 -1
  13. data/lib/chef_fs/file_system/base_fs_dir.rb +18 -0
  14. data/lib/chef_fs/file_system/base_fs_object.rb +19 -1
  15. data/lib/chef_fs/file_system/chef_repository_file_system_entry.rb +49 -8
  16. data/lib/chef_fs/file_system/chef_repository_file_system_root_dir.rb +62 -3
  17. data/lib/chef_fs/file_system/chef_server_root_dir.rb +18 -0
  18. data/lib/chef_fs/file_system/cookbook_dir.rb +26 -0
  19. data/lib/chef_fs/file_system/cookbook_file.rb +18 -0
  20. data/lib/chef_fs/file_system/cookbook_subdir.rb +18 -0
  21. data/lib/chef_fs/file_system/cookbooks_dir.rb +18 -2
  22. data/lib/chef_fs/file_system/data_bag_dir.rb +18 -0
  23. data/lib/chef_fs/file_system/data_bag_item.rb +18 -0
  24. data/lib/chef_fs/file_system/data_bags_dir.rb +18 -0
  25. data/lib/chef_fs/file_system/file_system_entry.rb +18 -0
  26. data/lib/chef_fs/file_system/file_system_error.rb +18 -0
  27. data/lib/chef_fs/file_system/file_system_root_dir.rb +18 -0
  28. data/lib/chef_fs/file_system/multiplexed_dir.rb +46 -0
  29. data/lib/chef_fs/file_system/must_delete_recursively_error.rb +18 -0
  30. data/lib/chef_fs/file_system/nodes_dir.rb +18 -0
  31. data/lib/chef_fs/file_system/nonexistent_fs_object.rb +18 -0
  32. data/lib/chef_fs/file_system/not_found_error.rb +18 -0
  33. data/lib/chef_fs/file_system/rest_list_dir.rb +18 -0
  34. data/lib/chef_fs/file_system/rest_list_entry.rb +18 -0
  35. data/lib/chef_fs/knife.rb +128 -18
  36. data/lib/chef_fs/path_utils.rb +19 -1
  37. data/lib/chef_fs/version.rb +1 -1
  38. data/spec/chef_fs/diff_spec.rb +69 -44
  39. data/spec/chef_fs/file_pattern_spec.rb +497 -479
  40. data/spec/chef_fs/file_system/chef_server_root_dir_spec.rb +18 -0
  41. data/spec/chef_fs/file_system/cookbooks_dir_spec.rb +18 -0
  42. data/spec/chef_fs/file_system/data_bags_dir_spec.rb +18 -0
  43. data/spec/chef_fs/file_system_spec.rb +124 -106
  44. data/spec/support/file_system_support.rb +93 -75
  45. metadata +12 -11
  46. data/lib/chef/sandbox_uploader.rb +0 -208
@@ -1,508 +1,526 @@
1
+ #
2
+ # Author:: John Keiser (<jkeiser@opscode.com>)
3
+ # Copyright:: Copyright (c) 2012 Opscode, Inc.
4
+ # License:: Apache License, Version 2.0
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
1
19
  require 'support/spec_helper'
2
20
  require 'chef_fs/file_pattern'
3
21
 
4
22
  describe ChefFS::FilePattern do
5
- def p(str)
6
- ChefFS::FilePattern.new(str)
7
- end
23
+ def p(str)
24
+ ChefFS::FilePattern.new(str)
25
+ end
8
26
 
9
- # Different kinds of patterns
10
- context 'with empty pattern ""' do
11
- let(:pattern) { ChefFS::FilePattern.new('') }
12
- it 'match?' do
13
- pattern.match?('').should be_true
14
- pattern.match?('/').should be_false
15
- pattern.match?('a').should be_false
16
- pattern.match?('a/b').should be_false
17
- end
18
- it 'exact_path' do
19
- pattern.exact_path.should == ''
20
- end
21
- it 'could_match_children?' do
22
- pattern.could_match_children?('').should be_false
23
- pattern.could_match_children?('a/b').should be_false
24
- end
25
- end
27
+ # Different kinds of patterns
28
+ context 'with empty pattern ""' do
29
+ let(:pattern) { ChefFS::FilePattern.new('') }
30
+ it 'match?' do
31
+ pattern.match?('').should be_true
32
+ pattern.match?('/').should be_false
33
+ pattern.match?('a').should be_false
34
+ pattern.match?('a/b').should be_false
35
+ end
36
+ it 'exact_path' do
37
+ pattern.exact_path.should == ''
38
+ end
39
+ it 'could_match_children?' do
40
+ pattern.could_match_children?('').should be_false
41
+ pattern.could_match_children?('a/b').should be_false
42
+ end
43
+ end
26
44
 
27
- context 'with root pattern "/"' do
28
- let(:pattern) { ChefFS::FilePattern.new('/') }
29
- it 'match?' do
30
- pattern.match?('/').should be_true
31
- pattern.match?('').should be_false
32
- pattern.match?('a').should be_false
33
- pattern.match?('/a').should be_false
34
- end
35
- it 'exact_path' do
36
- pattern.exact_path.should == '/'
37
- end
38
- it 'could_match_children?' do
39
- pattern.could_match_children?('').should be_false
40
- pattern.could_match_children?('/').should be_false
41
- pattern.could_match_children?('a').should be_false
42
- pattern.could_match_children?('a/b').should be_false
43
- pattern.could_match_children?('/a').should be_false
44
- end
45
- end
45
+ context 'with root pattern "/"' do
46
+ let(:pattern) { ChefFS::FilePattern.new('/') }
47
+ it 'match?' do
48
+ pattern.match?('/').should be_true
49
+ pattern.match?('').should be_false
50
+ pattern.match?('a').should be_false
51
+ pattern.match?('/a').should be_false
52
+ end
53
+ it 'exact_path' do
54
+ pattern.exact_path.should == '/'
55
+ end
56
+ it 'could_match_children?' do
57
+ pattern.could_match_children?('').should be_false
58
+ pattern.could_match_children?('/').should be_false
59
+ pattern.could_match_children?('a').should be_false
60
+ pattern.could_match_children?('a/b').should be_false
61
+ pattern.could_match_children?('/a').should be_false
62
+ end
63
+ end
46
64
 
47
- context 'with simple pattern "abc"' do
48
- let(:pattern) { ChefFS::FilePattern.new('abc') }
49
- it 'match?' do
50
- pattern.match?('abc').should be_true
51
- pattern.match?('a').should be_false
52
- pattern.match?('abcd').should be_false
53
- pattern.match?('/abc').should be_false
54
- pattern.match?('').should be_false
55
- pattern.match?('/').should be_false
56
- end
57
- it 'exact_path' do
58
- pattern.exact_path.should == 'abc'
59
- end
60
- it 'could_match_children?' do
61
- pattern.could_match_children?('').should be_false
62
- pattern.could_match_children?('abc').should be_false
63
- pattern.could_match_children?('/abc').should be_false
64
- end
65
- end
65
+ context 'with simple pattern "abc"' do
66
+ let(:pattern) { ChefFS::FilePattern.new('abc') }
67
+ it 'match?' do
68
+ pattern.match?('abc').should be_true
69
+ pattern.match?('a').should be_false
70
+ pattern.match?('abcd').should be_false
71
+ pattern.match?('/abc').should be_false
72
+ pattern.match?('').should be_false
73
+ pattern.match?('/').should be_false
74
+ end
75
+ it 'exact_path' do
76
+ pattern.exact_path.should == 'abc'
77
+ end
78
+ it 'could_match_children?' do
79
+ pattern.could_match_children?('').should be_false
80
+ pattern.could_match_children?('abc').should be_false
81
+ pattern.could_match_children?('/abc').should be_false
82
+ end
83
+ end
66
84
 
67
- context 'with simple pattern "/abc"' do
68
- let(:pattern) { ChefFS::FilePattern.new('/abc') }
69
- it 'match?' do
70
- pattern.match?('/abc').should be_true
71
- pattern.match?('abc').should be_false
72
- pattern.match?('a').should be_false
73
- pattern.match?('abcd').should be_false
74
- pattern.match?('').should be_false
75
- pattern.match?('/').should be_false
76
- end
77
- it 'exact_path' do
78
- pattern.exact_path.should == '/abc'
79
- end
80
- it 'could_match_children?' do
81
- pattern.could_match_children?('abc').should be_false
82
- pattern.could_match_children?('/abc').should be_false
83
- pattern.could_match_children?('/').should be_true
84
- pattern.could_match_children?('').should be_false
85
- end
86
- it 'exact_child_name_under' do
87
- pattern.exact_child_name_under('/').should == 'abc'
88
- end
89
- end
85
+ context 'with simple pattern "/abc"' do
86
+ let(:pattern) { ChefFS::FilePattern.new('/abc') }
87
+ it 'match?' do
88
+ pattern.match?('/abc').should be_true
89
+ pattern.match?('abc').should be_false
90
+ pattern.match?('a').should be_false
91
+ pattern.match?('abcd').should be_false
92
+ pattern.match?('').should be_false
93
+ pattern.match?('/').should be_false
94
+ end
95
+ it 'exact_path' do
96
+ pattern.exact_path.should == '/abc'
97
+ end
98
+ it 'could_match_children?' do
99
+ pattern.could_match_children?('abc').should be_false
100
+ pattern.could_match_children?('/abc').should be_false
101
+ pattern.could_match_children?('/').should be_true
102
+ pattern.could_match_children?('').should be_false
103
+ end
104
+ it 'exact_child_name_under' do
105
+ pattern.exact_child_name_under('/').should == 'abc'
106
+ end
107
+ end
90
108
 
91
- context 'with simple pattern "abc/def/ghi"' do
92
- let(:pattern) { ChefFS::FilePattern.new('abc/def/ghi') }
93
- it 'match?' do
94
- pattern.match?('abc/def/ghi').should be_true
95
- pattern.match?('/abc/def/ghi').should be_false
96
- pattern.match?('abc').should be_false
97
- pattern.match?('abc/def').should be_false
98
- end
99
- it 'exact_path' do
100
- pattern.exact_path.should == 'abc/def/ghi'
101
- end
102
- it 'could_match_children?' do
103
- pattern.could_match_children?('abc').should be_true
104
- pattern.could_match_children?('xyz').should be_false
105
- pattern.could_match_children?('/abc').should be_false
106
- pattern.could_match_children?('abc/def').should be_true
107
- pattern.could_match_children?('abc/xyz').should be_false
108
- pattern.could_match_children?('abc/def/ghi').should be_false
109
- end
110
- it 'exact_child_name_under' do
111
- pattern.exact_child_name_under('abc').should == 'def'
112
- pattern.exact_child_name_under('abc/def').should == 'ghi'
113
- end
114
- end
109
+ context 'with simple pattern "abc/def/ghi"' do
110
+ let(:pattern) { ChefFS::FilePattern.new('abc/def/ghi') }
111
+ it 'match?' do
112
+ pattern.match?('abc/def/ghi').should be_true
113
+ pattern.match?('/abc/def/ghi').should be_false
114
+ pattern.match?('abc').should be_false
115
+ pattern.match?('abc/def').should be_false
116
+ end
117
+ it 'exact_path' do
118
+ pattern.exact_path.should == 'abc/def/ghi'
119
+ end
120
+ it 'could_match_children?' do
121
+ pattern.could_match_children?('abc').should be_true
122
+ pattern.could_match_children?('xyz').should be_false
123
+ pattern.could_match_children?('/abc').should be_false
124
+ pattern.could_match_children?('abc/def').should be_true
125
+ pattern.could_match_children?('abc/xyz').should be_false
126
+ pattern.could_match_children?('abc/def/ghi').should be_false
127
+ end
128
+ it 'exact_child_name_under' do
129
+ pattern.exact_child_name_under('abc').should == 'def'
130
+ pattern.exact_child_name_under('abc/def').should == 'ghi'
131
+ end
132
+ end
115
133
 
116
- context 'with simple pattern "/abc/def/ghi"' do
117
- let(:pattern) { ChefFS::FilePattern.new('/abc/def/ghi') }
118
- it 'match?' do
119
- pattern.match?('/abc/def/ghi').should be_true
120
- pattern.match?('abc/def/ghi').should be_false
121
- pattern.match?('/abc').should be_false
122
- pattern.match?('/abc/def').should be_false
123
- end
124
- it 'exact_path' do
125
- pattern.exact_path.should == '/abc/def/ghi'
126
- end
127
- it 'could_match_children?' do
128
- pattern.could_match_children?('/abc').should be_true
129
- pattern.could_match_children?('/xyz').should be_false
130
- pattern.could_match_children?('abc').should be_false
131
- pattern.could_match_children?('/abc/def').should be_true
132
- pattern.could_match_children?('/abc/xyz').should be_false
133
- pattern.could_match_children?('/abc/def/ghi').should be_false
134
- end
135
- it 'exact_child_name_under' do
136
- pattern.exact_child_name_under('/').should == 'abc'
137
- pattern.exact_child_name_under('/abc').should == 'def'
138
- pattern.exact_child_name_under('/abc/def').should == 'ghi'
139
- end
140
- end
134
+ context 'with simple pattern "/abc/def/ghi"' do
135
+ let(:pattern) { ChefFS::FilePattern.new('/abc/def/ghi') }
136
+ it 'match?' do
137
+ pattern.match?('/abc/def/ghi').should be_true
138
+ pattern.match?('abc/def/ghi').should be_false
139
+ pattern.match?('/abc').should be_false
140
+ pattern.match?('/abc/def').should be_false
141
+ end
142
+ it 'exact_path' do
143
+ pattern.exact_path.should == '/abc/def/ghi'
144
+ end
145
+ it 'could_match_children?' do
146
+ pattern.could_match_children?('/abc').should be_true
147
+ pattern.could_match_children?('/xyz').should be_false
148
+ pattern.could_match_children?('abc').should be_false
149
+ pattern.could_match_children?('/abc/def').should be_true
150
+ pattern.could_match_children?('/abc/xyz').should be_false
151
+ pattern.could_match_children?('/abc/def/ghi').should be_false
152
+ end
153
+ it 'exact_child_name_under' do
154
+ pattern.exact_child_name_under('/').should == 'abc'
155
+ pattern.exact_child_name_under('/abc').should == 'def'
156
+ pattern.exact_child_name_under('/abc/def').should == 'ghi'
157
+ end
158
+ end
141
159
 
142
- context 'with simple pattern "a\*\b"' do
143
- let(:pattern) { ChefFS::FilePattern.new('a\*\b') }
144
- it 'match?' do
145
- pattern.match?('a*b').should be_true
146
- pattern.match?('ab').should be_false
147
- pattern.match?('acb').should be_false
148
- pattern.match?('ab').should be_false
149
- end
150
- it 'exact_path' do
151
- pattern.exact_path.should == 'a*b'
152
- end
153
- it 'could_match_children?' do
154
- pattern.could_match_children?('a/*b').should be_false
155
- end
156
- end
160
+ context 'with simple pattern "a\*\b"' do
161
+ let(:pattern) { ChefFS::FilePattern.new('a\*\b') }
162
+ it 'match?' do
163
+ pattern.match?('a*b').should be_true
164
+ pattern.match?('ab').should be_false
165
+ pattern.match?('acb').should be_false
166
+ pattern.match?('ab').should be_false
167
+ end
168
+ it 'exact_path' do
169
+ pattern.exact_path.should == 'a*b'
170
+ end
171
+ it 'could_match_children?' do
172
+ pattern.could_match_children?('a/*b').should be_false
173
+ end
174
+ end
157
175
 
158
- context 'with star pattern "/abc/*/ghi"' do
159
- let(:pattern) { ChefFS::FilePattern.new('/abc/*/ghi') }
160
- it 'match?' do
161
- pattern.match?('/abc/def/ghi').should be_true
162
- pattern.match?('/abc/ghi').should be_false
163
- end
164
- it 'exact_path' do
165
- pattern.exact_path.should be_nil
166
- end
167
- it 'could_match_children?' do
168
- pattern.could_match_children?('/abc').should be_true
169
- pattern.could_match_children?('/xyz').should be_false
170
- pattern.could_match_children?('abc').should be_false
171
- pattern.could_match_children?('/abc/def').should be_true
172
- pattern.could_match_children?('/abc/xyz').should be_true
173
- pattern.could_match_children?('/abc/def/ghi').should be_false
174
- end
175
- it 'exact_child_name_under' do
176
- pattern.exact_child_name_under('/').should == 'abc'
177
- pattern.exact_child_name_under('/abc').should == nil
178
- pattern.exact_child_name_under('/abc/def').should == 'ghi'
179
- end
180
- end
176
+ context 'with star pattern "/abc/*/ghi"' do
177
+ let(:pattern) { ChefFS::FilePattern.new('/abc/*/ghi') }
178
+ it 'match?' do
179
+ pattern.match?('/abc/def/ghi').should be_true
180
+ pattern.match?('/abc/ghi').should be_false
181
+ end
182
+ it 'exact_path' do
183
+ pattern.exact_path.should be_nil
184
+ end
185
+ it 'could_match_children?' do
186
+ pattern.could_match_children?('/abc').should be_true
187
+ pattern.could_match_children?('/xyz').should be_false
188
+ pattern.could_match_children?('abc').should be_false
189
+ pattern.could_match_children?('/abc/def').should be_true
190
+ pattern.could_match_children?('/abc/xyz').should be_true
191
+ pattern.could_match_children?('/abc/def/ghi').should be_false
192
+ end
193
+ it 'exact_child_name_under' do
194
+ pattern.exact_child_name_under('/').should == 'abc'
195
+ pattern.exact_child_name_under('/abc').should == nil
196
+ pattern.exact_child_name_under('/abc/def').should == 'ghi'
197
+ end
198
+ end
181
199
 
182
- context 'with star pattern "/abc/d*f/ghi"' do
183
- let(:pattern) { ChefFS::FilePattern.new('/abc/d*f/ghi') }
184
- it 'match?' do
185
- pattern.match?('/abc/def/ghi').should be_true
186
- pattern.match?('/abc/dxf/ghi').should be_true
187
- pattern.match?('/abc/df/ghi').should be_true
188
- pattern.match?('/abc/dxyzf/ghi').should be_true
189
- pattern.match?('/abc/d/ghi').should be_false
190
- pattern.match?('/abc/f/ghi').should be_false
191
- pattern.match?('/abc/ghi').should be_false
192
- pattern.match?('/abc/xyz/ghi').should be_false
193
- end
194
- it 'exact_path' do
195
- pattern.exact_path.should be_nil
196
- end
197
- it 'could_match_children?' do
198
- pattern.could_match_children?('/abc').should be_true
199
- pattern.could_match_children?('/xyz').should be_false
200
- pattern.could_match_children?('abc').should be_false
201
- pattern.could_match_children?('/abc/def').should be_true
202
- pattern.could_match_children?('/abc/xyz').should be_false
203
- pattern.could_match_children?('/abc/dxyzf').should be_true
204
- pattern.could_match_children?('/abc/df').should be_true
205
- pattern.could_match_children?('/abc/d').should be_false
206
- pattern.could_match_children?('/abc/f').should be_false
207
- pattern.could_match_children?('/abc/def/ghi').should be_false
208
- end
209
- it 'exact_child_name_under' do
210
- pattern.exact_child_name_under('/').should == 'abc'
211
- pattern.exact_child_name_under('/abc').should == nil
212
- pattern.exact_child_name_under('/abc/def').should == 'ghi'
213
- end
214
- end
200
+ context 'with star pattern "/abc/d*f/ghi"' do
201
+ let(:pattern) { ChefFS::FilePattern.new('/abc/d*f/ghi') }
202
+ it 'match?' do
203
+ pattern.match?('/abc/def/ghi').should be_true
204
+ pattern.match?('/abc/dxf/ghi').should be_true
205
+ pattern.match?('/abc/df/ghi').should be_true
206
+ pattern.match?('/abc/dxyzf/ghi').should be_true
207
+ pattern.match?('/abc/d/ghi').should be_false
208
+ pattern.match?('/abc/f/ghi').should be_false
209
+ pattern.match?('/abc/ghi').should be_false
210
+ pattern.match?('/abc/xyz/ghi').should be_false
211
+ end
212
+ it 'exact_path' do
213
+ pattern.exact_path.should be_nil
214
+ end
215
+ it 'could_match_children?' do
216
+ pattern.could_match_children?('/abc').should be_true
217
+ pattern.could_match_children?('/xyz').should be_false
218
+ pattern.could_match_children?('abc').should be_false
219
+ pattern.could_match_children?('/abc/def').should be_true
220
+ pattern.could_match_children?('/abc/xyz').should be_false
221
+ pattern.could_match_children?('/abc/dxyzf').should be_true
222
+ pattern.could_match_children?('/abc/df').should be_true
223
+ pattern.could_match_children?('/abc/d').should be_false
224
+ pattern.could_match_children?('/abc/f').should be_false
225
+ pattern.could_match_children?('/abc/def/ghi').should be_false
226
+ end
227
+ it 'exact_child_name_under' do
228
+ pattern.exact_child_name_under('/').should == 'abc'
229
+ pattern.exact_child_name_under('/abc').should == nil
230
+ pattern.exact_child_name_under('/abc/def').should == 'ghi'
231
+ end
232
+ end
215
233
 
216
- context 'with star pattern "/abc/d??f/ghi"' do
217
- let(:pattern) { ChefFS::FilePattern.new('/abc/d??f/ghi') }
218
- it 'match?' do
219
- pattern.match?('/abc/deef/ghi').should be_true
220
- pattern.match?('/abc/deeef/ghi').should be_false
221
- pattern.match?('/abc/def/ghi').should be_false
222
- pattern.match?('/abc/df/ghi').should be_false
223
- pattern.match?('/abc/d/ghi').should be_false
224
- pattern.match?('/abc/f/ghi').should be_false
225
- pattern.match?('/abc/ghi').should be_false
226
- end
227
- it 'exact_path' do
228
- pattern.exact_path.should be_nil
229
- end
230
- it 'could_match_children?' do
231
- pattern.could_match_children?('/abc').should be_true
232
- pattern.could_match_children?('/xyz').should be_false
233
- pattern.could_match_children?('abc').should be_false
234
- pattern.could_match_children?('/abc/deef').should be_true
235
- pattern.could_match_children?('/abc/deeef').should be_false
236
- pattern.could_match_children?('/abc/def').should be_false
237
- pattern.could_match_children?('/abc/df').should be_false
238
- pattern.could_match_children?('/abc/d').should be_false
239
- pattern.could_match_children?('/abc/f').should be_false
240
- pattern.could_match_children?('/abc/deef/ghi').should be_false
241
- end
242
- it 'exact_child_name_under' do
243
- pattern.exact_child_name_under('/').should == 'abc'
244
- pattern.exact_child_name_under('/abc').should == nil
245
- pattern.exact_child_name_under('/abc/deef').should == 'ghi'
246
- end
247
- end
234
+ context 'with star pattern "/abc/d??f/ghi"' do
235
+ let(:pattern) { ChefFS::FilePattern.new('/abc/d??f/ghi') }
236
+ it 'match?' do
237
+ pattern.match?('/abc/deef/ghi').should be_true
238
+ pattern.match?('/abc/deeef/ghi').should be_false
239
+ pattern.match?('/abc/def/ghi').should be_false
240
+ pattern.match?('/abc/df/ghi').should be_false
241
+ pattern.match?('/abc/d/ghi').should be_false
242
+ pattern.match?('/abc/f/ghi').should be_false
243
+ pattern.match?('/abc/ghi').should be_false
244
+ end
245
+ it 'exact_path' do
246
+ pattern.exact_path.should be_nil
247
+ end
248
+ it 'could_match_children?' do
249
+ pattern.could_match_children?('/abc').should be_true
250
+ pattern.could_match_children?('/xyz').should be_false
251
+ pattern.could_match_children?('abc').should be_false
252
+ pattern.could_match_children?('/abc/deef').should be_true
253
+ pattern.could_match_children?('/abc/deeef').should be_false
254
+ pattern.could_match_children?('/abc/def').should be_false
255
+ pattern.could_match_children?('/abc/df').should be_false
256
+ pattern.could_match_children?('/abc/d').should be_false
257
+ pattern.could_match_children?('/abc/f').should be_false
258
+ pattern.could_match_children?('/abc/deef/ghi').should be_false
259
+ end
260
+ it 'exact_child_name_under' do
261
+ pattern.exact_child_name_under('/').should == 'abc'
262
+ pattern.exact_child_name_under('/abc').should == nil
263
+ pattern.exact_child_name_under('/abc/deef').should == 'ghi'
264
+ end
265
+ end
248
266
 
249
- context 'with star pattern "/abc/d[a-z][0-9]f/ghi"' do
250
- let(:pattern) { ChefFS::FilePattern.new('/abc/d[a-z][0-9]f/ghi') }
251
- it 'match?' do
252
- pattern.match?('/abc/de1f/ghi').should be_true
253
- pattern.match?('/abc/deef/ghi').should be_false
254
- pattern.match?('/abc/d11f/ghi').should be_false
255
- pattern.match?('/abc/de11f/ghi').should be_false
256
- pattern.match?('/abc/dee1f/ghi').should be_false
257
- pattern.match?('/abc/df/ghi').should be_false
258
- pattern.match?('/abc/d/ghi').should be_false
259
- pattern.match?('/abc/f/ghi').should be_false
260
- pattern.match?('/abc/ghi').should be_false
261
- end
262
- it 'exact_path' do
263
- pattern.exact_path.should be_nil
264
- end
265
- it 'could_match_children?' do
266
- pattern.could_match_children?('/abc').should be_true
267
- pattern.could_match_children?('/xyz').should be_false
268
- pattern.could_match_children?('abc').should be_false
269
- pattern.could_match_children?('/abc/de1f').should be_true
270
- pattern.could_match_children?('/abc/deef').should be_false
271
- pattern.could_match_children?('/abc/d11f').should be_false
272
- pattern.could_match_children?('/abc/de11f').should be_false
273
- pattern.could_match_children?('/abc/dee1f').should be_false
274
- pattern.could_match_children?('/abc/def').should be_false
275
- pattern.could_match_children?('/abc/df').should be_false
276
- pattern.could_match_children?('/abc/d').should be_false
277
- pattern.could_match_children?('/abc/f').should be_false
278
- pattern.could_match_children?('/abc/de1f/ghi').should be_false
279
- end
280
- it 'exact_child_name_under' do
281
- pattern.exact_child_name_under('/').should == 'abc'
282
- pattern.exact_child_name_under('/abc').should == nil
283
- pattern.exact_child_name_under('/abc/de1f').should == 'ghi'
284
- end
285
- end
267
+ context 'with star pattern "/abc/d[a-z][0-9]f/ghi"' do
268
+ let(:pattern) { ChefFS::FilePattern.new('/abc/d[a-z][0-9]f/ghi') }
269
+ it 'match?' do
270
+ pattern.match?('/abc/de1f/ghi').should be_true
271
+ pattern.match?('/abc/deef/ghi').should be_false
272
+ pattern.match?('/abc/d11f/ghi').should be_false
273
+ pattern.match?('/abc/de11f/ghi').should be_false
274
+ pattern.match?('/abc/dee1f/ghi').should be_false
275
+ pattern.match?('/abc/df/ghi').should be_false
276
+ pattern.match?('/abc/d/ghi').should be_false
277
+ pattern.match?('/abc/f/ghi').should be_false
278
+ pattern.match?('/abc/ghi').should be_false
279
+ end
280
+ it 'exact_path' do
281
+ pattern.exact_path.should be_nil
282
+ end
283
+ it 'could_match_children?' do
284
+ pattern.could_match_children?('/abc').should be_true
285
+ pattern.could_match_children?('/xyz').should be_false
286
+ pattern.could_match_children?('abc').should be_false
287
+ pattern.could_match_children?('/abc/de1f').should be_true
288
+ pattern.could_match_children?('/abc/deef').should be_false
289
+ pattern.could_match_children?('/abc/d11f').should be_false
290
+ pattern.could_match_children?('/abc/de11f').should be_false
291
+ pattern.could_match_children?('/abc/dee1f').should be_false
292
+ pattern.could_match_children?('/abc/def').should be_false
293
+ pattern.could_match_children?('/abc/df').should be_false
294
+ pattern.could_match_children?('/abc/d').should be_false
295
+ pattern.could_match_children?('/abc/f').should be_false
296
+ pattern.could_match_children?('/abc/de1f/ghi').should be_false
297
+ end
298
+ it 'exact_child_name_under' do
299
+ pattern.exact_child_name_under('/').should == 'abc'
300
+ pattern.exact_child_name_under('/abc').should == nil
301
+ pattern.exact_child_name_under('/abc/de1f').should == 'ghi'
302
+ end
303
+ end
286
304
 
287
- context 'with star pattern "/abc/**/ghi"' do
288
- let(:pattern) { ChefFS::FilePattern.new('/abc/**/ghi') }
289
- it 'match?' do
290
- pattern.match?('/abc/def/ghi').should be_true
291
- pattern.match?('/abc/d/e/f/ghi').should be_true
292
- pattern.match?('/abc/ghi').should be_false
293
- pattern.match?('/abcdef/d/ghi').should be_false
294
- pattern.match?('/abc/d/defghi').should be_false
295
- pattern.match?('/xyz').should be_false
296
- end
297
- it 'exact_path' do
298
- pattern.exact_path.should be_nil
299
- end
300
- it 'could_match_children?' do
301
- pattern.could_match_children?('/abc').should be_true
302
- pattern.could_match_children?('/abc/d').should be_true
303
- pattern.could_match_children?('/abc/d/e').should be_true
304
- pattern.could_match_children?('/abc/d/e/f').should be_true
305
- pattern.could_match_children?('/abc/def/ghi').should be_true
306
- pattern.could_match_children?('abc').should be_false
307
- pattern.could_match_children?('/xyz').should be_false
308
- end
309
- it 'exact_child_name_under' do
310
- pattern.exact_child_name_under('/').should == 'abc'
311
- pattern.exact_child_name_under('/abc').should == nil
312
- pattern.exact_child_name_under('/abc/def').should == nil
313
- end
314
- end
305
+ context 'with star pattern "/abc/**/ghi"' do
306
+ let(:pattern) { ChefFS::FilePattern.new('/abc/**/ghi') }
307
+ it 'match?' do
308
+ pattern.match?('/abc/def/ghi').should be_true
309
+ pattern.match?('/abc/d/e/f/ghi').should be_true
310
+ pattern.match?('/abc/ghi').should be_false
311
+ pattern.match?('/abcdef/d/ghi').should be_false
312
+ pattern.match?('/abc/d/defghi').should be_false
313
+ pattern.match?('/xyz').should be_false
314
+ end
315
+ it 'exact_path' do
316
+ pattern.exact_path.should be_nil
317
+ end
318
+ it 'could_match_children?' do
319
+ pattern.could_match_children?('/abc').should be_true
320
+ pattern.could_match_children?('/abc/d').should be_true
321
+ pattern.could_match_children?('/abc/d/e').should be_true
322
+ pattern.could_match_children?('/abc/d/e/f').should be_true
323
+ pattern.could_match_children?('/abc/def/ghi').should be_true
324
+ pattern.could_match_children?('abc').should be_false
325
+ pattern.could_match_children?('/xyz').should be_false
326
+ end
327
+ it 'exact_child_name_under' do
328
+ pattern.exact_child_name_under('/').should == 'abc'
329
+ pattern.exact_child_name_under('/abc').should == nil
330
+ pattern.exact_child_name_under('/abc/def').should == nil
331
+ end
332
+ end
315
333
 
316
- context 'with star pattern "/abc**/ghi"' do
317
- let(:pattern) { ChefFS::FilePattern.new('/abc**/ghi') }
318
- it 'match?' do
319
- pattern.match?('/abc/def/ghi').should be_true
320
- pattern.match?('/abc/d/e/f/ghi').should be_true
321
- pattern.match?('/abc/ghi').should be_true
322
- pattern.match?('/abcdef/ghi').should be_true
323
- pattern.match?('/abc/defghi').should be_false
324
- pattern.match?('/xyz').should be_false
325
- end
326
- it 'exact_path' do
327
- pattern.exact_path.should be_nil
328
- end
329
- it 'could_match_children?' do
330
- pattern.could_match_children?('/abc').should be_true
331
- pattern.could_match_children?('/abcdef').should be_true
332
- pattern.could_match_children?('/abc/d/e').should be_true
333
- pattern.could_match_children?('/abc/d/e/f').should be_true
334
- pattern.could_match_children?('/abc/def/ghi').should be_true
335
- pattern.could_match_children?('abc').should be_false
336
- end
337
- it 'could_match_children? /abc** returns false for /xyz' do
338
- pending 'Make could_match_children? more rigorous' do
339
- # At the moment, we return false for this, but in the end it would be nice to return true:
340
- pattern.could_match_children?('/xyz').should be_false
341
- end
342
- end
343
- it 'exact_child_name_under' do
344
- pattern.exact_child_name_under('/').should == nil
345
- pattern.exact_child_name_under('/abc').should == nil
346
- pattern.exact_child_name_under('/abc/def').should == nil
347
- end
348
- end
334
+ context 'with star pattern "/abc**/ghi"' do
335
+ let(:pattern) { ChefFS::FilePattern.new('/abc**/ghi') }
336
+ it 'match?' do
337
+ pattern.match?('/abc/def/ghi').should be_true
338
+ pattern.match?('/abc/d/e/f/ghi').should be_true
339
+ pattern.match?('/abc/ghi').should be_true
340
+ pattern.match?('/abcdef/ghi').should be_true
341
+ pattern.match?('/abc/defghi').should be_false
342
+ pattern.match?('/xyz').should be_false
343
+ end
344
+ it 'exact_path' do
345
+ pattern.exact_path.should be_nil
346
+ end
347
+ it 'could_match_children?' do
348
+ pattern.could_match_children?('/abc').should be_true
349
+ pattern.could_match_children?('/abcdef').should be_true
350
+ pattern.could_match_children?('/abc/d/e').should be_true
351
+ pattern.could_match_children?('/abc/d/e/f').should be_true
352
+ pattern.could_match_children?('/abc/def/ghi').should be_true
353
+ pattern.could_match_children?('abc').should be_false
354
+ end
355
+ it 'could_match_children? /abc** returns false for /xyz' do
356
+ pending 'Make could_match_children? more rigorous' do
357
+ # At the moment, we return false for this, but in the end it would be nice to return true:
358
+ pattern.could_match_children?('/xyz').should be_false
359
+ end
360
+ end
361
+ it 'exact_child_name_under' do
362
+ pattern.exact_child_name_under('/').should == nil
363
+ pattern.exact_child_name_under('/abc').should == nil
364
+ pattern.exact_child_name_under('/abc/def').should == nil
365
+ end
366
+ end
349
367
 
350
- context 'with star pattern "/abc/**ghi"' do
351
- let(:pattern) { ChefFS::FilePattern.new('/abc/**ghi') }
352
- it 'match?' do
353
- pattern.match?('/abc/def/ghi').should be_true
354
- pattern.match?('/abc/def/ghi/ghi').should be_true
355
- pattern.match?('/abc/def/ghi/jkl').should be_false
356
- pattern.match?('/abc/d/e/f/ghi').should be_true
357
- pattern.match?('/abc/ghi').should be_true
358
- pattern.match?('/abcdef/ghi').should be_false
359
- pattern.match?('/abc/defghi').should be_true
360
- pattern.match?('/xyz').should be_false
361
- end
362
- it 'exact_path' do
363
- pattern.exact_path.should be_nil
364
- end
365
- it 'could_match_children?' do
366
- pattern.could_match_children?('/abc').should be_true
367
- pattern.could_match_children?('/abcdef').should be_false
368
- pattern.could_match_children?('/abc/d/e').should be_true
369
- pattern.could_match_children?('/abc/d/e/f').should be_true
370
- pattern.could_match_children?('/abc/def/ghi').should be_true
371
- pattern.could_match_children?('abc').should be_false
372
- pattern.could_match_children?('/xyz').should be_false
373
- end
374
- it 'exact_child_name_under' do
375
- pattern.exact_child_name_under('/').should == 'abc'
376
- pattern.exact_child_name_under('/abc').should == nil
377
- pattern.exact_child_name_under('/abc/def').should == nil
378
- end
379
- end
368
+ context 'with star pattern "/abc/**ghi"' do
369
+ let(:pattern) { ChefFS::FilePattern.new('/abc/**ghi') }
370
+ it 'match?' do
371
+ pattern.match?('/abc/def/ghi').should be_true
372
+ pattern.match?('/abc/def/ghi/ghi').should be_true
373
+ pattern.match?('/abc/def/ghi/jkl').should be_false
374
+ pattern.match?('/abc/d/e/f/ghi').should be_true
375
+ pattern.match?('/abc/ghi').should be_true
376
+ pattern.match?('/abcdef/ghi').should be_false
377
+ pattern.match?('/abc/defghi').should be_true
378
+ pattern.match?('/xyz').should be_false
379
+ end
380
+ it 'exact_path' do
381
+ pattern.exact_path.should be_nil
382
+ end
383
+ it 'could_match_children?' do
384
+ pattern.could_match_children?('/abc').should be_true
385
+ pattern.could_match_children?('/abcdef').should be_false
386
+ pattern.could_match_children?('/abc/d/e').should be_true
387
+ pattern.could_match_children?('/abc/d/e/f').should be_true
388
+ pattern.could_match_children?('/abc/def/ghi').should be_true
389
+ pattern.could_match_children?('abc').should be_false
390
+ pattern.could_match_children?('/xyz').should be_false
391
+ end
392
+ it 'exact_child_name_under' do
393
+ pattern.exact_child_name_under('/').should == 'abc'
394
+ pattern.exact_child_name_under('/abc').should == nil
395
+ pattern.exact_child_name_under('/abc/def').should == nil
396
+ end
397
+ end
380
398
 
381
- context 'with star pattern "a**b**c"' do
382
- let(:pattern) { ChefFS::FilePattern.new('a**b**c') }
383
- it 'match?' do
384
- pattern.match?('axybzwc').should be_true
385
- pattern.match?('abc').should be_true
386
- pattern.match?('axyzwc').should be_false
387
- pattern.match?('ac').should be_false
388
- pattern.match?('a/x/y/b/z/w/c').should be_true
389
- end
390
- it 'exact_path' do
391
- pattern.exact_path.should be_nil
392
- end
393
- end
399
+ context 'with star pattern "a**b**c"' do
400
+ let(:pattern) { ChefFS::FilePattern.new('a**b**c') }
401
+ it 'match?' do
402
+ pattern.match?('axybzwc').should be_true
403
+ pattern.match?('abc').should be_true
404
+ pattern.match?('axyzwc').should be_false
405
+ pattern.match?('ac').should be_false
406
+ pattern.match?('a/x/y/b/z/w/c').should be_true
407
+ end
408
+ it 'exact_path' do
409
+ pattern.exact_path.should be_nil
410
+ end
411
+ end
394
412
 
395
- context 'normalization tests' do
396
- it 'handles trailing slashes' do
397
- p('abc/').normalized_pattern.should == 'abc'
398
- p('abc/').exact_path.should == 'abc'
399
- p('abc/').match?('abc').should be_true
400
- p('//').normalized_pattern.should == '/'
401
- p('//').exact_path.should == '/'
402
- p('//').match?('/').should be_true
403
- p('/./').normalized_pattern.should == '/'
404
- p('/./').exact_path.should == '/'
405
- p('/./').match?('/').should be_true
406
- end
407
- it 'handles multiple slashes' do
408
- p('abc//def').normalized_pattern.should == 'abc/def'
409
- p('abc//def').exact_path.should == 'abc/def'
410
- p('abc//def').match?('abc/def').should be_true
411
- p('abc//').normalized_pattern.should == 'abc'
412
- p('abc//').exact_path.should == 'abc'
413
- p('abc//').match?('abc').should be_true
414
- end
415
- it 'handles dot' do
416
- p('abc/./def').normalized_pattern.should == 'abc/def'
417
- p('abc/./def').exact_path.should == 'abc/def'
418
- p('abc/./def').match?('abc/def').should be_true
419
- p('./abc/def').normalized_pattern.should == 'abc/def'
420
- p('./abc/def').exact_path.should == 'abc/def'
421
- p('./abc/def').match?('abc/def').should be_true
422
- p('/.').normalized_pattern.should == '/'
423
- p('/.').exact_path.should == '/'
424
- p('/.').match?('/').should be_true
425
- end
426
- it 'handles dot by itself', :pending => "decide what to do with dot by itself" do
427
- p('.').normalized_pattern.should == '.'
428
- p('.').exact_path.should == '.'
429
- p('.').match?('.').should be_true
430
- p('./').normalized_pattern.should == '.'
431
- p('./').exact_path.should == '.'
432
- p('./').match?('.').should be_true
433
- end
434
- it 'handles dotdot' do
435
- p('abc/../def').normalized_pattern.should == 'def'
436
- p('abc/../def').exact_path.should == 'def'
437
- p('abc/../def').match?('def').should be_true
438
- p('abc/def/../..').normalized_pattern.should == ''
439
- p('abc/def/../..').exact_path.should == ''
440
- p('abc/def/../..').match?('').should be_true
441
- p('/*/../def').normalized_pattern.should == '/def'
442
- p('/*/../def').exact_path.should == '/def'
443
- p('/*/../def').match?('/def').should be_true
444
- p('/*/*/../def').normalized_pattern.should == '/*/def'
445
- p('/*/*/../def').exact_path.should be_nil
446
- p('/*/*/../def').match?('/abc/def').should be_true
447
- p('/abc/def/../..').normalized_pattern.should == '/'
448
- p('/abc/def/../..').exact_path.should == '/'
449
- p('/abc/def/../..').match?('/').should be_true
450
- p('abc/../../def').normalized_pattern.should == '../def'
451
- p('abc/../../def').exact_path.should == '../def'
452
- p('abc/../../def').match?('../def').should be_true
453
- end
454
- it 'handles dotdot with double star' do
455
- p('abc**/def/../ghi').exact_path.should be_nil
456
- p('abc**/def/../ghi').match?('abc/ghi').should be_true
457
- p('abc**/def/../ghi').match?('abc/x/y/z/ghi').should be_true
458
- p('abc**/def/../ghi').match?('ghi').should be_false
459
- end
460
- it 'raises error on dotdot with overlapping double star' do
461
- lambda { ChefFS::FilePattern.new('abc/**/../def').exact_path }.should raise_error(ArgumentError)
462
- lambda { ChefFS::FilePattern.new('abc/**/abc/../../def').exact_path }.should raise_error(ArgumentError)
463
- end
464
- it 'handles leading dotdot' do
465
- p('../abc/def').exact_path.should == '../abc/def'
466
- p('../abc/def').match?('../abc/def').should be_true
467
- p('/../abc/def').exact_path.should == '/abc/def'
468
- p('/../abc/def').match?('/abc/def').should be_true
469
- p('..').exact_path.should == '..'
470
- p('..').match?('..').should be_true
471
- p('/..').exact_path.should == '/'
472
- p('/..').match?('/').should be_true
473
- end
474
- end
413
+ context 'normalization tests' do
414
+ it 'handles trailing slashes' do
415
+ p('abc/').normalized_pattern.should == 'abc'
416
+ p('abc/').exact_path.should == 'abc'
417
+ p('abc/').match?('abc').should be_true
418
+ p('//').normalized_pattern.should == '/'
419
+ p('//').exact_path.should == '/'
420
+ p('//').match?('/').should be_true
421
+ p('/./').normalized_pattern.should == '/'
422
+ p('/./').exact_path.should == '/'
423
+ p('/./').match?('/').should be_true
424
+ end
425
+ it 'handles multiple slashes' do
426
+ p('abc//def').normalized_pattern.should == 'abc/def'
427
+ p('abc//def').exact_path.should == 'abc/def'
428
+ p('abc//def').match?('abc/def').should be_true
429
+ p('abc//').normalized_pattern.should == 'abc'
430
+ p('abc//').exact_path.should == 'abc'
431
+ p('abc//').match?('abc').should be_true
432
+ end
433
+ it 'handles dot' do
434
+ p('abc/./def').normalized_pattern.should == 'abc/def'
435
+ p('abc/./def').exact_path.should == 'abc/def'
436
+ p('abc/./def').match?('abc/def').should be_true
437
+ p('./abc/def').normalized_pattern.should == 'abc/def'
438
+ p('./abc/def').exact_path.should == 'abc/def'
439
+ p('./abc/def').match?('abc/def').should be_true
440
+ p('/.').normalized_pattern.should == '/'
441
+ p('/.').exact_path.should == '/'
442
+ p('/.').match?('/').should be_true
443
+ end
444
+ it 'handles dot by itself', :pending => "decide what to do with dot by itself" do
445
+ p('.').normalized_pattern.should == '.'
446
+ p('.').exact_path.should == '.'
447
+ p('.').match?('.').should be_true
448
+ p('./').normalized_pattern.should == '.'
449
+ p('./').exact_path.should == '.'
450
+ p('./').match?('.').should be_true
451
+ end
452
+ it 'handles dotdot' do
453
+ p('abc/../def').normalized_pattern.should == 'def'
454
+ p('abc/../def').exact_path.should == 'def'
455
+ p('abc/../def').match?('def').should be_true
456
+ p('abc/def/../..').normalized_pattern.should == ''
457
+ p('abc/def/../..').exact_path.should == ''
458
+ p('abc/def/../..').match?('').should be_true
459
+ p('/*/../def').normalized_pattern.should == '/def'
460
+ p('/*/../def').exact_path.should == '/def'
461
+ p('/*/../def').match?('/def').should be_true
462
+ p('/*/*/../def').normalized_pattern.should == '/*/def'
463
+ p('/*/*/../def').exact_path.should be_nil
464
+ p('/*/*/../def').match?('/abc/def').should be_true
465
+ p('/abc/def/../..').normalized_pattern.should == '/'
466
+ p('/abc/def/../..').exact_path.should == '/'
467
+ p('/abc/def/../..').match?('/').should be_true
468
+ p('abc/../../def').normalized_pattern.should == '../def'
469
+ p('abc/../../def').exact_path.should == '../def'
470
+ p('abc/../../def').match?('../def').should be_true
471
+ end
472
+ it 'handles dotdot with double star' do
473
+ p('abc**/def/../ghi').exact_path.should be_nil
474
+ p('abc**/def/../ghi').match?('abc/ghi').should be_true
475
+ p('abc**/def/../ghi').match?('abc/x/y/z/ghi').should be_true
476
+ p('abc**/def/../ghi').match?('ghi').should be_false
477
+ end
478
+ it 'raises error on dotdot with overlapping double star' do
479
+ lambda { ChefFS::FilePattern.new('abc/**/../def').exact_path }.should raise_error(ArgumentError)
480
+ lambda { ChefFS::FilePattern.new('abc/**/abc/../../def').exact_path }.should raise_error(ArgumentError)
481
+ end
482
+ it 'handles leading dotdot' do
483
+ p('../abc/def').exact_path.should == '../abc/def'
484
+ p('../abc/def').match?('../abc/def').should be_true
485
+ p('/../abc/def').exact_path.should == '/abc/def'
486
+ p('/../abc/def').match?('/abc/def').should be_true
487
+ p('..').exact_path.should == '..'
488
+ p('..').match?('..').should be_true
489
+ p('/..').exact_path.should == '/'
490
+ p('/..').match?('/').should be_true
491
+ end
492
+ end
475
493
 
476
494
 
477
- # match?
478
- # - single element matches (empty, fixed, ?, *, characters, escapes)
479
- # - nested matches
480
- # - absolute matches
481
- # - trailing slashes
482
- # - **
495
+ # match?
496
+ # - single element matches (empty, fixed, ?, *, characters, escapes)
497
+ # - nested matches
498
+ # - absolute matches
499
+ # - trailing slashes
500
+ # - **
483
501
 
484
- # exact_path
485
- # - empty
486
- # - single element and nested matches, with escapes
487
- # - absolute and relative
488
- # - ?, *, characters, **
502
+ # exact_path
503
+ # - empty
504
+ # - single element and nested matches, with escapes
505
+ # - absolute and relative
506
+ # - ?, *, characters, **
489
507
 
490
- # could_match_children?
491
- #
492
- #
493
- #
494
- #
495
- context 'with pattern "abc"' do
496
- end
508
+ # could_match_children?
509
+ #
510
+ #
511
+ #
512
+ #
513
+ context 'with pattern "abc"' do
514
+ end
497
515
 
498
- context 'with pattern "/abc"' do
499
- end
516
+ context 'with pattern "/abc"' do
517
+ end
500
518
 
501
- context 'with pattern "abc/def/ghi"' do
502
- end
519
+ context 'with pattern "abc/def/ghi"' do
520
+ end
503
521
 
504
- context 'with pattern "/abc/def/ghi"' do
505
- end
522
+ context 'with pattern "/abc/def/ghi"' do
523
+ end
506
524
 
507
- # Exercise the different methods to their maximum
525
+ # Exercise the different methods to their maximum
508
526
  end