| 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 ] |
| 9 |
| 10 |
| 11 def RunSteps(api): |
| 12 dest = api.path['start_dir'].join('some file') |
| 13 data = 'Here is some text data' |
| 14 |
| 15 api.file.write_text('write a file', dest, data) |
| 16 api.file.copy('copy it', dest, api.path['start_dir'].join('new path')) |
| 17 read_data = api.file.read_text( |
| 18 'read it', api.path['start_dir'].join('new path'), test_data=data) |
| 19 |
| 20 assert read_data == data, (read_data, data) |
| 21 |
| 22 api.file.move('move it', api.path['start_dir'].join('new path'), |
| 23 api.path['start_dir'].join('new new path')) |
| 24 |
| 25 read_data = api.file.read_text( |
| 26 'read it', api.path['start_dir'].join('new new path'), test_data=data) |
| 27 |
| 28 assert read_data == data, (read_data, data) |
| 29 |
| 30 |
| 31 def GenTests(api): |
| 32 yield api.test('basic') |
| OLD | NEW |