| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2017 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. |
| 4 |
| 5 DEPS = [ |
| 6 "file", |
| 7 "path", |
| 8 "json", |
| 9 ] |
| 10 |
| 11 def RunSteps(api): |
| 12 sd = api.path['start_dir'] |
| 13 |
| 14 for fname in ['thing.pat', 'other.pat', 'something', 'file']: |
| 15 api.file.write_text("write %s" % fname, sd.join(fname), 'data') |
| 16 |
| 17 hits = api.file.glob_paths("pat", sd, '*.pat', ['thing.pat', 'other.pat']) |
| 18 assert hits == [sd.join('other.pat'), sd.join('thing.pat')] |
| 19 |
| 20 hits = api.file.glob_paths("noop", sd, '*.nop', []) |
| 21 assert hits == [] |
| 22 |
| 23 hits = api.file.glob_paths("thing", sd, '*thing*', ['thing.pat', 'something']) |
| 24 assert hits == [sd.join('something'), sd.join('thing.pat')] |
| 25 |
| 26 |
| 27 def GenTests(api): |
| 28 yield api.test('basic') |
| 29 |
| OLD | NEW |